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 CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "lederhosen"
8
- s.version = "1.3.10"
8
+ s.version = "1.4.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Austin G. Davis-Richardson"]
@@ -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
- run cmd
45
+ unless dry_run
46
+ run cmd
47
+ else
48
+ puts cmd
49
+ end
44
50
  end
45
51
  end
46
52
  end
@@ -1,9 +1,9 @@
1
1
  module Lederhosen
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 3
5
- CODENAME = 'Dirndl' # changes for minor versions
6
- PATCH = 10
4
+ MINOR = 4
5
+ CODENAME = 'Strickjacke' # changes for minor versions
6
+ PATCH = 0
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH].join('.')
9
9
  end
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.3.10
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: 2999187278262571353
179
+ hash: 598176715743028608
180
180
  required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  none: false
182
182
  requirements: