diff --git a/src/qpfstats.c b/src/qpfstats.c index b0109dc..18ed9b1 100644 --- a/src/qpfstats.c +++ b/src/qpfstats.c @@ -26,11 +26,12 @@ // (YRI, CEU, Papua, .... ) -#define WVERSION "180" +#define WVERSION "200" // useweight added // allsnps added // doscale NO added +// small bug (error check in dofstats fixed #define MAXFL 50 #define MAXSTR 512 @@ -524,6 +525,12 @@ rintf ("seed: %d\n", seed); printf("*** warning ***\n") ; printf("fstat with no data. Unable to compute heterozygosity?: ") ; printimat(findex[bad], 1, 4) ; + printf("bad quadruple: ") ; + for (k=-0; k<4; ++k) { + a = findex[bad][k] ; + printf(" %s ", eglist[a]) ; + } + printnl() ; } y = cputimes(1, 2) ; @@ -545,9 +552,11 @@ rintf ("seed: %d\n", seed); if (hires) dumpfstatshr(fstatsoutname, ff3, ff3var, eglist, numeg, ind2f, basenum) ; else dumpfstats(fstatsoutname, ff3, ff3var, eglist, numeg, ind2f, basenum) ; -/** + if (details) printf("raw fstat table (before fit): scale: %9.3f\n", lambdascale) ; for (k=0; kignore) + continue; + wt = cupt->weight; + if (wt <= 0.0) + continue; + + bnum = cupt->tagnumber; + if (bnum < 0) continue; + if (bnum>=nblocks) fatalx("logic bug\n") ; + + loadaa (cupt, xindex, xtypes, nrows, numeg); + + + + j = tmin ; + yy = fstatx(fsindex[j]) ; + if (isnan(yy)) fatalx("fstatx bug\n") ; + if (yy < -99) continue ; + yy *= scale ; + ++tt ; + } + verbose = NO ; + +// printf("zzcount: %9.0f %d\n", ymin, tt) ; +// printmat(gbot, 1, nfstats) ; + + } vsp (w2, gbot, 1.0e-10, nfstats); @@ -4560,6 +4606,14 @@ dofstats (double *fbmean, double *fbcovar, double **fbcoeffs, int nbasis, vvd (gtop, gtop, gbot, nfstats); for (j=0; j