Disable VQSR tranche plots in INDEL mode

This commit is contained in:
Geraldine Van der Auwera 2013-09-26 16:04:08 -04:00
parent 749903325e
commit 9f7fa247f6
1 changed files with 13 additions and 8 deletions

View File

@ -181,7 +181,7 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
/** /**
* The expected transition / transversion ratio of true novel variants in your targeted region (whole genome, exome, specific * The expected transition / transversion ratio of true novel variants in your targeted region (whole genome, exome, specific
* genes), which varies greatly by the CpG and GC content of the region. See expected Ti/Tv ratios section of the GATK best * genes), which varies greatly by the CpG and GC content of the region. See expected Ti/Tv ratios section of the GATK best
* practices documentation (http://www.broadinstitute.org/gatk/guide/topic?name=best-practices) for more information. * practices documentation (http://www.broadinstitute.org/gatk/guide/best-practices) for more information.
* Normal values are 2.15 for human whole genome values and 3.2 for human whole exomes. Note * Normal values are 2.15 for human whole genome values and 3.2 for human whole exomes. Note
* that this parameter is used for display purposes only and isn't used anywhere in the algorithm! * that this parameter is used for display purposes only and isn't used anywhere in the algorithm!
*/ */
@ -371,6 +371,10 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
createVisualizationScript( dataManager.getRandomDataForPlotting( 6000 ), goodModel, badModel, lodCutoff, dataManager.getAnnotationKeys().toArray(new String[USE_ANNOTATIONS.length]) ); createVisualizationScript( dataManager.getRandomDataForPlotting( 6000 ), goodModel, badModel, lodCutoff, dataManager.getAnnotationKeys().toArray(new String[USE_ANNOTATIONS.length]) );
} }
if(VRAC.MODE == VariantRecalibratorArgumentCollection.Mode.INDEL) {
// Print out an info message to make it clear why the tranches plot is not generated
logger.info("Tranches plot will not be generated since we are running in INDEL mode");
} else {
// Execute the RScript command to plot the table of truth values // Execute the RScript command to plot the table of truth values
RScriptExecutor executor = new RScriptExecutor(); RScriptExecutor executor = new RScriptExecutor();
executor.addScript(new Resource(PLOT_TRANCHES_RSCRIPT, VariantRecalibrator.class)); executor.addScript(new Resource(PLOT_TRANCHES_RSCRIPT, VariantRecalibrator.class));
@ -379,6 +383,7 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
logger.info("Executing: " + executor.getApproximateCommandLine()); logger.info("Executing: " + executor.getApproximateCommandLine());
executor.exec(); executor.exec();
} }
}
private void createVisualizationScript( final ExpandingArrayList<VariantDatum> randomData, final GaussianMixtureModel goodModel, final GaussianMixtureModel badModel, final double lodCutoff, final String[] annotationKeys ) { private void createVisualizationScript( final ExpandingArrayList<VariantDatum> randomData, final GaussianMixtureModel goodModel, final GaussianMixtureModel badModel, final double lodCutoff, final String[] annotationKeys ) {
PrintStream stream; PrintStream stream;