dirseq 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +2 -2
- data/VERSION +1 -1
- data/bin/dirseq +13 -6
- metadata +16 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9ff1307d262c875afd01391fccb60007735127dda4fa1303c17c246fbcc1262c
|
4
|
+
data.tar.gz: 0e040b3e9688aa214da2d2bffc1480b207f8fdc836c75d5bbd9de9199fb67394
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6ef576145d863fae37da16dbc6e224572a9928bc5293fd471c7fa4c831e5f69ac8a9eeb272d5dd8b531f48c791476e4a514d63de3be4a17a5f48f21017d9a61
|
7
|
+
data.tar.gz: 49bae83cf0ad60ec57b91e51931cb380369c04921296552024620d9a837b77f4875f1b09e4fd5b69871c5e905423b64da0d974400f3953423f9e4eadacabc61d
|
data/Gemfile
CHANGED
@@ -11,8 +11,8 @@ gem "bio", "~>1.4", ">=1.4.2"
|
|
11
11
|
group :development do
|
12
12
|
#gem "shoulda", "~> 3.5"
|
13
13
|
#gem "simplecov", "~> 0.8"
|
14
|
-
gem "jeweler", "~> 2.
|
15
|
-
gem "bundler", "~> 1
|
14
|
+
gem "jeweler", "~> 2.3"
|
15
|
+
gem "bundler", "~> 2.1"
|
16
16
|
gem "rspec", "~> 3.0"
|
17
17
|
gem 'pry', '~>0.10'
|
18
18
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/bin/dirseq
CHANGED
@@ -24,7 +24,11 @@ options = {
|
|
24
24
|
:count_type => COVERAGE_COUNT_TYPE,
|
25
25
|
:forward_read_only => false,
|
26
26
|
:accepted_feature_types => ['CDS'],
|
27
|
+
<<<<<<< HEAD
|
27
28
|
:comment_fields_to_print => ['ID'],
|
29
|
+
=======
|
30
|
+
:sam_filter_flags => "-F0x100 -F0x800",
|
31
|
+
>>>>>>> d6f450a... dirseq: Filter out non-primary and supplementary aligns.
|
28
32
|
}
|
29
33
|
o = OptionParser.new do |opts|
|
30
34
|
opts.banner = "
|
@@ -57,6 +61,9 @@ o = OptionParser.new do |opts|
|
|
57
61
|
"Print elements from the comments in the GFF file [default #{options[:comment_fields_to_print].join(',')}]") do |arg|
|
58
62
|
options[:comment_fields_to_print] = arg
|
59
63
|
end
|
64
|
+
opts.on("--sam-filter-flags", "Apply these samtools filters [default: #{options[:sam_filter_flags]}]") do |arg|
|
65
|
+
options[:sam_filter_flags] = arg
|
66
|
+
end
|
60
67
|
|
61
68
|
# logger options
|
62
69
|
opts.separator "\nVerbosity:\n\n"
|
@@ -151,7 +158,7 @@ end
|
|
151
158
|
|
152
159
|
chromosome_file = Tempfile.new('bam_contigs')
|
153
160
|
log.info "Listing contigs in sorted order .."
|
154
|
-
cmd = "samtools idxstats #{bam_file.inspect} |cut -f1,2 >#{chromosome_file.path.inspect}"
|
161
|
+
cmd = "samtools idxstats #{bam_file.inspect} |cut -f1,2 |grep -v '^*' >#{chromosome_file.path.inspect}"
|
155
162
|
Bio::Commandeer.run(cmd, :log => log)
|
156
163
|
|
157
164
|
log.info "Finding featureless contigs"
|
@@ -186,7 +193,7 @@ end
|
|
186
193
|
|
187
194
|
covs_fwd = nil
|
188
195
|
if options[:ignore_directions]
|
189
|
-
cmd1 = "
|
196
|
+
cmd1 = "samtools view -u #{options[:sam_filter_flags]} #{bam_file.inspect} |bedtools coverage -b /dev/stdin -a #{gff_file.inspect} -hist"
|
190
197
|
cov_lines_fwd = Bio::Commandeer.run cmd1, :log => log
|
191
198
|
log.info "Parsing coverage profiles"
|
192
199
|
covs_fwd = get_covs.call(cov_lines_fwd)
|
@@ -199,10 +206,10 @@ else
|
|
199
206
|
if options[:count_type] == COUNT_COUNT_TYPE
|
200
207
|
bedtools_type_flag = '-counts'
|
201
208
|
end
|
202
|
-
cmdf1 = "samtools view -u #{read1_flag} #{bam_file.inspect} |bedtools coverage -sorted -g #{chromosome_file.path.inspect} -b /dev/stdin -a #{sorted_gff_file.inspect} -s #{bedtools_type_flag}"
|
203
|
-
cmdf2 = "samtools view -u #{read2_flag} #{bam_file.inspect} |bedtools coverage -sorted -g #{chromosome_file.path.inspect} -b /dev/stdin -a #{sorted_gff_file.inspect} -s #{bedtools_type_flag}"
|
204
|
-
cmdr1 = "samtools view -u #{read1_flag} #{bam_file.inspect} |bedtools coverage -sorted -g #{chromosome_file.path.inspect} -b /dev/stdin -a #{sorted_gff_file.inspect} -S #{bedtools_type_flag}"
|
205
|
-
cmdr2 = "samtools view -u #{read2_flag} #{bam_file.inspect} |bedtools coverage -sorted -g #{chromosome_file.path.inspect} -b /dev/stdin -a #{sorted_gff_file.inspect} -S #{bedtools_type_flag}"
|
209
|
+
cmdf1 = "samtools view #{options[:sam_filter_flags]} -u #{read1_flag} #{bam_file.inspect} |bedtools coverage -sorted -g #{chromosome_file.path.inspect} -b /dev/stdin -a #{sorted_gff_file.inspect} -s #{bedtools_type_flag}"
|
210
|
+
cmdf2 = "samtools view #{options[:sam_filter_flags]} -u #{read2_flag} #{bam_file.inspect} |bedtools coverage -sorted -g #{chromosome_file.path.inspect} -b /dev/stdin -a #{sorted_gff_file.inspect} -s #{bedtools_type_flag}"
|
211
|
+
cmdr1 = "samtools view #{options[:sam_filter_flags]} -u #{read1_flag} #{bam_file.inspect} |bedtools coverage -sorted -g #{chromosome_file.path.inspect} -b /dev/stdin -a #{sorted_gff_file.inspect} -S #{bedtools_type_flag}"
|
212
|
+
cmdr2 = "samtools view #{options[:sam_filter_flags]} -u #{read2_flag} #{bam_file.inspect} |bedtools coverage -sorted -g #{chromosome_file.path.inspect} -b /dev/stdin -a #{sorted_gff_file.inspect} -S #{bedtools_type_flag}"
|
206
213
|
|
207
214
|
command_to_parsed = lambda do |cmds, name|
|
208
215
|
covs_lines_initial = cmds.collect do |cmd|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dirseq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben J. Woodcroft
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bio-commandeer
|
@@ -42,50 +42,50 @@ dependencies:
|
|
42
42
|
name: bio
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 1.4.2
|
48
45
|
- - "~>"
|
49
46
|
- !ruby/object:Gem::Version
|
50
47
|
version: '1.4'
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 1.4.2
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- - ">="
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: 1.4.2
|
58
55
|
- - "~>"
|
59
56
|
- !ruby/object:Gem::Version
|
60
57
|
version: '1.4'
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 1.4.2
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: jeweler
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '2.
|
67
|
+
version: '2.3'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '2.
|
74
|
+
version: '2.3'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: bundler
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '1
|
81
|
+
version: '2.1'
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '1
|
88
|
+
version: '2.1'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: rspec
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,7 +144,7 @@ homepage: http://github.com/wwood/dirseq
|
|
144
144
|
licenses:
|
145
145
|
- MIT
|
146
146
|
metadata: {}
|
147
|
-
post_install_message:
|
147
|
+
post_install_message:
|
148
148
|
rdoc_options: []
|
149
149
|
require_paths:
|
150
150
|
- lib
|
@@ -159,9 +159,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
|
-
|
163
|
-
|
164
|
-
signing_key:
|
162
|
+
rubygems_version: 3.1.2
|
163
|
+
signing_key:
|
165
164
|
specification_version: 4
|
166
165
|
summary: FPKG calculator for metatranscriptomics
|
167
166
|
test_files: []
|