Class: Bio::MAFFT::Report
- Inherits:
-
Alignment::MultiFastaFormat
- Object
- Alignment::MultiFastaFormat
- Bio::MAFFT::Report
- Defined in:
- lib/bio/appl/mafft/report.rb
Overview
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.
Constant Summary
Constants inherited from Alignment::MultiFastaFormat
Alignment::MultiFastaFormat::DELIMITER
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
sequence data.
-
#seqclass ⇒ Object
readonly
Sequence class (Bio::Sequence::AA, Bio::Sequence::NA, …).
Instance Method Summary collapse
-
#align ⇒ Object
This method will be deprecated.
-
#alignment(method = nil) ⇒ Object
Gets an multiple alignment.
-
#initialize(str, seqclass = nil) ⇒ Report
constructor
Creates a new Report object.
-
#to_a ⇒ Object
Compatibility note: Behavior of the method will be changed in the future.
-
#to_fasta(*arg) ⇒ Object
This will be deprecated.
Methods inherited from Alignment::MultiFastaFormat
Constructor Details
#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 |
Instance Attribute Details
#data ⇒ Object (readonly)
sequence data. Returns an array of Bio::FastaFormat.
168 169 170 |
# File 'lib/bio/appl/mafft/report.rb', line 168 def data @data end |
#seqclass ⇒ Object (readonly)
Sequence class (Bio::Sequence::AA, Bio::Sequence::NA, …)
Compatibility note: This method will be removed in the tufure.
173 174 175 |
# File 'lib/bio/appl/mafft/report.rb', line 173 def seqclass @seqclass end |
Instance Method Details
#align ⇒ Object
This method will be deprecated. Instead, please use alignment.
Gets an multiple alignment. Returns a Bio::Alignment object.
185 186 187 188 |
# File 'lib/bio/appl/mafft/report.rb', line 185 def align warn "Bio::MAFFT::Report#align is deprecated. Please use \'alignment\'." alignment end |
#alignment(method = nil) ⇒ Object
Gets an multiple alignment. Returns a Bio::Alignment object.
177 178 179 |
# File 'lib/bio/appl/mafft/report.rb', line 177 def alignment(method = nil) super end |
#to_a ⇒ Object
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.
206 207 208 |
# File 'lib/bio/appl/mafft/report.rb', line 206 def to_a @data end |
#to_fasta(*arg) ⇒ Object
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.
196 197 198 199 |
# File 'lib/bio/appl/mafft/report.rb', line 196 def to_fasta(*arg) warn "Bio::MAFFT::report#to_fasta is deprecated. Please use \'alignment.output_fasta\'" alignment.output_fasta(*arg) end |