1. Discoverable base calculations don't care about Genotypes (use Variation's PError regardless of whether the call is ref or var - it's the correct value even for ref calls).
2. Call a base genotypable if any of the Genotypes is above the threshold (you can't assume there's a single Genotype associated with the Variation). git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2306 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
a45adadf1f
commit
0fae798b3a
|
|
@ -68,15 +68,18 @@ public class CallableBasesAnalysis extends BasicVariantAnalysis implements Genot
|
||||||
// For every threshold, updated discoverable and callable
|
// For every threshold, updated discoverable and callable
|
||||||
for (int i = 0; i < thresholds.length; i++) {
|
for (int i = 0; i < thresholds.length; i++) {
|
||||||
double threshold = thresholds[i];
|
double threshold = thresholds[i];
|
||||||
Genotype genotype = ((VariantBackedByGenotype)eval).getCalledGenotype();
|
|
||||||
|
|
||||||
// update discoverable
|
// update discoverable
|
||||||
if ( eval.isSNP() && eval.getNegLog10PError() >= threshold)
|
if ( eval.getNegLog10PError() >= threshold )
|
||||||
discoverable_bases[i]++;
|
discoverable_bases[i]++;
|
||||||
if ( eval.isReference() && genotype.getNegLog10PError() >= threshold)
|
|
||||||
discoverable_bases[i]++;
|
List<Genotype> genotypes = ((VariantBackedByGenotype)eval).getGenotypes();
|
||||||
if ( genotype.getNegLog10PError() >= threshold)
|
for ( Genotype g : genotypes ) {
|
||||||
genotypable_bases[i]++;
|
if ( g.getNegLog10PError() >= threshold ) {
|
||||||
|
genotypable_bases[i]++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue