######################################################## # Author: Almudena Bocinos Rioboo # # Defines the main methods that are necessary to execute PluginLowHighSize # # Inherit: Plugin ######################################################## require "plugin" class PluginLowHighSize < Plugin # Begins the plugin_low_high_size's execution with the sequence "seq" def execute(seqs) seqs.each do |s| exec_seq(s) end end def exec_seq(seq) $LOG.info "[#{self.class.to_s}, seq: #{seq.seq_name}]: checking low or high size of the sequence" min_size = @params.get_param('min_sequence_size_raw').to_i #min_size is: mean - 2dev max_size = @params.get_param('max_sequence_size_raw').to_i #max_size is: mean + 2dev #add_stats('rejected_seqs',seq.seq_fasta.length) actions=[] if ((max_size>0 && (seq.seq_fasta.length>max_size)) || (seq.seq_fasta.length