diff options
author | Peter Carbonetto | 2017-05-09 12:48:27 -0500 |
---|---|---|
committer | Peter Carbonetto | 2017-05-09 12:48:27 -0500 |
commit | f808355cd7abbadd2fbcc5ff471ba89a12205159 (patch) | |
tree | b5b9bef67de6b04d70a4c8b67b2e464b9aee343f | |
parent | 0f6431e9191acfafc33152a610b87d3d0524c1fe (diff) | |
download | pangemma-f808355cd7abbadd2fbcc5ff471ba89a12205159.tar.gz |
Putatively fixed -Wc++11-narrowing error in io.cpp (see Issue #24).
-rw-r--r-- | Makefile.osx | 2 | ||||
-rw-r--r-- | example/demo.txt | 17 | ||||
-rw-r--r-- | src/io.cpp | 4 |
3 files changed, 12 insertions, 11 deletions
diff --git a/Makefile.osx b/Makefile.osx index efa2e4c..8fcab7b 100644 --- a/Makefile.osx +++ b/Makefile.osx @@ -30,7 +30,7 @@ SRC_DIR = ./src CPP = g++ CPPFLAGS = -F /System/Library/Frameworks -Wall -O3 \ - -I/usr/local/opt/gsl@1/include + -I/usr/local/opt/gsl@1/include -Wc++11-narrowing LIBS = /usr/local/opt/gsl@1/lib/libgsl.a \ /usr/local/opt/gsl@1/lib/libgslcblas.a -lz diff --git a/example/demo.txt b/example/demo.txt index 766d949..3231ddc 100644 --- a/example/demo.txt +++ b/example/demo.txt @@ -1,13 +1,10 @@ -## Detailed description of the data set is available in the online GEMMA user manual -## Each of the following steps may take over one minute to run - - - - - +## Detailed description of the data set is available in the online +## GEMMA user manual. Each of the following steps may take over one +## minute to run. ## To calculate a centered relatedness matrix: -../bin/gemma -g mouse_hs1940.geno.txt.gz -p mouse_hs1940.pheno.txt -a mouse_hs1940.anno.txt -gk -o mouse_hs1940 +../bin/gemma -g mouse_hs1940.geno.txt.gz -p mouse_hs1940.pheno.txt \ + -a mouse_hs1940.anno.txt -gk -o mouse_hs1940 # The estimated relatedness matrix should look like this: 0.3350590 -0.0227226 0.0103535 ... @@ -55,7 +52,9 @@ se(pve) in the null model = 0.032774 ## To perform association tests with a multivariate linear mixed model, for two phenotypes CD8 (column 1) and MCH (column 6): ## Notice that the number of individuals in this analysis is different from that above, so the allele frequencies are different between the two analyses -../bin/gemma -g mouse_hs1940.geno.txt.gz -p mouse_hs1940.pheno.txt -n 1 6 -a mouse_hs1940.anno.txt -k ./output/mouse_hs1940.cXX.txt -lmm -o mouse_hs1940_CD8MCH_lmm +../bin/gemma -g mouse_hs1940.geno.txt.gz -p mouse_hs1940.pheno.txt \ + -n 1 6 -a mouse_hs1940.anno.txt -k ./output/mouse_hs1940.cXX.txt \ + -lmm -o mouse_hs1940_CD8MCH_lmm # The result for top 5 SNPs should look like this: chr rs ps n_miss allele1 allele0 af beta_1 beta_2 Vbeta_1_1 Vbeta_1_2 Vbeta_2_2 p_wald @@ -2160,7 +2160,9 @@ bool ReadFile_bgen(const string &file_bgen, const set<string> &setSnps, const gs uint16_t unzipped_data[3*bgen_N]; if (setSnps.size()!=0 && setSnps.count(rs)==0) { - SNPINFO sInfo={"-9", rs, -9, -9, minor, major, -9, -9, (long int) -9}; + SNPINFO sInfo={"-9", rs, -9, -9, minor, major, + static_cast<size_t>(-9), -9, (long int) -9}; + snpInfo.push_back(sInfo); indicator_snp.push_back(0); if(CompressedSNPBlocks) |