Skip to content

Commit

Permalink
Added Landau / exact HMP implementation; updated licenses; added deta…
Browse files Browse the repository at this point in the history
…iled references
  • Loading branch information
corbinq committed Aug 27, 2019
1 parent daf86e3 commit 9a82de2
Show file tree
Hide file tree
Showing 38 changed files with 823 additions and 19 deletions.
21 changes: 21 additions & 0 deletions LICENCES
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

Subdirectories within src/ include code and source files from several other open-source projects. I am grateful to the individuals who developed these resources and made them available to the open source software community.

Code and source files within these subdirectories are subject to the licenses issued by the original authors rather than the license for GAMBIT primary source files. These licenses are included separately within each subdirectory.

Distribution functions (cdflib/, eigenmvn/, ROOT_Math/, libMvtnorm/):
* cdflib is from https://people.sc.fsu.edu/~jburkardt/cpp_src/cdflib/cdflib.html
* eigenmvn.hpp is used from https://github.com/beniz/eigenmvn
* libMvtnorm is used from https://github.com/zhanxw/libMvtnorm
* ROOT_Math/ code is adapted from CERN ROOT library https://root.cern.ch/

Hopscotch hashing (tsl/):
* tsl is from https://github.com/Tessil/hopscotch-map

Eigen matrix library (Eigen/):
* Source files are from http://eigen.tuxfamily.org

Tabix and HTSLIB (htslib/ and tabixpp/):
* tabixpp/ source files are adapted from https://github.com/ekg/tabixpp
* htslib/ source files are from HTSLIB: https://github.com/samtools/htslib

11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
VERSION=0.2
VERSION=0.3

CPPFLAGS= -Ofast -flto -pipe
CPPFLAGS= -Ofast -flto -pipe -I$(cdir)/src/htslib -I$(cdir)/src/cdflib -I$(cdir)/src/tabixpp -L$(cdir)/src/htslib -L$(cdir)/src/cdflib -L$(cdir)/src/tabixpp
CXXFLAGS= -std=c++11 -DNDEBUG
FFLAGS=

LDFLAGS= -lz -lm

cppsrc = $(wildcard src/*.cpp) src/tabix_util/tabix.cpp
csrc = $(wildcard src/*.c) src/tabix_util/index.c src/tabix_util/bgzf.c
cppsrc = $(wildcard src/*.cpp) $(wildcard src/ROOT_Math/*.cpp) $(wildcard src/cdflib/*.cpp) $(wildcard src/tabixpp/*.cpp)
csrc = $(wildcard src/*.c) src/htslib/bgzf.c src/htslib/kstring.c src/htslib/knetfile.c src/htslib/index.c

objs = $(cppsrc:.cpp=.o) $(csrc:.c=.o)

cdir = ${CURDIR}

bin/GAMBIT: $(objs) src/libMvtnorm/libMvtnorm.a
$(CXX) $(CPPFLAGS) -o $@ $^ $(LDFLAGS)

Expand Down
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,32 @@ UTR UTR5 Utr5
```

- **Window size.** The window size for dTSS-weighted gene-based tests can be modified by specifying `--tss-window BASEPAIRS` (500 Kbp by default).
- **dTSS decay function.** The relative weight assigned to variants nearer/farther from the TSS can be modified by specifying `--tss-alpha ALPHA`, where alpha=0 implies all variants receive equal weight, and larger values confer more weight to variants nearer the TSS. `--tss-alpha` also accepts comma-separated lists of alpha values, in which case GAMBIT computes ombinbus test p-values across all specified values (individual p-values are reported in `INFO` output field). By default, GAMBIT uses dTSS alpha values `1e-4,5e-5,1e-5,5e-6`.
- **dTSS decay function.** The relative weight assigned to variants nearer/farther from the TSS can be modified by specifying `--tss-alpha ALPHA`, where alpha=0 implies all variants receive equal weight, and larger values confer more weight to variants nearer the TSS. `--tss-alpha` also accepts comma-separated lists of alpha values, in which case GAMBIT computes global test p-values across all specified values (individual p-values are reported in `INFO` output field). By default, GAMBIT uses dTSS alpha values `1e-4,5e-5,1e-5,5e-6`.

## Methods References

Statistical methods implemented in GAMBIT:
- Sequence Kernel Association Test (SKAT): [Wu et al. (2011), *AJHG*](https://doi.org/10.1016/j.ajhg.2011.05.029)
- TWAS: [Gusev et al. (2016), *Nat Genet*](https://www.nature.com/articles/ng.3506)
- PrediXcan: [Gamazon et al. (2015), *Nat Genet*](https://www.nature.com/articles/ng.3367) and [Barbeira et al. (2018), *Nat Comm*](https://www.nature.com/articles/s41467-018-03621-1)
- Aggregated Cauchy Association Test (ACAT): [Liu et al. (2019), *AJHG*](https://doi.org/10.1016/j.ajhg.2019.01.002) and [Liu and Xie (2018), *arXiv*](https://arxiv.org/abs/1808.09011)
- Asymptotically exact Harmonic Mean P-value (HMP): [Wilson (2019), *PNAS*](https://doi.org/10.1073/pnas.1814092116)

## Software References

Libraries and resources used or adapted in GAMBIT:
**PDF, CDF, and quantile functions**
- [CDFLIB, Brown et al.](https://people.sc.fsu.edu/~jburkardt/cpp_src/cdflib/cdflib.html)
- [eigenmvn, Benazera et al.](https://github.com/beniz/eigenmvn)
- [libMvtnorm, Zhan et al.](https://github.com/zhanxw/libMvtnorm)
- [CERN's ROOT system library](https://root.cern.ch/)
**Hopscotch hashing**
- [tsl library, Tessil et al.](https://github.com/Tessil/hopscotch-map)
**Tabix and HTSLIB**
- [tabixpp, ekg et al.](https://github.com/ekg/tabixpp)
- [htslib, samtools team](https://github.com/samtools/htslib)
**Matrix libraries**
- [Eigen matrix library](http://eigen.tuxfamily.org)

## Feedback and bug reports

Expand Down
Binary file added bin/GAMBIT
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int main (int argc, char *argv[]) {
string dfile = "";
string afile = "";
string sfile = "";
string ldfile = "/net/snowwhite/home/corbinq/panels/G1K_EUR_3V5/chr$.vcf.gz";
string ldfile = "G1K_EUR_3V5/chr$.vcf.gz";
string outfile = "";
string tfile = "";
string tssfile = "";
Expand Down
Loading

0 comments on commit 9a82de2

Please sign in to comment.