| Class | Bio::MAFFT::Report |
| In: |
lib/bio/appl/mafft/report.rb
|
| Parent: | Bio::Alignment::MultiFastaFormat |
MAFFT result parser class. MAFFT is a very fast multiple sequence alignment software.
Since a result of MAFFT is simply a multiple-fasta format, the significance of this class is to keep standard form and interface between Bio::ClustalW::Report.
| data | [R] | sequence data. Returns an array of Bio::FastaFormat. |
| seqclass | [R] |
Sequence class (Bio::Sequence::AA, Bio::Sequence::NA, …)
Compatibility note: This method will be removed in the tufure. |
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’, …
# File lib/bio/appl/mafft/report.rb, line 142
142: def initialize(str, seqclass = nil)
143: if str.is_a?(Array) then
144: warn "Array of Bio::FastaFormat objects will be no longer accepted."
145: @data = str
146: else
147: super(str)
148: end
149:
150: if seqclass then
151: warn "the 2nd argument (seqclass) will be no deprecated."
152: case seqclass
153: when /PROTEIN/i
154: @seqclass = Bio::Sequence::AA
155: when /[DR]NA/i
156: @seqclass = Bio::Sequence::NA
157: else
158: if seqclass.is_a?(Module) then
159: @seqclass = seqclass
160: else
161: @seqclass = nil
162: end
163: end
164: end
165: end
This method will be deprecated. Instead, please use alignment.
Gets an multiple alignment. Returns a Bio::Alignment object.
# File lib/bio/appl/mafft/report.rb, line 185
185: def align
186: warn "Bio::MAFFT::Report#align is deprecated. Please use \'alignment\'."
187: alignment
188: end
Gets an multiple alignment. Returns a Bio::Alignment object.
# File lib/bio/appl/mafft/report.rb, line 177
177: def alignment(method = nil)
178: super
179: end
Compatibility note: Behavior of the method will be changed in the future.
Gets an array of the sequences. Returns an array of Bio::FastaFormat instances.
# File lib/bio/appl/mafft/report.rb, line 206
206: def to_a
207: @data
208: end
This will be deprecated. Instead, please use alignment.output_fasta.
Gets an fasta-format string of the sequences. Returns a string. Same as align.to_fasta. Please refer to Bio::Alignment#output_fasta for arguments.
# File lib/bio/appl/mafft/report.rb, line 196
196: def to_fasta(*arg)
197: warn "Bio::MAFFT::report#to_fasta is deprecated. Please use \'alignment.output_fasta\'"
198: alignment.output_fasta(*arg)
199: end