Method: Bio::ClustalW::Report#initialize

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

#initialize(str, seqclass = nil) ⇒ Report

Creates new instance. str should be a CLUSTAL format string. seqclass should on of following:

  • Class: Bio::Sequence::AA, Bio::Sequence::NA, …

  • String: ‘PROTEIN’, ‘DNA’, …



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/bio/appl/clustalw/report.rb', line 45

def initialize(str, seqclass = nil)
  @raw = str
  @align = nil
  @match_line = nil
  @header = nil
  case seqclass
  when /PROTEIN/i
    @seqclass = Bio::Sequence::AA
  when /[DR]NA/i
    @seqclass = Bio::Sequence::NA
  else
    if seqclass.is_a?(Module) then
      @seqclass = seqclass
    else
      @seqclass = Bio::Sequence
    end
  end
end