CountCovariates makes sure that it sees a rod type that it expects for use as a variant mask (accepted types are dbsnp, vcf, and bed)
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4296 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
c1720cc8f5
commit
2eb5d9b2d2
|
|
@ -25,7 +25,10 @@
|
|||
|
||||
package org.broadinstitute.sting.gatk.walkers.recalibration;
|
||||
|
||||
import org.broad.tribble.bed.BEDCodec;
|
||||
import org.broad.tribble.dbsnp.DbSNPCodec;
|
||||
import org.broad.tribble.util.variantcontext.VariantContext;
|
||||
import org.broad.tribble.vcf.VCFCodec;
|
||||
import org.broadinstitute.sting.commandline.Output;
|
||||
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
||||
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
||||
|
|
@ -179,12 +182,16 @@ public class CovariateCounterWalker extends LocusWalker<CovariateCounterWalker.C
|
|||
System.exit( 0 ); // Early exit here because user requested it
|
||||
}
|
||||
|
||||
// Warn the user if no dbSNP file was specified
|
||||
// Warn the user if no dbSNP file or other variant mask was specified
|
||||
boolean foundDBSNP = false;
|
||||
for( ReferenceOrderedDataSource rod : this.getToolkit().getRodDataSources() ) {
|
||||
if( rod != null ) {
|
||||
foundDBSNP = true;
|
||||
break;
|
||||
if( rod.getReferenceOrderedData().getType().equals(DbSNPCodec.class) ||
|
||||
rod.getReferenceOrderedData().getType().equals(VCFCodec.class) ||
|
||||
rod.getReferenceOrderedData().getType().equals(BEDCodec.class) ) {
|
||||
foundDBSNP = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( !foundDBSNP && !RUN_WITHOUT_DBSNP ) {
|
||||
|
|
@ -381,6 +388,7 @@ public class CovariateCounterWalker extends LocusWalker<CovariateCounterWalker.C
|
|||
* adding one to the number of observations and potentially one to the number of mismatches
|
||||
* Lots of things are passed as parameters to this method as a strategy for optimizing the covariate.getValue calls
|
||||
* because pulling things out of the SAMRecord is an expensive operation.
|
||||
* @param counter Data structure which holds the counted bases
|
||||
* @param gatkRead The SAMRecord holding all the data for this read
|
||||
* @param offset The offset in the read for this locus
|
||||
* @param refBase The reference base at this locus
|
||||
|
|
|
|||
Loading…
Reference in New Issue