From 60b90f95148f971cae7d65e5f6642bc8e9d29d6f Mon Sep 17 00:00:00 2001 From: Joshua C. Randall Date: Thu, 30 Oct 2014 16:40:20 +0000 Subject: makes dist tar file not explode into ./ --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 987e2e6..b26e4ca 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ WITH_LAPACK = 1 FORCE_32BIT = FORCE_DYNAMIC = FORCE_FLOAT = +DIST_NAME = gemma-0.95alpha # -------------------------------------------------------------------- # Edit below this line with caution @@ -106,6 +107,14 @@ $(OBJS) : $(HDR) clean: rm -rf ${SRC_DIR}/*.o ${SRC_DIR}/*~ *~ ${SRC_DIR}/*_float.* + +DIST_COMMON = COPYING.txt README.txt Makefile +DIST_SUBDIRS = src doc example bin + tar: - tar cvzf gemma-0.93.tar.gz COPYING.txt README.txt Makefile src doc example bin + mkdir -p ./$(DIST_NAME) + cp $(DIST_COMMON) ./$(DIST_NAME)/ + cp -r $(DIST_SUBDIRS) ./$(DIST_NAME)/ + tar cvzf $(DIST_NAME).tar.gz ./$(DIST_NAME)/ + rm -r ./$(DIST_NAME) -- cgit v1.2.3 From 5d393032004e89136cc02053d8fa00759514223b Mon Sep 17 00:00:00 2001 From: Joshua Randall Date: Thu, 30 Oct 2014 18:03:10 +0000 Subject: Adds .gitignore file Ignores built .o files, anything in bin/, and the .tar.gz dist files --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index e69de29..7ee1240 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,4 @@ +.gitignore +*.o +*.tar.gz +bin/ -- cgit v1.2.3 From fa85b909b16bcc7ecb940a7ec5b2ce6aea83a33b Mon Sep 17 00:00:00 2001 From: Joshua Randall Date: Thu, 30 Oct 2014 18:08:33 +0000 Subject: Removes bin/gemma from source control --- bin/gemma | Bin 4823751 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100755 bin/gemma diff --git a/bin/gemma b/bin/gemma deleted file mode 100755 index 6734240..0000000 Binary files a/bin/gemma and /dev/null differ -- cgit v1.2.3 From 218f321bacab9c21ee630ad784697e6ee4a14f99 Mon Sep 17 00:00:00 2001 From: xiangzhou Date: Thu, 30 Oct 2014 14:17:37 -0400 Subject: version 0.95alpha --- src/io.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/io.cpp b/src/io.cpp index c22f668..7ed95c4 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -563,11 +563,12 @@ bool ReadFile_geno (const string &file_geno, const set &setSnps, const g if (flag_poly!=1) {indicator_snp.push_back(0); continue;} - if (hwe_level!=0) { + if (hwe_level!=0 && maf_level!=-1) { if (CalcHWE(n_0, n_2, n_1)size; ++i) { if (gsl_vector_get (genotype_miss, i)==1) {geno=maf*2.0; gsl_vector_set (genotype, i, geno);} } @@ -577,7 +578,7 @@ bool ReadFile_geno (const string &file_geno, const set &setSnps, const g gsl_blas_ddot (genotype, genotype, &v_x); gsl_blas_ddot (Wtx, WtWiWtx, &v_w); - if (v_w/v_x >= r2_level) {indicator_snp.push_back(0); continue;} + if (W->size2!=1 && v_w/v_x >= r2_level) {indicator_snp.push_back(0); continue;} indicator_snp.push_back(1); ns_test++; @@ -698,12 +699,13 @@ bool ReadFile_bed (const string &file_bed, const set &setSnps, const gsl if ( (n_0+n_1)==0 || (n_1+n_2)==0 || (n_2+n_0)==0) {indicator_snp.push_back(0); continue;} - if (hwe_level!=1) { + if (hwe_level!=1 && maf_level!=-1) { if (CalcHWE(n_0, n_2, n_1)size; ++i) { if (gsl_vector_get (genotype_miss, i)==1) {geno=maf*2.0; gsl_vector_set (genotype, i, geno);} } @@ -713,7 +715,7 @@ bool ReadFile_bed (const string &file_bed, const set &setSnps, const gsl gsl_blas_ddot (genotype, genotype, &v_x); gsl_blas_ddot (Wtx, WtWiWtx, &v_w); - if (v_w/v_x > r2_level) {indicator_snp.push_back(0); continue;} + if (W->size2!=1 && v_w/v_x > r2_level) {indicator_snp.push_back(0); continue;} indicator_snp.push_back(1); ns_test++; -- cgit v1.2.3 From a58ae0718095fb47e6071211c23a8bf8408ec6f6 Mon Sep 17 00:00:00 2001 From: Joshua Randall Date: Thu, 30 Oct 2014 18:19:55 +0000 Subject: Fixes dynamic compilation Fixes dynamic compilation on systems where -lblas is required for symbols such as `dgemm_` --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 987e2e6..1caabe9 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,11 @@ CPP = g++ CPPFLAGS = -Wall -O3 +ifdef FORCE_DYNAMIC +LIBS = -lgsl -lgslcblas -lblas -pthread -lz +else LIBS = -lgsl -lgslcblas -pthread -lz +endif OUTPUT = $(BIN_DIR)/gemma -- cgit v1.2.3