Method: Bio::ClustalW::Report#get_sequence

Defined in:
lib/bio/appl/clustalw/report.rb

#get_sequence(row) ⇒ Object

Returns the Bio::Sequence in the matrix at row ‘row’ as Bio::Sequence object. When row is out of range a nil is returned.


Arguments:

  • (required) row: Integer

Returns

Bio::Sequence



83
84
85
86
87
88
89
90
91
# File 'lib/bio/appl/clustalw/report.rb', line 83

def get_sequence(row)
  a = alignment
  return nil if row < 0 or row >= a.keys.size
  id  = a.keys[row]
  seq = a.to_hash[id]
  s = Bio::Sequence.new(seq.seq)
  s.definition = id
  s
end