-Added mapping quality zero filter
-Set some reasonable defaults (based on pilot2) git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1388 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
bbd7bec5db
commit
4c1fa52ddf
|
|
@ -10,7 +10,8 @@ import org.broadinstitute.sting.utils.GenotypeUtils;
|
|||
public class VECAlleleBalance implements VariantExclusionCriterion { //extends RatioFilter {
|
||||
//final private static GenotypeFeatureData.Tail tail = GenotypeFeatureData.Tail.TwoTailed;
|
||||
private boolean exclude;
|
||||
private double lowThreshold, highThreshold, ratio;
|
||||
private double lowThreshold = 0.1, highThreshold = 0.85;
|
||||
private double ratio;
|
||||
|
||||
public void initialize(String arguments) {
|
||||
if (arguments != null && !arguments.isEmpty()) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
package org.broadinstitute.sting.playground.gatk.walkers.variants;
|
||||
|
||||
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
||||
import org.broadinstitute.sting.gatk.refdata.rodVariants;
|
||||
import org.broadinstitute.sting.utils.MathUtils;
|
||||
import net.sf.samtools.SAMRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class VECMappingQualityZero implements VariantExclusionCriterion {
|
||||
private int maximum = 50;
|
||||
private int mq0Count;
|
||||
private boolean exclude;
|
||||
|
||||
public void initialize(String arguments) {
|
||||
if (arguments != null && !arguments.isEmpty()) {
|
||||
maximum = Integer.valueOf(arguments);
|
||||
}
|
||||
}
|
||||
|
||||
public void compute(char ref, AlignmentContext context, rodVariants variant) {
|
||||
List<SAMRecord> reads = context.getReads();
|
||||
mq0Count = 0;
|
||||
for (int i=0; i < reads.size(); i++) {
|
||||
if ( reads.get(i).getMappingQuality() == 0 )
|
||||
mq0Count++;
|
||||
}
|
||||
exclude = mq0Count > maximum;
|
||||
}
|
||||
|
||||
public boolean isExcludable() {
|
||||
return exclude;
|
||||
}
|
||||
|
||||
public String getStudyHeader() {
|
||||
return "MappingQualityZero("+maximum+")\tMQ0_count";
|
||||
}
|
||||
|
||||
public String getStudyInfo() {
|
||||
return (exclude ? "fail" : "pass") + "\t" + mq0Count;
|
||||
}
|
||||
|
||||
public boolean useZeroQualityReads() { return true; }
|
||||
}
|
||||
|
|
@ -7,7 +7,8 @@ import org.broadinstitute.sting.utils.*;
|
|||
public class VECOnOffGenotypeRatio implements VariantExclusionCriterion { // extends RatioFilter {
|
||||
//final private static GenotypeFeatureData.Tail tail = GenotypeFeatureData.Tail.LeftTailed;
|
||||
private boolean exclude;
|
||||
private double threshold, ratio;
|
||||
private double threshold = 0.0;
|
||||
private double ratio;
|
||||
|
||||
public void initialize(String arguments) {
|
||||
if (arguments != null && !arguments.isEmpty()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue