From bd719f9c06ce017979af6e18501e03ae8b5981db Mon Sep 17 00:00:00 2001 From: kiran Date: Thu, 23 Apr 2009 17:21:58 +0000 Subject: [PATCH] When checking that values are not infinite, also prints out the position so that I know which site was giving the error and I can just go there and debug it. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@502 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/playground/utils/AlleleFrequencyEstimate.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/org/broadinstitute/sting/playground/utils/AlleleFrequencyEstimate.java b/java/src/org/broadinstitute/sting/playground/utils/AlleleFrequencyEstimate.java index 3c25ee803..c84995d27 100755 --- a/java/src/org/broadinstitute/sting/playground/utils/AlleleFrequencyEstimate.java +++ b/java/src/org/broadinstitute/sting/playground/utils/AlleleFrequencyEstimate.java @@ -39,7 +39,7 @@ public class AlleleFrequencyEstimate { public AlleleFrequencyEstimate(GenomeLoc location, char ref, char alt, int N, double qhat, double qstar, double lodVsRef, double lodVsNextBest, double pBest, double pRef, int depth, String bases, double[][] quals, double[] posteriors) { - if( Double.isNaN(lodVsRef)) { System.out.printf("lodVsRef is NaN\n"); } + if( Double.isNaN(lodVsRef)) { System.out.printf("%s: lodVsRef is NaN\n", location.toString()); } if( Double.isNaN(lodVsNextBest)) { System.out.printf("lodVsNextBest is NaN\n"); } if( Double.isNaN(qhat)) { System.out.printf("qhat is NaN\n"); } if( Double.isNaN(qstar)) { System.out.printf("qstar is NaN\n"); } @@ -48,7 +48,7 @@ public class AlleleFrequencyEstimate { if( Double.isInfinite(lodVsRef)) { - System.out.printf("lodVsRef is Infinite: %c %s\n", ref, bases); + System.out.printf("lodVsRef is Infinite: %s %c %s\n", location.toString(), ref, bases); for (int i = 0; i < posteriors.length; i++) { System.out.printf("POSTERIOR %d %f\n", i, posteriors[i]);