use of org.broadinstitute.hellbender.tools.exome.pulldown.Pulldown in project gatk-protected by broadinstitute.
the class GetBayesianHetCoverage method runMatchedNormalTumor.
/**
* The matched norrmal-tumor workflow
*/
private void runMatchedNormalTumor() {
final BayesianHetPulldownCalculator normalHetPulldownCalculator, tumorHetPulldownCalculator;
final Pulldown normalHetPulldown, tumorHetPulldown;
normalHetPulldownCalculator = new BayesianHetPulldownCalculator(REFERENCE_ARGUMENTS.getReferenceFile(), IntervalList.fromFile(snpFile), minimumMappingQuality, minimumBaseQuality, readDepthThreshold, VALIDATION_STRINGENCY, errorProbabilityAdjustmentFactor, new BalancedHeterozygousPileupPriorModel());
logger.info("Calculating the Het pulldown from the normal BAM file using the BALANCED prior...");
normalHetPulldown = normalHetPulldownCalculator.getHetPulldown(normalBamFile, hetCallingStringency);
logger.info("Writing Het pulldown from normal reads to " + normalHetOutputFile.toString());
normalHetPulldown.write(normalHetOutputFile, AllelicCountTableColumn.AllelicCountTableVerbosity.FULL);
tumorHetPulldownCalculator = new BayesianHetPulldownCalculator(REFERENCE_ARGUMENTS.getReferenceFile(), normalHetPulldown.getIntervals(), minimumMappingQuality, minimumBaseQuality, readDepthThreshold, VALIDATION_STRINGENCY, errorProbabilityAdjustmentFactor, new BalancedHeterozygousPileupPriorModel());
logger.info("Calculating the Het pulldown from the tumor BAM file on Hets detected in the normal BAM file...");
tumorHetPulldown = tumorHetPulldownCalculator.getTumorHetPulldownFromNormalPulldown(tumorBamFile, normalHetPulldown);
logger.info("Writing Het pulldown from tumor reads to " + tumorHetOutputFile.toString());
tumorHetPulldown.write(tumorHetOutputFile, AllelicCountTableColumn.AllelicCountTableVerbosity.INTERMEDIATE);
}
use of org.broadinstitute.hellbender.tools.exome.pulldown.Pulldown in project gatk by broadinstitute.
the class GetBayesianHetCoverage method runNormalOnly.
/**
* The normal-only workflow
*/
private void runNormalOnly() {
final BayesianHetPulldownCalculator normalHetPulldownCalculator;
final Pulldown normalHetPulldown;
normalHetPulldownCalculator = new BayesianHetPulldownCalculator(REFERENCE_ARGUMENTS.getReferenceFile(), IntervalList.fromFile(snpFile), minimumMappingQuality, minimumBaseQuality, readDepthThreshold, VALIDATION_STRINGENCY, errorProbabilityAdjustmentFactor, new BalancedHeterozygousPileupPriorModel());
logger.info("Calculating the Het pulldown from the normal BAM file using the BALANCED prior...");
normalHetPulldown = normalHetPulldownCalculator.getHetPulldown(normalBamFile, hetCallingStringency);
logger.info("Writing Het pulldown from normal reads to " + normalHetOutputFile.toString());
normalHetPulldown.write(normalHetOutputFile, AllelicCountTableColumn.AllelicCountTableVerbosity.FULL);
}
use of org.broadinstitute.hellbender.tools.exome.pulldown.Pulldown in project gatk by broadinstitute.
the class GetBayesianHetCoverage method runTumorOnly.
/**
* The tumor-only workflow
*/
private void runTumorOnly() {
final BayesianHetPulldownCalculator tumorHetPulldownCalculator;
final Pulldown tumorHetPulldown;
tumorHetPulldownCalculator = new BayesianHetPulldownCalculator(REFERENCE_ARGUMENTS.getReferenceFile(), IntervalList.fromFile(snpFile), minimumMappingQuality, minimumBaseQuality, readDepthThreshold, VALIDATION_STRINGENCY, errorProbabilityAdjustmentFactor, new HeterogeneousHeterozygousPileupPriorModel(minimumAbnormalFraction, maximumAbnormalFraction, maximumCopyNumber, quadratureOrder));
logger.info("Calculating the Het pulldown from the tumor BAM file using the HETEROGENEOUS prior...");
tumorHetPulldown = tumorHetPulldownCalculator.getHetPulldown(tumorBamFile, hetCallingStringency);
logger.info("Writing Het pulldown from tumor reads to " + tumorHetOutputFile.toString());
tumorHetPulldown.write(tumorHetOutputFile, AllelicCountTableColumn.AllelicCountTableVerbosity.FULL);
}
use of org.broadinstitute.hellbender.tools.exome.pulldown.Pulldown in project gatk by broadinstitute.
the class GetHetCoverage method doWork.
@Override
protected Object doWork() {
//if tumor arguments are missing, throw exception (and do not even get normal pulldown)
final boolean doTumorPulldown;
if (tumorHetOutputFile != null && tumorBAMFile != null) {
doTumorPulldown = true;
} else if ((tumorHetOutputFile == null) != (tumorBAMFile == null)) {
throw new CommandLineException("Must specify both BAM and output files for tumor pulldown.");
} else {
doTumorPulldown = false;
}
final HetPulldownCalculator hetPulldown = new HetPulldownCalculator(REFERENCE_ARGUMENTS.getReferenceFile(), snpFile, minimumMappingQuality, minimumBaseQuality, VALIDATION_STRINGENCY);
logger.info("Getting normal het pulldown...");
final Pulldown normalHetPulldown = hetPulldown.getNormal(normalBAMFile, pvalThreshold, minimumRawReads);
normalHetPulldown.write(normalHetOutputFile, AllelicCountTableVerbosity.BASIC);
logger.info("Normal het pulldown written to " + normalHetOutputFile.toString());
if (doTumorPulldown) {
final IntervalList normalHetIntervals = normalHetPulldown.getIntervals();
logger.info("Getting tumor het pulldown...");
final Pulldown tumorHetPulldown = hetPulldown.getTumor(tumorBAMFile, normalHetIntervals, minimumRawReads);
tumorHetPulldown.write(tumorHetOutputFile, AllelicCountTableVerbosity.BASIC);
logger.info("Tumor het pulldown written to " + tumorHetOutputFile.toString());
}
return "SUCCESS";
}
use of org.broadinstitute.hellbender.tools.exome.pulldown.Pulldown in project gatk by broadinstitute.
the class GetBayesianHetCoverage method runMatchedNormalTumor.
/**
* The matched norrmal-tumor workflow
*/
private void runMatchedNormalTumor() {
final BayesianHetPulldownCalculator normalHetPulldownCalculator, tumorHetPulldownCalculator;
final Pulldown normalHetPulldown, tumorHetPulldown;
normalHetPulldownCalculator = new BayesianHetPulldownCalculator(REFERENCE_ARGUMENTS.getReferenceFile(), IntervalList.fromFile(snpFile), minimumMappingQuality, minimumBaseQuality, readDepthThreshold, VALIDATION_STRINGENCY, errorProbabilityAdjustmentFactor, new BalancedHeterozygousPileupPriorModel());
logger.info("Calculating the Het pulldown from the normal BAM file using the BALANCED prior...");
normalHetPulldown = normalHetPulldownCalculator.getHetPulldown(normalBamFile, hetCallingStringency);
logger.info("Writing Het pulldown from normal reads to " + normalHetOutputFile.toString());
normalHetPulldown.write(normalHetOutputFile, AllelicCountTableColumn.AllelicCountTableVerbosity.FULL);
tumorHetPulldownCalculator = new BayesianHetPulldownCalculator(REFERENCE_ARGUMENTS.getReferenceFile(), normalHetPulldown.getIntervals(), minimumMappingQuality, minimumBaseQuality, readDepthThreshold, VALIDATION_STRINGENCY, errorProbabilityAdjustmentFactor, new BalancedHeterozygousPileupPriorModel());
logger.info("Calculating the Het pulldown from the tumor BAM file on Hets detected in the normal BAM file...");
tumorHetPulldown = tumorHetPulldownCalculator.getTumorHetPulldownFromNormalPulldown(tumorBamFile, normalHetPulldown);
logger.info("Writing Het pulldown from tumor reads to " + tumorHetOutputFile.toString());
tumorHetPulldown.write(tumorHetOutputFile, AllelicCountTableColumn.AllelicCountTableVerbosity.INTERMEDIATE);
}
Aggregations