summaryrefslogtreecommitdiff
path: root/biology/bolt-lmm/files/patch-src_SnpData.cpp
blob: 5763ee62879c59f31e3139d17d4147bf14d6f672 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- src/SnpData.cpp.orig	2019-08-03 00:23:17 UTC
+++ src/SnpData.cpp
@@ -996,7 +996,7 @@ namespace LMM {
     for (int w = 0; w < W; w++)
       if (isProximal(m, mp, windows[w].first, windows[w].second)) {
 	foundProximal = true;
-	if (!isnan(r2)) {
+	if (!std::isnan(r2)) {
 	  for (int a = 0; a < A; a++) {
 	    double weight = pow((snps[mp].MAF * (1-snps[mp].MAF)), alphaMAFdeps[a]);
 	    LDscores[w*A+a] += weight * r2;
@@ -1048,7 +1048,7 @@ namespace LMM {
       if (snps[mp].chrom != snps[m].chrom) {
 	fillSnpRow(&mpRow[0], mp);
 	double r2 = compute_r2(&mRow[0], &mpRow[0], Nstride);
-	if (!isnan(r2)) {
+	if (!std::isnan(r2)) {
 	  totOffChrom_r2s += r2;
 	  numOffChrom_r2s++;
 	}