lib/seqtrimnext/plugins/plugin_low_complexity.rb in seqtrimnext-2.0.51 vs lib/seqtrimnext/plugins/plugin_low_complexity.rb in seqtrimnext-2.0.52

- old
+ new

@@ -10,23 +10,14 @@ require "plugin" MIN_DUST_SIZE = 30 class PluginLowComplexity < Plugin - - - - def execute(seqs) - dust= do_dust(seqs) - - seqs.each_with_index do |s,i| - exec_seq(s,dust[i]) - end - end - def do_dust(seqs) - # find MIDS with less results than max_target_seqs value + # do the dust masker instead of blast + def do_blasts(seqs) + dust_masker=DustMasker.new() fastas=[] seqs.each do |seq| @@ -42,11 +33,13 @@ return found_dust end - def exec_seq(seq,dust_query) + def exec_seq(seq,blast_query) + dust_query=blast_query + if dust_query.query_id != seq.seq_name raise "Blast and seq names does not match, blast:#{blast_query.query_id} sn:#{seq.seq_name}" end actions=[] @@ -63,17 +56,9 @@ if (dust_size)>=MIN_DUST_SIZE # check if low complexity is inside a lowqual region - # in_low_qual=false - # low_quals.each do |lq| - # if lq.contains_action?(start,stop,0) - # in_low_qual=true - # break - # end - # end - if !seq.range_inside_action_type?(start,stop,ActionLowQuality) total_dust+=dust_size a = seq.new_action(start,stop,'ActionLowComplexity') # a.left_action=true