lederhosen 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/lib/lederhosen/cli.rb +11 -0
  2. data/lib/version.rb +2 -2
  3. metadata +3 -4
  4. data/setup.sh +0 -16
@@ -16,11 +16,17 @@ module Lederhosen
16
16
  raw_reads = Helpers.get_grouped_qseq_files raw_reads
17
17
  puts "found #{raw_reads.length} pairs of reads"
18
18
  puts "trimming!"
19
+
20
+ pbar = ProgressBar.new "trimming", raw_reads.length
21
+
19
22
  raw_reads.each do |a|
23
+ pbar.inc
20
24
  out = File.join(out_dir, "#{File.basename(a[0])}.fasta")
21
25
  # TODO get total and trimmed
22
26
  total, trimmed = Helpers.trim_pairs a[1][0], a[1][1], out, :min_length => 70
23
27
  end
28
+
29
+ pbar.finish
24
30
  end
25
31
 
26
32
  ##
@@ -37,12 +43,17 @@ module Lederhosen
37
43
  fail "no reads in #{trimmed}" if trimmed.length == 0
38
44
 
39
45
  output = File.open(output, 'w')
46
+
47
+ pbar = ProgressBar.new "joining", trimmed.length
48
+
40
49
  trimmed.each do |fasta_file|
50
+ pbar.inc
41
51
  records = Dna.new File.open(fasta_file)
42
52
  records.each_slice(2) do |r, l|
43
53
  output.puts ">#{r.name}:#{File.basename(fasta_file, '.fasta')}\n#{r.sequence.reverse+l.sequence}"
44
54
  end
45
55
  end
56
+ pbar.finish
46
57
  end
47
58
 
48
59
  ##
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lederhosen
2
- VERSION = '0.0.1'
3
- end
2
+ VERSION = '0.0.2'
3
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lederhosen
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Austin G. Davis-Richardson
@@ -122,7 +122,6 @@ files:
122
122
  - lib/lederhosen/helpers.rb
123
123
  - lib/version.rb
124
124
  - readme.md
125
- - setup.sh
126
125
  - spec/data/ILT_L_9_B_001_1.txt
127
126
  - spec/data/ILT_L_9_B_001_3.txt
128
127
  - spec/data/ILT_L_9_B_002_1.txt
data/setup.sh DELETED
@@ -1,16 +0,0 @@
1
- #!/bin/bash
2
-
3
- echo "Note: You may need to be root.\n\nIf you get an error try running this:\n $ sudo ./setup.sh\n"
4
-
5
- if [ ! `which uclust` ]; then
6
- echo "NOTE: You must have uclust installed and in your \$PATH \n"
7
- fi
8
-
9
- echo "Installing Lederhosen dependencies"
10
- for gem in dna bundler rspec thor progressbar; do
11
- gem install $gem --no-ri --no-rdoc > /dev/null
12
- done
13
-
14
- cp lederhosen.rb /usr/local/bin/lederhosen
15
-
16
- echo "Installation complete.\n\nFor instructions, type\n\n $ lederhosen help\n\nThank you for choosing Lederhosen."