Module: ViennaRna::Fold::Batch

Defined in:
lib/vienna_rna/modules/fold.rb

Instance Method Summary collapse

Instance Method Details

#with_different_structuresObject



20
21
22
23
24
25
26
# File 'lib/vienna_rna/modules/fold.rb', line 20

def with_different_structures
  run.inject(Hash.new { |hash, key| hash[key] = [] }) do |hash, folded_sequence|
    hash.tap do
      hash[folded_sequence.structure] << folded_sequence
    end
  end.values.map(&:first)
end