Search in sources :

Example 1 with HetPulldownCalculator

use of org.broadinstitute.hellbender.tools.exome.pulldown.HetPulldownCalculator 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";
}
Also used : Pulldown(org.broadinstitute.hellbender.tools.exome.pulldown.Pulldown) IntervalList(htsjdk.samtools.util.IntervalList) HetPulldownCalculator(org.broadinstitute.hellbender.tools.exome.pulldown.HetPulldownCalculator)

Example 2 with HetPulldownCalculator

use of org.broadinstitute.hellbender.tools.exome.pulldown.HetPulldownCalculator in project gatk-protected 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";
}
Also used : Pulldown(org.broadinstitute.hellbender.tools.exome.pulldown.Pulldown) IntervalList(htsjdk.samtools.util.IntervalList) HetPulldownCalculator(org.broadinstitute.hellbender.tools.exome.pulldown.HetPulldownCalculator)

Aggregations

IntervalList (htsjdk.samtools.util.IntervalList)2 HetPulldownCalculator (org.broadinstitute.hellbender.tools.exome.pulldown.HetPulldownCalculator)2 Pulldown (org.broadinstitute.hellbender.tools.exome.pulldown.Pulldown)2