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:
parent
6df40876a3
commit
aaf674d9db
|
|
@ -30,6 +30,11 @@ public class HardyWeinberg implements VariantAnnotation {
|
||||||
for ( Genotype genotype : genotypes ) {
|
for ( Genotype genotype : genotypes ) {
|
||||||
if ( genotype.isNoCall() )
|
if ( genotype.isNoCall() )
|
||||||
continue;
|
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 )
|
if ( genotype.getNegLog10PError() < MIN_NEG_LOG10_PERROR )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
@ -41,8 +46,11 @@ public class HardyWeinberg implements VariantAnnotation {
|
||||||
homCount++;
|
homCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( refCount + hetCount + homCount == 0)
|
||||||
|
return null;
|
||||||
|
|
||||||
double pvalue = HardyWeinbergCalculation.hwCalculate(refCount, hetCount, homCount);
|
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));
|
return String.format("%.1f", QualityUtils.phredScaleErrorRate(pvalue));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue