bio-ngs 0.4.2.alpha.01 → 0.4.4.alpha.01
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.
- data/Gemfile +5 -4
- data/Gemfile.lock +34 -32
- data/README.rdoc +3 -0
- data/VERSION +1 -1
- data/bin/biongs +0 -5
- data/bio-ngs.gemspec +17 -28
- data/ext/mkrf_conf.rb +5 -1
- data/lib/bio-ngs.rb +9 -2
- data/lib/bio/appl/ngs/bcftools.rb +100 -0
- data/lib/bio/appl/ngs/bwa.rb +210 -0
- data/lib/bio/appl/ngs/fastx.rb +22 -6
- data/lib/bio/appl/ngs/samtools.rb +85 -0
- data/lib/bio/appl/ngs/tophat.rb +1 -1
- data/lib/bio/ngs/ext/versions.yaml +16 -0
- data/lib/bio/ngs/record.rb +2 -2
- data/lib/bio/ngs/utils.rb +11 -8
- data/lib/enumerable.rb +13 -1
- data/lib/tasks/bwa.thor +32 -106
- data/lib/tasks/filter.thor +75 -0
- data/lib/tasks/pre.thor +17 -37
- data/lib/tasks/project.thor +2 -1
- data/lib/tasks/quality.thor +27 -5
- data/lib/wrapper.rb +32 -5
- metadata +100 -99
data/Gemfile
CHANGED
@@ -4,7 +4,6 @@ source "http://rubygems.org"
|
|
4
4
|
# gem "activesupport", ">= 2.3.5"
|
5
5
|
|
6
6
|
gem "bio", ">= 1.4.2"
|
7
|
-
gem "bio-bwa", ">= 0.2.2"
|
8
7
|
gem "bio-samtools", ">= 0.3.2"
|
9
8
|
gem "thor", ">= 0.14.6"
|
10
9
|
gem "rubyvis", ">= 0.5.0"
|
@@ -15,13 +14,15 @@ gem "sqlite3", ">= 1.3.3"
|
|
15
14
|
gem "bio-blastxmlparser"
|
16
15
|
gem "progressbar",">= 0.9.0"
|
17
16
|
gem "rake", "0.9.2.2"
|
17
|
+
gem "json"
|
18
|
+
gem "parallel"
|
18
19
|
|
19
20
|
# Add dependencies to develop your gem here.
|
20
21
|
# Include everything needed to run rake, tests, features, etc.
|
21
22
|
group :development do
|
22
23
|
gem "shoulda", ">= 0"
|
23
|
-
gem "bundler", "~> 1.
|
24
|
-
gem "jeweler", "~> 1.
|
24
|
+
gem "bundler", "~> 1.1.0"
|
25
|
+
gem "jeweler", "~> 1.8.3"
|
25
26
|
gem "rcov", "~> 0.9.11"
|
26
27
|
gem "bio", ">= 1.4.2"
|
27
28
|
gem "thor", ">= 0.14.6"
|
@@ -31,11 +32,11 @@ group :development do
|
|
31
32
|
gem "daemons", ">= 1.1.0"
|
32
33
|
gem "bio-samtools", ">= 0.3.2"
|
33
34
|
gem "ruby-ensembl-api", ">= 1.0.1"
|
34
|
-
gem 'bio-bwa', ">= 0.2.2"
|
35
35
|
gem "activerecord",">= 3.0.5"
|
36
36
|
gem "sqlite3", ">= 1.3.3"
|
37
37
|
gem "bio-blastxmlparser"
|
38
38
|
gem "progressbar",">= 0.9.0"
|
39
39
|
gem "json"
|
40
40
|
gem "rake", "0.9.2.2"
|
41
|
+
gem "parallel"
|
41
42
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,81 +1,83 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
activemodel (3.2.
|
5
|
-
activesupport (= 3.2.
|
4
|
+
activemodel (3.2.2)
|
5
|
+
activesupport (= 3.2.2)
|
6
6
|
builder (~> 3.0.0)
|
7
|
-
activerecord (3.2.
|
8
|
-
activemodel (= 3.2.
|
9
|
-
activesupport (= 3.2.
|
10
|
-
arel (~> 3.0.
|
7
|
+
activerecord (3.2.2)
|
8
|
+
activemodel (= 3.2.2)
|
9
|
+
activesupport (= 3.2.2)
|
10
|
+
arel (~> 3.0.2)
|
11
11
|
tzinfo (~> 0.3.29)
|
12
|
-
activesupport (3.2.
|
12
|
+
activesupport (3.2.2)
|
13
13
|
i18n (~> 0.6)
|
14
14
|
multi_json (~> 1.0)
|
15
|
-
arel (3.0.
|
15
|
+
arel (3.0.2)
|
16
16
|
bio (1.4.2)
|
17
17
|
bio-blastxmlparser (1.0.1)
|
18
18
|
bio-logger (>= 1.0.0)
|
19
19
|
nokogiri (>= 1.5.0)
|
20
|
-
bio-bwa (0.2.2)
|
21
20
|
bio-logger (1.0.0)
|
22
21
|
log4r (>= 1.1.9)
|
23
|
-
bio-samtools (0.5.
|
22
|
+
bio-samtools (0.5.2)
|
24
23
|
bio (>= 1.4.2)
|
25
24
|
ffi
|
26
25
|
builder (3.0.0)
|
27
26
|
daemons (1.1.8)
|
28
27
|
diff-lcs (1.1.3)
|
29
28
|
ffi (1.0.11)
|
30
|
-
ffi (1.0.11-java)
|
31
29
|
git (1.2.5)
|
32
30
|
i18n (0.6.0)
|
33
|
-
jeweler (1.
|
34
|
-
bundler (~> 1.0
|
31
|
+
jeweler (1.8.3)
|
32
|
+
bundler (~> 1.0)
|
35
33
|
git (>= 1.2.5)
|
36
34
|
rake
|
35
|
+
rdoc
|
37
36
|
json (1.6.5)
|
38
|
-
json (1.6.5-java)
|
39
37
|
log4r (1.1.10)
|
40
|
-
multi_json (1.0
|
41
|
-
nokogiri (1.5.
|
42
|
-
|
38
|
+
multi_json (1.1.0)
|
39
|
+
nokogiri (1.5.2)
|
40
|
+
parallel (0.5.16)
|
43
41
|
progressbar (0.10.0)
|
44
42
|
rake (0.9.2.2)
|
45
43
|
rcov (0.9.11)
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
rspec-
|
50
|
-
rspec-
|
51
|
-
|
52
|
-
rspec-
|
53
|
-
|
54
|
-
|
44
|
+
rdoc (3.12)
|
45
|
+
json (~> 1.4)
|
46
|
+
rspec (2.9.0)
|
47
|
+
rspec-core (~> 2.9.0)
|
48
|
+
rspec-expectations (~> 2.9.0)
|
49
|
+
rspec-mocks (~> 2.9.0)
|
50
|
+
rspec-core (2.9.0)
|
51
|
+
rspec-expectations (2.9.0)
|
52
|
+
diff-lcs (~> 1.1.3)
|
53
|
+
rspec-mocks (2.9.0)
|
55
54
|
ruby-ensembl-api (1.0.1)
|
56
55
|
activerecord
|
57
56
|
bio (>= 1)
|
58
57
|
rubyvis (0.5.1)
|
59
|
-
shoulda (
|
58
|
+
shoulda (3.0.1)
|
59
|
+
shoulda-context (~> 1.0.0)
|
60
|
+
shoulda-matchers (~> 1.0.0)
|
61
|
+
shoulda-context (1.0.0)
|
62
|
+
shoulda-matchers (1.0.0)
|
60
63
|
sqlite3 (1.3.5)
|
61
64
|
thor (0.14.6)
|
62
|
-
tzinfo (0.3.
|
65
|
+
tzinfo (0.3.32)
|
63
66
|
|
64
67
|
PLATFORMS
|
65
|
-
java
|
66
68
|
ruby
|
67
69
|
|
68
70
|
DEPENDENCIES
|
69
71
|
activerecord (>= 3.0.5)
|
70
72
|
bio (>= 1.4.2)
|
71
73
|
bio-blastxmlparser
|
72
|
-
bio-bwa (>= 0.2.2)
|
73
74
|
bio-samtools (>= 0.3.2)
|
74
|
-
bundler (~> 1.
|
75
|
+
bundler (~> 1.1.0)
|
75
76
|
daemons (>= 1.1.0)
|
76
77
|
ffi (>= 1.0.6)
|
77
|
-
jeweler (~> 1.
|
78
|
+
jeweler (~> 1.8.3)
|
78
79
|
json
|
80
|
+
parallel
|
79
81
|
progressbar (>= 0.9.0)
|
80
82
|
rake (= 0.9.2.2)
|
81
83
|
rcov (~> 0.9.11)
|
data/README.rdoc
CHANGED
@@ -34,6 +34,9 @@ Most of this tasks create sub-processes to speed up conversions
|
|
34
34
|
* biongs convert:qseq:fastq:by_lane_index LANE INDEX OUTPUT # Convert the qseq from a line and index in a fastq file
|
35
35
|
* biongs convert:qseq:fastq:samples_by_lane SAMPLES LANE OUTPUT # Convert the qseqs for each sample in a specific lane. SAMPLES is an array of index codes separated by commas lane is an integer
|
36
36
|
|
37
|
+
=== filter
|
38
|
+
* biongs filter:by_list QUANTIFICATION LIST # Extract from QUANTIFICATION rows with a key in LIST
|
39
|
+
|
37
40
|
=== quality
|
38
41
|
|
39
42
|
* biongs quality:boxplot FASTQ_QUALITY_STATS # plot reads quality as boxplot
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.4.alpha.01
|
data/bin/biongs
CHANGED
@@ -6,11 +6,6 @@ module Bio
|
|
6
6
|
path = File.expand_path(File.dirname(__FILE__))
|
7
7
|
$:<<File.join(File.dirname(path),"lib")
|
8
8
|
require 'bio-ngs'
|
9
|
-
|
10
|
-
path = File.expand_path(File.dirname(__FILE__))
|
11
|
-
Dir.glob(File.join(File.dirname(path),"lib","tasks","*.thor")) do |thorfile|
|
12
|
-
Thor::Util.load_thorfile(thorfile)
|
13
|
-
end
|
14
9
|
|
15
10
|
class Runner < Thor::Runner
|
16
11
|
|
data/bio-ngs.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Francesco Strozzi", "Raoul J.P. Bonnal"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-03-19"
|
13
13
|
s.description = "bio-ngs provides a framework for handling NGS data with BioRuby"
|
14
14
|
s.email = "francesco.strozzi@gmail.com"
|
15
15
|
s.executables = ["biongs"]
|
@@ -33,6 +33,7 @@ Gem::Specification.new do |s|
|
|
33
33
|
"lib/bio/appl/ngs/bcl2qseq.rb",
|
34
34
|
"lib/bio/appl/ngs/blast.rb",
|
35
35
|
"lib/bio/appl/ngs/bowtie-inspect.rb",
|
36
|
+
"lib/bio/appl/ngs/bwa.rb",
|
36
37
|
"lib/bio/appl/ngs/cufflinks.rb",
|
37
38
|
"lib/bio/appl/ngs/cufflinks/iterators.rb",
|
38
39
|
"lib/bio/appl/ngs/fastx.rb",
|
@@ -102,28 +103,12 @@ Gem::Specification.new do |s|
|
|
102
103
|
s.require_paths = ["lib"]
|
103
104
|
s.rubygems_version = "1.8.10"
|
104
105
|
s.summary = "bio-ngs provides a framework for handling NGS data with BioRuby"
|
105
|
-
s.test_files = [
|
106
|
-
"spec/converter_qseq_spec.rb",
|
107
|
-
"spec/quality_spec.rb",
|
108
|
-
"spec/sff_extract_spec.rb",
|
109
|
-
"spec/spec_helper.rb",
|
110
|
-
"spec/tophat_spec.rb",
|
111
|
-
"spec/utils_spec.rb",
|
112
|
-
"test/helper.rb",
|
113
|
-
"test/test_bio-ngs.rb",
|
114
|
-
"test/test_db.rb",
|
115
|
-
"test/test_homology.rb",
|
116
|
-
"test/test_ngs.rb",
|
117
|
-
"test/test_ontology.rb",
|
118
|
-
"test/test_utils.rb"
|
119
|
-
]
|
120
106
|
|
121
107
|
if s.respond_to? :specification_version then
|
122
108
|
s.specification_version = 3
|
123
109
|
|
124
110
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
125
111
|
s.add_runtime_dependency(%q<bio>, [">= 1.4.2"])
|
126
|
-
s.add_runtime_dependency(%q<bio-bwa>, [">= 0.2.2"])
|
127
112
|
s.add_runtime_dependency(%q<bio-samtools>, [">= 0.3.2"])
|
128
113
|
s.add_runtime_dependency(%q<thor>, [">= 0.14.6"])
|
129
114
|
s.add_runtime_dependency(%q<rubyvis>, [">= 0.5.0"])
|
@@ -134,9 +119,11 @@ Gem::Specification.new do |s|
|
|
134
119
|
s.add_runtime_dependency(%q<bio-blastxmlparser>, [">= 0"])
|
135
120
|
s.add_runtime_dependency(%q<progressbar>, [">= 0.9.0"])
|
136
121
|
s.add_runtime_dependency(%q<rake>, ["= 0.9.2.2"])
|
122
|
+
s.add_runtime_dependency(%q<json>, [">= 0"])
|
123
|
+
s.add_runtime_dependency(%q<parallel>, [">= 0"])
|
137
124
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
138
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.
|
139
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.
|
125
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.1.0"])
|
126
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
|
140
127
|
s.add_development_dependency(%q<rcov>, ["~> 0.9.11"])
|
141
128
|
s.add_development_dependency(%q<bio>, [">= 1.4.2"])
|
142
129
|
s.add_development_dependency(%q<thor>, [">= 0.14.6"])
|
@@ -146,16 +133,15 @@ Gem::Specification.new do |s|
|
|
146
133
|
s.add_development_dependency(%q<daemons>, [">= 1.1.0"])
|
147
134
|
s.add_development_dependency(%q<bio-samtools>, [">= 0.3.2"])
|
148
135
|
s.add_development_dependency(%q<ruby-ensembl-api>, [">= 1.0.1"])
|
149
|
-
s.add_development_dependency(%q<bio-bwa>, [">= 0.2.2"])
|
150
136
|
s.add_development_dependency(%q<activerecord>, [">= 3.0.5"])
|
151
137
|
s.add_development_dependency(%q<sqlite3>, [">= 1.3.3"])
|
152
138
|
s.add_development_dependency(%q<bio-blastxmlparser>, [">= 0"])
|
153
139
|
s.add_development_dependency(%q<progressbar>, [">= 0.9.0"])
|
154
140
|
s.add_development_dependency(%q<json>, [">= 0"])
|
155
141
|
s.add_development_dependency(%q<rake>, ["= 0.9.2.2"])
|
142
|
+
s.add_development_dependency(%q<parallel>, [">= 0"])
|
156
143
|
else
|
157
144
|
s.add_dependency(%q<bio>, [">= 1.4.2"])
|
158
|
-
s.add_dependency(%q<bio-bwa>, [">= 0.2.2"])
|
159
145
|
s.add_dependency(%q<bio-samtools>, [">= 0.3.2"])
|
160
146
|
s.add_dependency(%q<thor>, [">= 0.14.6"])
|
161
147
|
s.add_dependency(%q<rubyvis>, [">= 0.5.0"])
|
@@ -166,9 +152,11 @@ Gem::Specification.new do |s|
|
|
166
152
|
s.add_dependency(%q<bio-blastxmlparser>, [">= 0"])
|
167
153
|
s.add_dependency(%q<progressbar>, [">= 0.9.0"])
|
168
154
|
s.add_dependency(%q<rake>, ["= 0.9.2.2"])
|
155
|
+
s.add_dependency(%q<json>, [">= 0"])
|
156
|
+
s.add_dependency(%q<parallel>, [">= 0"])
|
169
157
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
170
|
-
s.add_dependency(%q<bundler>, ["~> 1.
|
171
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
158
|
+
s.add_dependency(%q<bundler>, ["~> 1.1.0"])
|
159
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
172
160
|
s.add_dependency(%q<rcov>, ["~> 0.9.11"])
|
173
161
|
s.add_dependency(%q<bio>, [">= 1.4.2"])
|
174
162
|
s.add_dependency(%q<thor>, [">= 0.14.6"])
|
@@ -178,17 +166,16 @@ Gem::Specification.new do |s|
|
|
178
166
|
s.add_dependency(%q<daemons>, [">= 1.1.0"])
|
179
167
|
s.add_dependency(%q<bio-samtools>, [">= 0.3.2"])
|
180
168
|
s.add_dependency(%q<ruby-ensembl-api>, [">= 1.0.1"])
|
181
|
-
s.add_dependency(%q<bio-bwa>, [">= 0.2.2"])
|
182
169
|
s.add_dependency(%q<activerecord>, [">= 3.0.5"])
|
183
170
|
s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
|
184
171
|
s.add_dependency(%q<bio-blastxmlparser>, [">= 0"])
|
185
172
|
s.add_dependency(%q<progressbar>, [">= 0.9.0"])
|
186
173
|
s.add_dependency(%q<json>, [">= 0"])
|
187
174
|
s.add_dependency(%q<rake>, ["= 0.9.2.2"])
|
175
|
+
s.add_dependency(%q<parallel>, [">= 0"])
|
188
176
|
end
|
189
177
|
else
|
190
178
|
s.add_dependency(%q<bio>, [">= 1.4.2"])
|
191
|
-
s.add_dependency(%q<bio-bwa>, [">= 0.2.2"])
|
192
179
|
s.add_dependency(%q<bio-samtools>, [">= 0.3.2"])
|
193
180
|
s.add_dependency(%q<thor>, [">= 0.14.6"])
|
194
181
|
s.add_dependency(%q<rubyvis>, [">= 0.5.0"])
|
@@ -199,9 +186,11 @@ Gem::Specification.new do |s|
|
|
199
186
|
s.add_dependency(%q<bio-blastxmlparser>, [">= 0"])
|
200
187
|
s.add_dependency(%q<progressbar>, [">= 0.9.0"])
|
201
188
|
s.add_dependency(%q<rake>, ["= 0.9.2.2"])
|
189
|
+
s.add_dependency(%q<json>, [">= 0"])
|
190
|
+
s.add_dependency(%q<parallel>, [">= 0"])
|
202
191
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
203
|
-
s.add_dependency(%q<bundler>, ["~> 1.
|
204
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
192
|
+
s.add_dependency(%q<bundler>, ["~> 1.1.0"])
|
193
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
205
194
|
s.add_dependency(%q<rcov>, ["~> 0.9.11"])
|
206
195
|
s.add_dependency(%q<bio>, [">= 1.4.2"])
|
207
196
|
s.add_dependency(%q<thor>, [">= 0.14.6"])
|
@@ -211,13 +200,13 @@ Gem::Specification.new do |s|
|
|
211
200
|
s.add_dependency(%q<daemons>, [">= 1.1.0"])
|
212
201
|
s.add_dependency(%q<bio-samtools>, [">= 0.3.2"])
|
213
202
|
s.add_dependency(%q<ruby-ensembl-api>, [">= 1.0.1"])
|
214
|
-
s.add_dependency(%q<bio-bwa>, [">= 0.2.2"])
|
215
203
|
s.add_dependency(%q<activerecord>, [">= 3.0.5"])
|
216
204
|
s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
|
217
205
|
s.add_dependency(%q<bio-blastxmlparser>, [">= 0"])
|
218
206
|
s.add_dependency(%q<progressbar>, [">= 0.9.0"])
|
219
207
|
s.add_dependency(%q<json>, [">= 0"])
|
220
208
|
s.add_dependency(%q<rake>, ["= 0.9.2.2"])
|
209
|
+
s.add_dependency(%q<parallel>, [">= 0"])
|
221
210
|
end
|
222
211
|
end
|
223
212
|
|
data/ext/mkrf_conf.rb
CHANGED
@@ -58,7 +58,11 @@ path_binary = File.join(path_external,"bin","common")
|
|
58
58
|
["common", Bio::Ngs::Utils.os_type].each do |kind_software|
|
59
59
|
path_binary = File.join("#{path_external}", 'bin', kind_software)
|
60
60
|
versions[kind_software].each do |tool, info|
|
61
|
-
|
61
|
+
if info["type"]=="source"
|
62
|
+
Bio::Ngs::Utils.compile_source(tool, info, "#{path_external}", path_binary)
|
63
|
+
elsif info["type"]=="make"
|
64
|
+
Bio::Ngs::Utils.just_make(tool, info, "#{path_external}", path_binary)
|
65
|
+
end
|
62
66
|
end #versions
|
63
67
|
end
|
64
68
|
end #compile
|
data/lib/bio-ngs.rb
CHANGED
@@ -11,6 +11,7 @@
|
|
11
11
|
|
12
12
|
|
13
13
|
# External gems
|
14
|
+
require 'parallel'
|
14
15
|
require 'yaml'
|
15
16
|
require 'json'
|
16
17
|
require 'daemons'
|
@@ -20,7 +21,6 @@ require 'thor/group'
|
|
20
21
|
require 'thor/runner'
|
21
22
|
require 'bio-blastxmlparser'
|
22
23
|
require 'bio'
|
23
|
-
require 'bio-bwa'
|
24
24
|
require 'active_record'
|
25
25
|
require 'sqlite3'
|
26
26
|
|
@@ -49,7 +49,14 @@ require 'bio/appl/ngs/cufflinks'
|
|
49
49
|
require 'bio/appl/ngs/samtools'
|
50
50
|
require 'bio/appl/ngs/fastx'
|
51
51
|
require 'bio/appl/ngs/blast'
|
52
|
+
require 'bio/appl/ngs/bwa'
|
52
53
|
|
53
54
|
# history
|
54
55
|
Bio::Ngs::HISTORY_FILE = Dir.pwd+"/.task-history.yml"
|
55
|
-
Bio::Ngs::Utils.extend_system_path
|
56
|
+
Bio::Ngs::Utils.extend_system_path
|
57
|
+
|
58
|
+
# loading Tasks
|
59
|
+
path = File.expand_path(File.dirname(__FILE__))
|
60
|
+
Dir.glob(File.join(path,"tasks","*.thor")) do |thorfile|
|
61
|
+
Thor::Util.load_thorfile(thorfile)
|
62
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
module Bio
|
2
|
+
module Ngs
|
3
|
+
module Bcftools
|
4
|
+
|
5
|
+
#Usage: bcftools view [options] <in.bcf> [reg]
|
6
|
+
|
7
|
+
#Input/output options:
|
8
|
+
|
9
|
+
# -A keep all possible alternate alleles at variant sites
|
10
|
+
# -b output BCF instead of VCF
|
11
|
+
# -D FILE sequence dictionary for VCF->BCF conversion [null]
|
12
|
+
# -F PL generated by r921 or before (which generate old ordering)
|
13
|
+
# -G suppress all individual genotype information
|
14
|
+
# -l FILE list of sites (chr pos) or regions (BED) to output [all sites]
|
15
|
+
# -L calculate LD for adjacent sites
|
16
|
+
# -N skip sites where REF is not A/C/G/T
|
17
|
+
# -Q output the QCALL likelihood format
|
18
|
+
# -s FILE list of samples to use [all samples]
|
19
|
+
# -S input is VCF
|
20
|
+
# -u uncompressed BCF output (force -b)
|
21
|
+
|
22
|
+
#Consensus/variant calling options:
|
23
|
+
|
24
|
+
# -c SNP calling (force -e)
|
25
|
+
# -d FLOAT skip loci where less than FLOAT fraction of samples covered [0]
|
26
|
+
# -e likelihood based analyses
|
27
|
+
# -g call genotypes at variant sites (force -c)
|
28
|
+
# -i FLOAT indel-to-substitution ratio [-1]
|
29
|
+
# -I skip indels
|
30
|
+
# -p FLOAT variant if P(ref|D)<FLOAT [0.5]
|
31
|
+
# -P STR type of prior: full, cond2, flat [full]
|
32
|
+
# -t FLOAT scaled substitution mutation rate [0.001]
|
33
|
+
# -T STR constrained calling; STR can be: pair, trioauto, trioxd and trioxs (see manual) [null]
|
34
|
+
# -v output potential variant sites only (force -c)
|
35
|
+
|
36
|
+
#Contrast calling and association test options:
|
37
|
+
|
38
|
+
# -1 INT number of group-1 samples [0]
|
39
|
+
# -C FLOAT posterior constrast for LRT<FLOAT and P(ref|D)<0.5 [1]
|
40
|
+
# -U INT number of permutations for association testing (effective with -1) [0]
|
41
|
+
# -X FLOAT only perform permutations for P(chi^2)<FLOAT [0.01]
|
42
|
+
class View
|
43
|
+
include Bio::Command::Wrapper
|
44
|
+
set_program Bio::Ngs::Utils.binary("bcftools")
|
45
|
+
set_sub_program "view"
|
46
|
+
use_aliases
|
47
|
+
add_option :alternate, :type => :boolean, :aliases => "-A", :desc => "keep all possible alternate alleles at variant sites"
|
48
|
+
add_option :bcfout, :type => :boolean, :aliases => "-b", :desc => "output BCF instead of VCF"
|
49
|
+
add_option :dictionary, :type => :string, :aliases => "-D", :desc => "sequence dictionary for VCF->BCF conversion [null]"
|
50
|
+
add_option :suppress_genotype, :type => :boolean, :aliases => "-G", :desc => "suppress all individual genotype information"
|
51
|
+
add_option :positions, :type => :string, :aliases => "-l", :desc => "list of sites (chr pos) or regions (BED) to output [all sites]"
|
52
|
+
add_option :ld, :type => :boolean, :aliases => "-L", :desc => "calculate LD for adjacent sites"
|
53
|
+
add_option :skipN, :type => :boolean, :aliases => "-N", :desc => "skip sites where REF is not A/C/G/T"
|
54
|
+
add_option :qcall, :type => :boolean, :aliases => "-Q", :desc => "output the QCALL likelihood format"
|
55
|
+
add_option :samples, :type => :string, :aliases => "-s", :desc => "list of samples to use [all samples]"
|
56
|
+
add_option :vcfinput, :type => :boolean, :aliases => "-S", :desc => "input is VCF"
|
57
|
+
add_option :uncompressed, :type => :boolean, :aliases => "-u", :desc => "uncompressed BCF output (force -b)"
|
58
|
+
add_option :snpcall, :type => :boolean, :aliases => "-c", :desc => "SNP calling (force -e)"
|
59
|
+
add_option :skiploci, :type => :numeric, :aliases => "-d", :desc => "skip loci where less than FLOAT fraction of samples covered [0]"
|
60
|
+
add_option :likelihood, :type => :boolean, :aliases => "-e", :desc => "likelihood based analyses"
|
61
|
+
add_option :callgenotype, :type => :boolean, :aliases => "-g", :desc => "call genotypes at variant sites (force -c)"
|
62
|
+
add_option :indelratio, :type => :numeric, :aliases => "-i", :desc => "indel-to-substitution ratio [-1]"
|
63
|
+
add_option :skipindels, :type => :boolean, :aliases => "-I", :desc => "skip indels"
|
64
|
+
add_option :variant_probability, :type => :numeric, :aliases => "-p", :desc => "variant if P(ref|D)<FLOAT [0.5]"
|
65
|
+
add_option :prior_type, :type => :string, :aliases => "-P", :desc => "type of prior: full, cond2, flat [full]"
|
66
|
+
add_option :substitution_mutation_rate, :type => :numeric, :aliases => "-t", :desc => "scaled substitution mutation rate [0.001]"
|
67
|
+
add_option :contrained_calling, :type => :string, :aliases => "-T", :desc => "constrained calling; STR can be: pair, trioauto, trioxd and trioxs (see manual) [null]"
|
68
|
+
add_option :variant_sites, :type => :boolean, :aliases => "-v", :desc => "output potential variant sites only (force -c)"
|
69
|
+
add_option :group1, :type => :numeric, :aliases => "-1", :desc => "number of group-1 samples [0]"
|
70
|
+
add_option :posterior_contrast, :type => :numeric, :aliases => "-C", :desc => "posterior constrast for LRT<FLOAT and P(ref|D)<0.5 [1]"
|
71
|
+
add_option :association_permutations, :type => :numeric, :aliases => "-U", :desc => "number of permutations for association testing (effective with -1) [0]"
|
72
|
+
add_option :permutations_cutoff, :type => :numeric, :aliases => "-X", :desc => "only perform permutations for P(chi^2)<FLOAT [0.01]"
|
73
|
+
end
|
74
|
+
|
75
|
+
class Index
|
76
|
+
include Bio::Command::Wrapper
|
77
|
+
set_program Bio::Ngs::Utils.binary("bcftools")
|
78
|
+
set_sub_program "index"
|
79
|
+
end
|
80
|
+
|
81
|
+
class Cat
|
82
|
+
include Bio::Command::Wrapper
|
83
|
+
set_program Bio::Ngs::Utils.binary("bcftools")
|
84
|
+
set_sub_program "cat"
|
85
|
+
end
|
86
|
+
|
87
|
+
class Ld
|
88
|
+
include Bio::Command::Wrapper
|
89
|
+
set_program Bio::Ngs::Utils.binary("bcftools")
|
90
|
+
set_sub_program "ld"
|
91
|
+
end
|
92
|
+
|
93
|
+
class Ldpair
|
94
|
+
include Bio::Command::Wrapper
|
95
|
+
set_program Bio::Ngs::Utils.binary("bcftools")
|
96
|
+
set_sub_program "ldpair"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|