genfrag 0.0.0.3 → 0.0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Binary file
@@ -2,7 +2,7 @@
2
2
  module Genfrag
3
3
 
4
4
  # :stopdoc:
5
- VERSION = '0.0.0.3'
5
+ VERSION = '0.0.0.4'
6
6
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
7
7
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
8
8
  # :startdoc:
@@ -132,14 +132,16 @@ class SearchCommand < Command
132
132
  @sequences = processed_fasta_file
133
133
  @adapters = {}
134
134
  @re5_ds, @re3_ds = [@ops.re5, @ops.re3].map {|x| Bio::RestrictionEnzyme::DoubleStranded.new(x)}
135
+ @re5_ds_aligned_strands_with_cuts_primary = @re5_ds.aligned_strands_with_cuts.primary
136
+ @re3_ds_aligned_strands_with_cuts_primary = @re3_ds.aligned_strands_with_cuts.primary
135
137
  if @ops.verbose
136
138
  cli_p(cli, <<-END
137
139
  RE5: #{@ops.re5}
138
- #{@re5_ds.aligned_strands_with_cuts.primary}
140
+ #{@re5_ds_aligned_strands_with_cuts_primary}
139
141
  #{@re5_ds.aligned_strands_with_cuts.complement}
140
142
 
141
143
  RE3: #{@ops.re3}
142
- #{@re3_ds.aligned_strands_with_cuts.primary}
144
+ #{@re5_ds_aligned_strands_with_cuts_primary}
143
145
  #{@re3_ds.aligned_strands_with_cuts.complement}
144
146
 
145
147
  adapter5: #{@ops.adapter5}
@@ -224,12 +226,12 @@ END
224
226
 
225
227
  # note the next two if-statements at this level chain together with 'p' and 'c'
226
228
  if @adapters[:adapter5_specificity]
227
- p, c = matches_adapter(5, p, c, raw_frag, @trim)
229
+ p, c = matches_adapter(5, p, c, raw_frag, @trim, @re5_ds_aligned_strands_with_cuts_primary)
228
230
  next if !p # next if returned false -- no match
229
231
  end
230
232
 
231
233
  if @adapters[:adapter3_specificity]
232
- p, c = matches_adapter(3, p, c, raw_frag, @trim)
234
+ p, c = matches_adapter(3, p, c, raw_frag, @trim, @re3_ds_aligned_strands_with_cuts_primary)
233
235
  next if !p # next if returned false -- no match
234
236
  end
235
237
 
@@ -6,7 +6,7 @@ class SearchCommand < Command
6
6
 
7
7
  # Does the sequence match the adapter
8
8
  #
9
- def matches_adapter(five_or_three, primary_frag, complement_frag, raw_frag, trim)
9
+ def matches_adapter(five_or_three, primary_frag, complement_frag, raw_frag, trim, primary_strand)
10
10
  adapter_specificity = nil
11
11
  adapter_sequence = nil
12
12
  adapter_size = nil
@@ -14,7 +14,7 @@ class SearchCommand < Command
14
14
  trim_complement = nil
15
15
 
16
16
  if five_or_three == 5
17
- tail = right_tail_of(Bio::RestrictionEnzyme::DoubleStranded.new(@ops.re5).aligned_strands_with_cuts.primary)
17
+ tail = right_tail_of(primary_strand)
18
18
 
19
19
  adapter_specificity = @adapters[:adapter5_specificity].upcase
20
20
  adapter_sequence = @adapters[:adapter5_sequence].upcase if @adapters[:adapter5_sequence]
@@ -30,7 +30,7 @@ class SearchCommand < Command
30
30
  return false if primary_frag[ lead_in .. -1 ].tr('.', '') !~ /^#{adapter_specificity}/i
31
31
 
32
32
  elsif five_or_three == 3
33
- tail = left_tail_of(Bio::RestrictionEnzyme::DoubleStranded.new(@ops.re3).aligned_strands_with_cuts.primary)
33
+ tail = left_tail_of(primary_strand)
34
34
 
35
35
  if @adapters[:adapter3_specificity][0].chr == '_'
36
36
  adapter_specificity = @adapters[:adapter3_specificity][1..-1].reverse.upcase
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: genfrag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.3
4
+ version: 0.0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pjotr Prins and Trevor Wennblom
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-06 00:00:00 -05:00
12
+ date: 2009-08-20 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.8.4
33
+ version: 0.8.7
34
34
  version:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: bones
@@ -54,6 +54,7 @@ extra_rdoc_files:
54
54
  - README.rdoc
55
55
  - bin/genfrag
56
56
  files:
57
+ - .DS_Store
57
58
  - .bnsignore
58
59
  - History.txt
59
60
  - LICENSE.txt