if (res != 0) {
throw new RuntimeException("The RScript process finished with error.\n" +
" Check log for details.");
}
StatsReporter statsReporter = new StatsReporter();
statsReporter.setName("Global");
statsReporter.setFileName( "GlobalReport" );
if (!loadBufferedImages(statsReporter, workDir) ) {
throw new RuntimeException("No plots for global analysis generated.");
}
prepareInputDescription(statsReporter);
tabProperties.addReporter(statsReporter);
if (compareConditions) {
String compareDirPath = workDir + File.separator + COMPARISON_ANALYSIS;
StatsReporter reporter = new StatsReporter();
reporter.setName(COMPARISON_ANALYSIS);
reporter.setFileName( COMPARISON_ANALYSIS + "Report");
if (!loadBufferedImages(reporter, compareDirPath) ) {
throw new RuntimeException("No images generated for comparison of conditions!");
}
tabProperties.addReporter(reporter);
}
for (CountsSampleInfo sampleInfo : samples) {
String sampleDirPath = workDir + File.separator + sampleInfo.name;
StatsReporter reporter = new StatsReporter();
reporter.setName(sampleInfo.name);
reporter.setFileName( sampleInfo.name.replaceAll("\\s+","") + "Report");
if (!loadBufferedImages(reporter, sampleDirPath) ) {
throw new RuntimeException("No images generated for sample " + sampleInfo.name);
}
tabProperties.addReporter(reporter);