Cleaned up this annotation.

Still experimental.  As of now, it's not useful.  More analysis is needed to determine how to handle cases where UG is unsure whether a sample is het or hom.



git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2442 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2009-12-24 03:06:46 +00:00
parent 6df40876a3
commit aaf674d9db
1 changed files with 9 additions and 1 deletions

View File

@ -30,6 +30,11 @@ public class HardyWeinberg implements VariantAnnotation {
for ( Genotype genotype : genotypes ) {
if ( genotype.isNoCall() )
continue;
// TODO - fix me:
// Right now we just ignore genotypes that are not confident, but this throws off
// our HW ratios. More analysis is needed to determine the right thing to do when
// the genotyper cannot decide whether a given sample is het or hom var.
if ( genotype.getNegLog10PError() < MIN_NEG_LOG10_PERROR )
continue;
@ -41,8 +46,11 @@ public class HardyWeinberg implements VariantAnnotation {
homCount++;
}
if ( refCount + hetCount + homCount == 0)
return null;
double pvalue = HardyWeinbergCalculation.hwCalculate(refCount, hetCount, homCount);
System.out.println(refCount + " " + hetCount + " " + homCount + " " + pvalue);
//System.out.println(refCount + " " + hetCount + " " + homCount + " " + pvalue);
return String.format("%.1f", QualityUtils.phredScaleErrorRate(pvalue));
}