Method: Bio::MAFFT::Report#initialize
- Defined in:
- lib/bio/appl/mafft/report.rb
#initialize(str, seqclass = nil) ⇒ Report
Creates a new Report object. str should be multi-fasta formatted text as a string.
Compatibility Note: the old usage (to get array of Bio::FastaFormat objects) is deprecated.
Compatibility Note 2: the argument seqclass is deprecated.
seqclass should be one of following: Class: Bio::Sequence::AA, Bio::Sequence::NA, … String: ‘PROTEIN’, ‘DNA’, …
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/bio/appl/mafft/report.rb', line 142 def initialize(str, seqclass = nil) if str.is_a?(Array) then warn "Array of Bio::FastaFormat objects will be no longer accepted." @data = str else super(str) end if seqclass then warn "the 2nd argument (seqclass) will be no deprecated." 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 = nil end end end end |