bamDialog.getProgressStream().setText("End of bam qc");
bamDialog.getProgressBar().setValue(100);
// report
bamDialog.getProgressStream().setText("Computing report...");
BamQCRegionReporter reporter = new BamQCRegionReporter(regionsAvailable, true);
bamQC.prepareInputDescription(reporter, bamDialog.getDrawChromosomeLimits());
// Draw the Chromosome Limits or not
reporter.setPaintChromosomeLimits( bamDialog.getDrawChromosomeLimits() );
if (bamDialog.compareGcContentToPrecalculated()) {
String genomeName = bamDialog.getGenomeName();
reporter.setGenomeGCContentName(genomeName);
}
bamDialog.getProgressStream().setText(" text report...");
reporter.loadReportData(bamQC.getBamStats());
bamDialog.getProgressStream().setText("OK");
bamDialog.getProgressStream().setText(" charts...");
reporter.computeChartsBuffers(bamQC.getBamStats(), bamQC.getLocator(), bamQC.isPairedData());
bamDialog.getProgressStream().setText("OK");
// Set the reporter into the created tab
resultManager.addReporter(reporter);
if (bamDialog.getRegionFile() != null && bamDialog.getComputeOutsideRegions() ) {
BamQCRegionReporter outsideReporter = new BamQCRegionReporter(regionsAvailable, false);
bamQC.prepareInputDescription(outsideReporter, bamDialog.getDrawChromosomeLimits());
// Draw the Chromosome Limits or not
outsideReporter.setPaintChromosomeLimits(bamDialog.getDrawChromosomeLimits());
if (bamDialog.compareGcContentToPrecalculated()) {
String genomeName = bamDialog.getGenomeName();
outsideReporter.setGenomeGCContentName(genomeName);
}
// save stats
bamDialog.getProgressStream().setText(" outside text report...");
outsideReporter.loadReportData(bamQC.getOutsideBamStats());
bamDialog.getProgressStream().setText("OK");
// save charts
bamDialog.getProgressStream().setText(" outside charts...");
outsideReporter.computeChartsBuffers(bamQC.getOutsideBamStats(), bamQC.getLocator(), bamQC.isPairedData());
bamDialog.getProgressStream().setText("OK");
// Set the reporters into the created tab
resultManager.addReporter(outsideReporter);
}