Require each filter or feature to declare whether or not they want mapping quality zero reads in the alignment context
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1487 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
1a299dd459
commit
463f80c03e
|
|
@ -17,4 +17,6 @@ public class IVFNull implements IndependentVariantFeature {
|
||||||
public String getStudyInfo() {
|
public String getStudyInfo() {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean useZeroQualityReads() { return false; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@ public abstract class RatioFilter implements VariantExclusionCriterion {
|
||||||
rodVariants variant = context.getVariant();
|
rodVariants variant = context.getVariant();
|
||||||
char ref = context.getReferenceContext().getBase();
|
char ref = context.getReferenceContext().getBase();
|
||||||
|
|
||||||
ReadBackedPileup pileup = new ReadBackedPileup(ref, context.getAlignmentContext());
|
ReadBackedPileup pileup = new ReadBackedPileup(ref, context.getAlignmentContext(useZeroQualityReads()));
|
||||||
if ( applyToVariant(variant) ) {
|
if ( applyToVariant(variant) ) {
|
||||||
Pair<Integer, Integer> counts = scoreVariant(ref, pileup, variant);
|
Pair<Integer, Integer> counts = scoreVariant(ref, pileup, variant);
|
||||||
GenotypeFeatureData gfd = dataTable.get(orderedBases(variant.getBestGenotype()));
|
GenotypeFeatureData gfd = dataTable.get(orderedBases(variant.getBestGenotype()));
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ public class VECAlleleBalance implements VariantExclusionCriterion { //extends
|
||||||
char ref = context.getReferenceContext().getBase();
|
char ref = context.getReferenceContext().getBase();
|
||||||
rodVariants variant = context.getVariant();
|
rodVariants variant = context.getVariant();
|
||||||
|
|
||||||
ReadBackedPileup pileup = new ReadBackedPileup(ref, context.getAlignmentContext());
|
ReadBackedPileup pileup = new ReadBackedPileup(ref, context.getAlignmentContext(useZeroQualityReads()));
|
||||||
Pair<Integer, Integer> counts = scoreVariant(ref, pileup, variant);
|
Pair<Integer, Integer> counts = scoreVariant(ref, pileup, variant);
|
||||||
int n = counts.first + counts.second;
|
int n = counts.first + counts.second;
|
||||||
ratio = counts.first.doubleValue() / (double)n;
|
ratio = counts.first.doubleValue() / (double)n;
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@ public class VariantFiltrationWalker extends LocusWalker<Integer, Integer> {
|
||||||
|
|
||||||
if (VERBOSE) { out.println("Original:\n" + variant); }
|
if (VERBOSE) { out.println("Original:\n" + variant); }
|
||||||
|
|
||||||
GenomeLoc loc = context.getAlignmentContext().getLocation();
|
GenomeLoc loc = context.getAlignmentContext(true).getLocation();
|
||||||
paramsWriter.print(loc.getContig() + "\t" + loc.getStart() + "\t");
|
paramsWriter.print(loc.getContig() + "\t" + loc.getStart() + "\t");
|
||||||
|
|
||||||
// Apply features that modify the likelihoods and LOD scores
|
// Apply features that modify the likelihoods and LOD scores
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue