Index: head/biology/bolt-lmm/Makefile =================================================================== --- head/biology/bolt-lmm/Makefile (revision 508134) +++ head/biology/bolt-lmm/Makefile (revision 508135) @@ -1,45 +1,46 @@ # $FreeBSD$ PORTNAME= bolt-lmm DISTVERSION= 2.3.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= biology MASTER_SITES= https://data.broadinstitute.org/alkesgroup/BOLT-LMM/downloads/ DISTNAME= BOLT-LMM_v${PORTVERSION} MAINTAINER= jwb@FreeBSD.org COMMENT= Mixed model association testing and variance component analysis LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/license.txt LIB_DEPENDS= libnlopt.so:math/nlopt \ libopenblas.so:math/openblas \ libboost_program_options.so:devel/boost-libs # gcc-c++11-lib needed to link with boost. Also requires compiler:openmp, but # both merely add a GCC requirement. USES= compiler:gcc-c++11-lib gmake BUILD_WRKSRC= ${WRKDIR}/${DISTNAME}/src INSTALL_WRKSRC= ${WRKDIR}/${DISTNAME}/src CXXFLAGS_i386= -DUSE_SSE -msse -msse2 CXXFLAGS_amd64= -DUSE_SSE +CXXFLAGS_powerpc64= -DNO_WARN_X86_INTRINSICS -mvsx PORTEXAMPLES= * OPTIONS_DEFINE= EXAMPLES pre-configure: @${RM} ${WRKSRC}/example/*.orig ${WRKSRC}/bolt @${REINPLACE_CMD} -e 's|tables/|${DATADIR}/tables/|g' \ ${BUILD_WRKSRC}/BoltParams.cpp @${REINPLACE_CMD} -e 's|../tables/|${DATADIR}/tables/|g' \ ${WRKSRC}/example/run_example.sh do-install: ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/bolt ${STAGEDIR}${PREFIX}/bin (cd ${WRKSRC}/example && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}) (cd ${WRKSRC} && ${COPYTREE_SHARE} tables ${STAGEDIR}${DATADIR}) .include Index: head/biology/bolt-lmm/files/patch-src_Jackknife.cpp =================================================================== --- head/biology/bolt-lmm/files/patch-src_Jackknife.cpp (nonexistent) +++ head/biology/bolt-lmm/files/patch-src_Jackknife.cpp (revision 508135) @@ -0,0 +1,13 @@ +--- src/Jackknife.cpp.orig 2019-08-03 00:15:27 UTC ++++ src/Jackknife.cpp +@@ -28,8 +28,8 @@ namespace Jackknife { + using std::make_pair; + + double stddev(const vector &x, int n) { +- for (int i = 0; i < n; i++) if (isnan(x[i])) return NAN; +- for (int i = 0; i < n; i++) if (isinf(x[i])) return INFINITY; ++ for (int i = 0; i < n; i++) if (std::isnan(x[i])) return NAN; ++ for (int i = 0; i < n; i++) if (std::isinf(x[i])) return INFINITY; + double s = 0.0, s2 = 0.0; + for (int i = 0; i < n; i++) { + s += x[i]; Property changes on: head/biology/bolt-lmm/files/patch-src_Jackknife.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/biology/bolt-lmm/files/patch-src_LDscoreCalibration.cpp =================================================================== --- head/biology/bolt-lmm/files/patch-src_LDscoreCalibration.cpp (nonexistent) +++ head/biology/bolt-lmm/files/patch-src_LDscoreCalibration.cpp (revision 508135) @@ -0,0 +1,24 @@ +--- src/LDscoreCalibration.cpp.orig 2019-08-03 00:18:05 UTC ++++ src/LDscoreCalibration.cpp +@@ -201,8 +201,8 @@ namespace LDscoreCalibration { + snps[m].MAF >= minMAF && // MAF threshold + statsRef[m] > 0 && // ref stat available + statsCur[m] > 0 && // cur stat available +- !isnan(LDscores[m]) && // LD Score available +- !isnan(LDscoresChip[m]); // LD Score weight available ++ !std::isnan(LDscores[m]) && // LD Score available ++ !std::isnan(LDscoresChip[m]); // LD Score weight available + + // perform outlier removal + double outlierChisqThresh = std::max(MIN_OUTLIER_CHISQ_THRESH, N * outlierVarFracThresh); +@@ -256,8 +256,8 @@ namespace LDscoreCalibration { + maskSnps[m] = + snps[m].MAF >= minMAF && // MAF threshold + stats[m] > 0 && // stat available +- !isnan(LDscores[m]) && // LD Score available +- !isnan(LDscoresChip[m]); // LD Score weight available ++ !std::isnan(LDscores[m]) && // LD Score available ++ !std::isnan(LDscoresChip[m]); // LD Score weight available + + // perform outlier removal + double outlierChisqThresh = std::max(MIN_OUTLIER_CHISQ_THRESH, N * outlierVarFracThresh); Property changes on: head/biology/bolt-lmm/files/patch-src_LDscoreCalibration.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/biology/bolt-lmm/files/patch-src_SnpData.cpp =================================================================== --- head/biology/bolt-lmm/files/patch-src_SnpData.cpp (nonexistent) +++ head/biology/bolt-lmm/files/patch-src_SnpData.cpp (revision 508135) @@ -0,0 +1,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++; + } Property changes on: head/biology/bolt-lmm/files/patch-src_SnpData.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/biology/bolt-lmm/files/patch-src_StatsUtils.cpp =================================================================== --- head/biology/bolt-lmm/files/patch-src_StatsUtils.cpp (nonexistent) +++ head/biology/bolt-lmm/files/patch-src_StatsUtils.cpp (revision 508135) @@ -0,0 +1,13 @@ +--- src/StatsUtils.cpp.orig 2019-08-03 00:24:37 UTC ++++ src/StatsUtils.cpp +@@ -33,8 +33,8 @@ namespace StatsUtils { + if (n <= 1) return NAN; + double s = 0.0, s2 = 0.0; + for (uint64 i = 0; i < n; i++) { +- if (isnan(x[i])) return NAN; +- if (isinf(x[i])) return INFINITY; ++ if (std::isnan(x[i])) return NAN; ++ if (std::isinf(x[i])) return INFINITY; + s += x[i]; + s2 += x[i]*x[i]; + } Property changes on: head/biology/bolt-lmm/files/patch-src_StatsUtils.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/biology/bolt-lmm/files/patch-src_Timer.cpp =================================================================== --- head/biology/bolt-lmm/files/patch-src_Timer.cpp (nonexistent) +++ head/biology/bolt-lmm/files/patch-src_Timer.cpp (revision 508135) @@ -0,0 +1,22 @@ +--- src/Timer.cpp.orig 2019-08-03 00:25:18 UTC ++++ src/Timer.cpp +@@ -35,7 +35,19 @@ double Timer::update_time(void) { + + unsigned long long Timer::rdtsc(void) { + unsigned int hi, lo; ++#ifdef __amd64__ + __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi)); ++#elif __powerpc__ ++ unsigned int tmp; ++ __asm__ ("0:" ++ "mftbu %[hi32]\n" ++ "mftb %[lo32]\n" ++ "mftbu %[tmp]\n" ++ "cmpw %[tmp],%[hi32]\n" ++ "bne 0b\n" ++ : [hi32] "=r"(hi), [lo32] "=r"(lo), ++ [tmp] "=r"(tmp)); ++#endif + return ((unsigned long long) lo) | (((unsigned long long) hi)<<32); + } + Property changes on: head/biology/bolt-lmm/files/patch-src_Timer.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property