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
This commit is contained in:
kiran 2009-04-23 17:21:58 +00:00
parent efba30f1a1
commit bd719f9c06
1 changed files with 2 additions and 2 deletions

View File

@ -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]);