// save stats
reporter.writeReport(bamQC.getBamStats(),outdir);
AnalysisResultManager resultManager = new AnalysisResultManager(AnalysisType.BAM_QC);
reporter.loadReportData(bamQC.getBamStats());
reporter.computeChartsBuffers(bamQC.getBamStats(), bamQC.getLocator(), bamQC.isPairedData());
resultManager.addReporter(reporter);
if(selectedRegionsAvailable && computeOutsideStats){
BamQCRegionReporter outsideReporter = new BamQCRegionReporter(selectedRegionsAvailable, false);
outsideReporter.setPaintChromosomeLimits(paintChromosomeLimits);
if (!genomeToCompare.isEmpty()) {
outsideReporter.setGenomeGCContentName(genomeToCompare);
}
bamQC.prepareInputDescription(outsideReporter, paintChromosomeLimits);
outsideReporter.writeReport(bamQC.getOutsideBamStats(),outdir);
outsideReporter.loadReportData(bamQC.getOutsideBamStats());
outsideReporter.computeChartsBuffers(bamQC.getOutsideBamStats(), bamQC.getLocator(), bamQC.isPairedData());
resultManager.addReporter(outsideReporter);
}
exportResult(resultManager);