module Bio::BioAlignment::DelShortSequences
Public Instance Methods
del_short_sequences(percentage=30)
click to toggle source
Return an alignment with the bridges removed
# File lib/bio-alignment/edit/del_short_sequences.rb, line 23 def del_short_sequences percentage=30 mark_short_sequences.rows_where { |row| !row.state.deleted? } end
mark_short_sequences(percentage = 30)
click to toggle source
Return a new alignment with rows marked for deletion, i.e. mark rows that mostly contain gaps (threshold percentage
). The alignment returned is a cloned copy
# File lib/bio-alignment/edit/del_short_sequences.rb, line 12 def mark_short_sequences percentage = 30 mark_rows { |state,row| num = row.count { |e| e.gap? } if (num.to_f/row.length) > 1.0-percentage/100.0 state.delete! end state } end