Avoid NaNs in the final output.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3973 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
3f6e44dc71
commit
64446f0ddf
|
|
@ -212,7 +212,11 @@ public class SelectVariants extends RodWalker<Integer, Integer> {
|
|||
|
||||
attributes.put("AC", alleleCount);
|
||||
attributes.put("AN", numberOfAlleles);
|
||||
attributes.put("AF", ((double) alleleCount) / ((double) numberOfAlleles));
|
||||
if (numberOfAlleles == 0) {
|
||||
attributes.put("AF", 0.0);
|
||||
} else {
|
||||
attributes.put("AF", ((double) alleleCount) / ((double) numberOfAlleles));
|
||||
}
|
||||
attributes.put("DP", depth);
|
||||
|
||||
sub = VariantContextUtils.modifyAttributes(sub, attributes);
|
||||
|
|
|
|||
Loading…
Reference in New Issue