GenotypeConcordance log file -- if provided, GC module will write FN/FP information to this file by context

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4036 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
depristo 2010-08-14 18:35:57 +00:00
parent 0d209d5442
commit 61064d7075
2 changed files with 13 additions and 3 deletions

View File

@ -314,9 +314,15 @@ public class GenotypeConcordance extends VariantEvaluator implements StandardEva
for (final String sample : validation.getSampleNames()) {
final Genotype.Type truth = validation.getGenotype(sample).getType();
sampleStats.incrValue(sample, truth, called);
if ( (truth == Genotype.Type.HOM_VAR || truth == Genotype.Type.HET) && called == Genotype.Type.NO_CALL ) {
if ( PRINT_INTERESTING_SITES && super.getVEWalker().printInterestingSites() )
;//System.out.printf("%s: HM3 FN => %s%n", group, validation);
// print out interesting sites
if ( PRINT_INTERESTING_SITES && super.getVEWalker().gcLog != null ) {
if ( (truth == Genotype.Type.HOM_VAR || truth == Genotype.Type.HET) && called == Genotype.Type.NO_CALL ) {
super.getVEWalker().gcLog.printf("%s FN %s%n", group, validation);
}
if ( (called == Genotype.Type.HOM_VAR || called == Genotype.Type.HET) && truth == Genotype.Type.HOM_REF ) {
super.getVEWalker().gcLog.printf("%s FP %s%n", group, validation);
}
}
}
}

View File

@ -54,6 +54,7 @@ import org.broadinstitute.sting.utils.text.XReadLines;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
@ -158,6 +159,9 @@ public class VariantEvalWalker extends RodWalker<Integer, Integer> {
@Argument(shortName="outputVCF", fullName="InterestingSitesVCF", doc="If provided, interesting sites emitted to this vcf and the INFO field annotated as to why they are interesting", required=false)
protected String outputVCF = null;
@Argument(shortName="gcLog", fullName="GenotypeCocordanceLog", doc="If provided, sites with genotype concordance problems (e.g., FP and FNs) will be emitted ot this file", required=false)
protected PrintStream gcLog = null;
private static double NO_MIN_QUAL_SCORE = -1.0;
@Argument(shortName = "Q", fullName="minPhredConfidenceScore", doc="Minimum confidence score to consider an evaluation SNP a variant", required=false)
public double minQualScore = NO_MIN_QUAL_SCORE;