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