lederhosen 1.3.10 → 1.4.0
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/lederhosen.gemspec +1 -1
- data/lib/lederhosen/tasks/cluster.rb +8 -2
- data/lib/lederhosen/version.rb +3 -3
- data/spec/cli_spec.rb +7 -0
- metadata +2 -2
data/lederhosen.gemspec
CHANGED
|
@@ -10,6 +10,7 @@ module Lederhosen
|
|
|
10
10
|
method_option :identity, :type => :numeric, :required => true
|
|
11
11
|
method_option :output, :type => :string, :required => true
|
|
12
12
|
method_option :strand, :type => :string, :default => 'plus'
|
|
13
|
+
method_option :dry_run, :type => :boolean, :default => false
|
|
13
14
|
|
|
14
15
|
def cluster
|
|
15
16
|
input = File.expand_path(options[:input])
|
|
@@ -18,8 +19,9 @@ module Lederhosen
|
|
|
18
19
|
identity = options[:identity]
|
|
19
20
|
output = File.expand_path(options[:output])
|
|
20
21
|
strand = options[:strand]
|
|
22
|
+
dry_run = options[:dry_run]
|
|
21
23
|
|
|
22
|
-
ohai "clustering #{input} to #{database} and saving to #{output}"
|
|
24
|
+
ohai "#{'(dry run)' if dry_run} clustering #{input} to #{database} and saving to #{output}"
|
|
23
25
|
|
|
24
26
|
options.each_pair do |key, value|
|
|
25
27
|
ohai "#{key} = #{value}"
|
|
@@ -40,7 +42,11 @@ module Lederhosen
|
|
|
40
42
|
|
|
41
43
|
cmd = cmd.join(' ')
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
unless dry_run
|
|
46
|
+
run cmd
|
|
47
|
+
else
|
|
48
|
+
puts cmd
|
|
49
|
+
end
|
|
44
50
|
end
|
|
45
51
|
end
|
|
46
52
|
end
|
data/lib/lederhosen/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
|
@@ -22,6 +22,13 @@ describe Lederhosen::CLI do
|
|
|
22
22
|
$?.success?.should be_true
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
it 'can (dry run) cluster reads using usearch and output usearch cmd to stdout' do
|
|
26
|
+
stdout = `./bin/lederhosen cluster --dry-run --input #{$test_dir}/trimmed/ILT_L_9_B_001.fasta --database #{$test_dir}/test_db.udb --identity 0.95 --output #{$test_dir}/clusters.uc`
|
|
27
|
+
stdout.should match /^usearch/
|
|
28
|
+
$?.success?.should be_true
|
|
29
|
+
File.exists?(File.join($test_dir, 'clusters.uc')).should be_false
|
|
30
|
+
end
|
|
31
|
+
|
|
25
32
|
it 'can cluster reads using usearch' do
|
|
26
33
|
`./bin/lederhosen cluster --input #{$test_dir}/trimmed/ILT_L_9_B_001.fasta --database #{$test_dir}/test_db.udb --identity 0.95 --output #{$test_dir}/clusters.uc`
|
|
27
34
|
$?.success?.should be_true
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lederhosen
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -176,7 +176,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
176
176
|
version: '0'
|
|
177
177
|
segments:
|
|
178
178
|
- 0
|
|
179
|
-
hash:
|
|
179
|
+
hash: 598176715743028608
|
|
180
180
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
none: false
|
|
182
182
|
requirements:
|