bio-gemma-wrapper 0.0.1 → 0.92.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +36 -8
- data/VERSION +1 -1
- data/bin/gemma-wrapper +43 -10
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5750dc833b64764d55eaec57f9ce981302659b9
|
4
|
+
data.tar.gz: f8ebc55f80ca39d84f03f4bae4385212aa5e35f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 634361cf98042f4653d3ea4bd19d883ec08f7a1edff5f7c44935b4ef58d0b17d007451a23f7304ae29dd08c477549459b3d0cb2bcbda3060a6641d9ad665d012
|
7
|
+
data.tar.gz: 55f75d9a5208595e5f3ff1dffd530f17f4fdb3040c2311ea993d69b1c21001673d3825015d5e4ec327d450225470d078b46f2db84a364d27bdbcbd5852741404
|
data/README.md
CHANGED
@@ -30,7 +30,35 @@ Prerequisites are
|
|
30
30
|
* Standard [Ruby >2.0 ](https://www.ruby-lang.org/en/) which comes on
|
31
31
|
almost all Linux systems
|
32
32
|
|
33
|
-
|
33
|
+
gemma-wrapper comes as a Ruby [gem](https://rubygems.org/gems/bio-gemma-wrapper) and
|
34
|
+
can be installed with
|
35
|
+
|
36
|
+
gem install bio-gemma-wrapper
|
37
|
+
|
38
|
+
Invoke the tool with
|
39
|
+
|
40
|
+
gemma-wrapper --help
|
41
|
+
|
42
|
+
and it will render
|
43
|
+
|
44
|
+
```
|
45
|
+
Usage: gemma-wrapper [options] -- [gemma-options]
|
46
|
+
--loco [x,y,1,2,3...] Run full LOCO
|
47
|
+
--input filen JSON input variables (used for LOCO)
|
48
|
+
--cache-dir path Use a cache directory
|
49
|
+
--json Create output file in JSON format
|
50
|
+
--force Force computation
|
51
|
+
--q, --quiet Run quietly
|
52
|
+
-v, --verbose Run verbosely
|
53
|
+
--debug Show debug messages and keep intermediate output
|
54
|
+
-- Anything after gets passed to GEMMA
|
55
|
+
|
56
|
+
-h, --help display this help and exit
|
57
|
+
```
|
58
|
+
|
59
|
+
Alternatively, fetch a
|
60
|
+
[release](https://github.com/genetics-statistics/gemma-wrapper/releases)
|
61
|
+
of
|
34
62
|
[gemma-wrapper](https://github.com/genetics-statistics/gemma-wrapper)
|
35
63
|
|
36
64
|
Unpack it and run the tool as
|
@@ -55,7 +83,7 @@ prints the GEMMA help
|
|
55
83
|
To compute K run the following command from the source directory (so
|
56
84
|
the data files are found):
|
57
85
|
|
58
|
-
|
86
|
+
gemma-wrapper -- \
|
59
87
|
-g test/data/input/BXD_geno.txt.gz \
|
60
88
|
-p test/data/input/BXD_pheno.txt \
|
61
89
|
-gk \
|
@@ -71,7 +99,7 @@ passed in (here the genotype and phenotype files).
|
|
71
99
|
|
72
100
|
You can also get JSON output on STDOUT by providing the --json switch
|
73
101
|
|
74
|
-
|
102
|
+
gemma-wrapper --json -- \
|
75
103
|
-g test/data/input/BXD_geno.txt.gz \
|
76
104
|
-p test/data/input/BXD_pheno.txt \
|
77
105
|
-gk \
|
@@ -87,7 +115,7 @@ Note that GEMMA's -o (output) and --outdir switches should not be
|
|
87
115
|
used. gemma-wrapper stores the cached matrices in TMPDIR by
|
88
116
|
default. If you want something else provide a --cache-dir, e.g.
|
89
117
|
|
90
|
-
|
118
|
+
gemma-wrapper --cache-dir ~/.gemma-cache -- \
|
91
119
|
-g test/data/input/BXD_geno.txt.gz \
|
92
120
|
-p test/data/input/BXD_pheno.txt \
|
93
121
|
-gk \
|
@@ -102,8 +130,8 @@ using the -loco switch (for supported formats check
|
|
102
130
|
https://github.com/genetics-statistics/GEMMA/issues/46). To loop all
|
103
131
|
chromosomes first create all K's with
|
104
132
|
|
105
|
-
|
106
|
-
--loco 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,X
|
133
|
+
gemma-wrapper --json \
|
134
|
+
--loco 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,X -- \
|
107
135
|
-g test/data/input/BXD_geno.txt.gz \
|
108
136
|
-p test/data/input/BXD_pheno.txt \
|
109
137
|
-a test/data/input/BXD_snps.txt \
|
@@ -113,7 +141,7 @@ chromosomes first create all K's with
|
|
113
141
|
and next run the LMM's using the K's captured in K.json using the --input
|
114
142
|
switch
|
115
143
|
|
116
|
-
|
144
|
+
gemma-wrapper --json --loco --input K.json -- \
|
117
145
|
-g test/data/input/BXD_geno.txt.gz \
|
118
146
|
-p test/data/input/BXD_pheno.txt \
|
119
147
|
-c test/data/input/BXD_covariates2.txt \
|
@@ -132,4 +160,4 @@ allowed (-o, -outdir)
|
|
132
160
|
|
133
161
|
## Copyright
|
134
162
|
|
135
|
-
Copyright (c) 2017 Pjotr Prins. See LICENSE.txt for further details.
|
163
|
+
Copyright (c) 2017 Pjotr Prins. See [LICENSE.txt](LICENSE.txt) for further details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.92.2
|
data/bin/gemma-wrapper
CHANGED
@@ -6,7 +6,37 @@
|
|
6
6
|
#
|
7
7
|
# Copyright (C) 2017 Pjotr Prins <pjotr.prins@thebird.nl>
|
8
8
|
|
9
|
-
USAGE = "GEMMA
|
9
|
+
USAGE = "GEMMA wrapper example:
|
10
|
+
|
11
|
+
Simple caching of K computation with
|
12
|
+
|
13
|
+
gemma-wrapper -- \\
|
14
|
+
-g test/data/input/BXD_geno.txt.gz \\
|
15
|
+
-p test/data/input/BXD_pheno.txt \\
|
16
|
+
-gk
|
17
|
+
|
18
|
+
LOCO K computation with caching and JSON output
|
19
|
+
|
20
|
+
gemma-wrapper --json \\
|
21
|
+
--loco 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,X -- \\
|
22
|
+
-g test/data/input/BXD_geno.txt.gz \\
|
23
|
+
-p test/data/input/BXD_pheno.txt \\
|
24
|
+
-a test/data/input/BXD_snps.txt \\
|
25
|
+
-gk -debug > K.json
|
26
|
+
|
27
|
+
LMM's using the K's captured in K.json using the --input switch
|
28
|
+
|
29
|
+
gemma-wrapper --json --loco --input K.json -- \\
|
30
|
+
-g test/data/input/BXD_geno.txt.gz \\
|
31
|
+
-p test/data/input/BXD_pheno.txt \\
|
32
|
+
-c test/data/input/BXD_covariates2.txt \\
|
33
|
+
-a test/data/input/BXD_snps.txt \\
|
34
|
+
-lmm 2 -maf 0.1 \\
|
35
|
+
-debug > GWA.json
|
36
|
+
|
37
|
+
"
|
38
|
+
GEMMA_V_MAJOR = 97
|
39
|
+
GEMMA_V_MINOR = 2
|
10
40
|
|
11
41
|
basepath = File.dirname(File.dirname(__FILE__))
|
12
42
|
$: << File.join(basepath,'lib')
|
@@ -126,6 +156,18 @@ GEMMA_K_VERSION=version
|
|
126
156
|
GEMMA_K_BANNER = "gemma-wrapper #{version} (Ruby #{RUBY_VERSION}) by Pjotr Prins 2017\n"
|
127
157
|
info.call GEMMA_K_BANNER
|
128
158
|
|
159
|
+
# Check gemma version
|
160
|
+
GEMMA_COMMAND=options[:gemma_command]
|
161
|
+
gemma_version_header = `#{GEMMA_COMMAND}`.split("\n").grep(/Version/)[0].strip
|
162
|
+
info.call "Using GEMMA ",gemma_version_header,"\n"
|
163
|
+
gemma_version = gemma_version_header.split(/[,\s]+/)[1]
|
164
|
+
v_version, v_major, v_minor = gemma_version.split(".")
|
165
|
+
|
166
|
+
error.call "GEMMA version is out of date. Update GEMMA to 0.#{GEMMA_V_MAJOR}.#{GEMMA_V_MINOR}!" if v_major.to_i < GEMMA_V_MAJOR or (v_major.to_i == GEMMA_V_MAJOR and (v_minor == nil or v_minor.to_i < GEMMA_V_MINOR))
|
167
|
+
|
168
|
+
options[:gemma_version_header] = gemma_version_header
|
169
|
+
options[:gemma_version] = gemma_version
|
170
|
+
|
129
171
|
if options[:show_help] or gemma_args == nil
|
130
172
|
print opts
|
131
173
|
print USAGE
|
@@ -166,15 +208,6 @@ gemma_args << '-outdir'
|
|
166
208
|
gemma_args << options[:cache_dir]
|
167
209
|
GEMMA_ARGS = gemma_args
|
168
210
|
|
169
|
-
# Check gemma version
|
170
|
-
GEMMA_COMMAND=options[:gemma_command]
|
171
|
-
gemma_version_header = `#{GEMMA_COMMAND}`.split("\n").grep(/Version/)[0].strip
|
172
|
-
info.call "Using GEMMA ",gemma_version_header,"\n"
|
173
|
-
gemma_version = gemma_version_header.split(/[,\s]+/)[1]
|
174
|
-
|
175
|
-
options[:gemma_version_header] = gemma_version_header
|
176
|
-
options[:gemma_version] = gemma_version
|
177
|
-
|
178
211
|
debug.call "Options: ",options,"\n" if !options[:quiet]
|
179
212
|
|
180
213
|
invoke_gemma = lambda do |extra_args, cache_hit = false|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bio-gemma-wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.92.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pjotr Prins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: GEMMA wrapper caches K between runs with LOCO support
|
14
14
|
email: pjotr.public01@thebird.nl
|
@@ -43,7 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
43
43
|
version: '0'
|
44
44
|
requirements: []
|
45
45
|
rubyforge_project:
|
46
|
-
rubygems_version: 2.
|
46
|
+
rubygems_version: 2.5.1
|
47
47
|
signing_key:
|
48
48
|
specification_version: 4
|
49
49
|
summary: Cache GEMMA with LOCO
|