misc cleanup

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5893 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
rpoplin 2011-05-27 16:49:20 +00:00
parent 9e834391fe
commit 2227f49220
1 changed files with 15 additions and 17 deletions

View File

@ -208,18 +208,17 @@ public class VariantDataManager {
private static double decodeAnnotation( final String annotationKey, final VariantContext vc, final boolean jitter ) {
double value;
try {
if( annotationKey.equals("QUAL") ) {
value = vc.getPhredScaledQual();
} else {
try {
value = Double.parseDouble( (String)vc.getAttribute( annotationKey ) );
if (Double.isInfinite(value))
value = Double.NaN;
else
if( Double.isInfinite(value) ) { value = Double.NaN; }
if( jitter && ( annotationKey.equalsIgnoreCase("HRUN") || annotationKey.equalsIgnoreCase("FS") ) ) { // Integer valued annotations must be jittered a bit to work in this GMM
value += -0.25 + 0.5 * GenomeAnalysisEngine.getRandomGenerator().nextDouble();
}
if( annotationKey.equals("HaplotypeScore") && MathUtils.compareDoubles(value, 0.0, 0.0001) == 0 ) { value = -0.2 + 0.4*GenomeAnalysisEngine.getRandomGenerator().nextDouble(); }
}
} catch( final Exception e ) {
value = Double.NaN; // The VQSR works with missing data now by marginalizing over the missing dimension when evaluating clusters.
@ -230,7 +229,6 @@ public class VariantDataManager {
}
}
return value;
}