Correctly ignore filtered calls and indel calls in the truth sets

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3101 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
rpoplin 2010-03-31 14:33:01 +00:00
parent b60197ae10
commit d58fe70708
1 changed files with 7 additions and 5 deletions

View File

@ -118,11 +118,13 @@ public class VariantConcordanceROCCurveWalker extends RodWalker<ExpandingArrayLi
for( final VariantContext vc : tracker.getAllVariantContexts(null, context.getLocation(), false, false) ) {
if( vc != null && vc.getName().toUpperCase().startsWith("TRUTH") ) {
if( !vc.getGenotype(sampleName).isNoCall() ) {
isInTruthSet = true;
if( vc.isSNP() && !vc.isFiltered() ) {
if( !vc.getGenotype(sampleName).isNoCall() ) {
isInTruthSet = true;
if( !vc.getGenotype(sampleName).isHomRef() ) {
isTrueVariant = true;
if( !vc.getGenotype(sampleName).isHomRef() ) {
isTrueVariant = true;
}
}
}
//if( vc.isPolymorphic() ) { //BUGBUG: I don't think this is the right thing to do here, there are many polymorphic sites in the truth data because there are many samples
@ -257,7 +259,7 @@ public class VariantConcordanceROCCurveWalker extends RodWalker<ExpandingArrayLi
final double sensitivity = ((double) truePos[curveIndex]) / ((double) truePos[curveIndex] + falseNegGlobal[curveIndex] + falseNeg[curveIndex]);
final double specificity = ((double) trueNegGlobal[curveIndex] + trueNeg[curveIndex]) /
((double) falsePos[curveIndex] + trueNegGlobal[curveIndex] + trueNeg[curveIndex]);
outputFile.print( String.format("%.4f,%.4f,%.4f,", qualCut[curveIndex], sensitivity, 1.0 - specificity) );
outputFile.print( String.format("%.8f,%.8f,%.8f,", qualCut[curveIndex], sensitivity, 1.0 - specificity) );
qualCut[curveIndex] += incrementQual[curveIndex];
curveIndex++;
}