Permalink
Browse files

fixed truncating. discount any reads with N

  • Loading branch information...
1 parent 86f954e commit 019f5e9e8077b5216031c7e84256f18b7178cfae @audy committed Apr 13, 2012
Showing with 9 additions and 1 deletion.
  1. +8 −0 lederhosen.rb
  2. +1 −1 spec/helpers_spec.rb
View
@@ -255,6 +255,14 @@ def trim_pairs(left, right, out, args={})
# returns just the sequence
def trim(dna, args={})
+ # trim primers off of sequence
+ # (THIS IS EXPERIMENT-SPECIFIC)
+ dna.sequence = dna.sequence[11..-1]
+ dna.quality = dna.quality[11..-1]
+
+ # throw away any read with an ambiguous primer
+ return nil if dna.sequence =~ /N/
+
min = args[:min] || 20
offset = args[:cutoff] || 64
_sum, _max, first, last, start, _end = 0, 0, 0, 0, 0
View
@@ -14,7 +14,7 @@
Dna.new(handle).first
end
# I should probably test with a bad read
- Helpers.trim(record).length.should == 90
+ Helpers.trim(record).length.should == 79
end
it 'should be able to trim pairs of qseq files, outputting fasta file' do

0 comments on commit 019f5e9

Please sign in to comment.