From 449d882a3b33ef81ef4f0127c3932b01fa796dbb Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 3 Aug 2017 10:26:52 +0000 Subject: LOCO is implemented in GEMMA for the BIMBAM format. Pass in the -loco 1 switch for LOCO of chromosome 1. What are the use cases? 1. User runs vanilla GEMMA: all SNPs are considered input for GWA and K 2. User passes in -snps: all these SNPs are considered for GWA and K 3. User passes in -snps and -ksnps: All these SNPs are used for GWA, Ksnps are used for K 4. User passes in -loco: SNPs are split by chromosome (GWA incl., K excl.) 5. User passes in -snps, -gwasnps and -ksnps could mean that also GWA is subset explicitely (nyi) In all cases indicator_snp is honored and we get the most flexible way for studying SNP combinations that can be passed in in different ways. Overall added: - various comments in source code - tests in test framework inlc. fast-check - NDEBUG compilation support in the Makefile - -debug switch for GEMMA debug output - debug.h which includes enforce functions which work like assert. Unlike assert, enforce also works in release compilation - -nind switch limit the number of individuals used (trim_individuals for testing) - enforcing tests of input files - e.g. are number of individuals correct - checks for memory allocation - we should add more of those - more checks for gsl results - we should add more of those - replaced strtoken with regex as a first case. They should all be replaced. strtoken is not thread safe, for one. - introduced C++ iterators - introduced C++ closure in BimBam LMM for cached processing - more localized initialization of variables - makes for demonstratably more correct code - -ksnps adds snps into setKSnps - -gwasnps adds snps into setGWASnps - both sets are computed by -loco - attempted to make the code easier to read --- INSTALL.md | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'INSTALL.md') diff --git a/INSTALL.md b/INSTALL.md index e60a25a..eb75a09 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -19,6 +19,8 @@ dependencies: * [Eigen library](http://eigen.tuxfamily.org/dox/) * zlib +See below for installation on Guix. + ## Install GEMMA ### Bioconda @@ -38,31 +40,41 @@ using the following command guix package -i gemma +To install the build tools with GNU Guix + + guix package -i make gcc linux-libre-headers gsl eigen openblas lapack glibc ld-wrapper + ### Install from source Install listed dependencies and run - make + make -j 4 + +(the -j switch builds on 4 cores). if you get an Eigen error you may need to override the include -path. E.g. on GNU Guix with shared libs this may work +path. E.g. on GNU Guix with shared libs and DEBUG the following may +work - make EIGEN_INCLUDE_PATH=~/.guix-profile/include/eigen3 FORCE_DYNAMIC=1 WITH_OPENBLAS=1 + make EIGEN_INCLUDE_PATH=~/.guix-profile/include/eigen3 FORCE_DYNAMIC=1 WITH_OPENBLAS=1 DEBUG=1 to run GEMMA tests - make check + time make check -## Run tests +You can run gemma in the debugger with, for example -GEMMA uses the shunit2 test framework (version 2.0) and can be found -[here](https://github.com/genenetwork/shunit2) + gdb --args \ + ./bin/gemma -g example/mouse_hs1940.geno.txt.gz \ + -p example/mouse_hs1940.pheno.txt -a example/mouse_hs1940.anno.txt \ + -snps example/snps.txt -nind 400 -loco 1 -gk -debug -o myoutput -In the source tree: +Other options, such as compiling with warnings, are listed in the +Makefile. - git clone https://github.com/genenetwork/shunit2 contrib/shunit2 +## Run tests -and run +GEMMA includes the shunit2 test framework (version 2.0). make check -- cgit v1.2.3