lib/seqtrimnext/plugins/plugin_indeterminations.rb in seqtrimnext-2.0.60 vs lib/seqtrimnext/plugins/plugin_indeterminations.rb in seqtrimnext-2.0.61
- old
+ new
@@ -146,9 +146,26 @@
$LOG.debug "[#{self.class.to_s}, seq: #{seq.seq_name}]: removing indeterminations N+"
actions=[]
+ # find simple indeterminations at the beginning of sequence
+ match=seq.seq_fasta.match(/^[nN]+/)
+
+ if !match.nil?
+ found=match[0].length
+
+ a = seq.new_action(0,found-1,'ActionIndetermination')
+ actions.push a
+
+ #Add actions
+ seq.add_actions(actions)
+ actions=[]
+ add_stats('indetermination_size',found)
+
+ end
+
+
# find simple indeterminations at end of sequence
match=seq.seq_fasta.match(/[nN]+$/)
if !match.nil?
found=match[0].length