class Bio::MAFFT::Report

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.

Attributes

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.

Public Class Methods

new(str, seqclass = nil) click to toggle source

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', …

Calls superclass method Bio::Alignment::MultiFastaFormat.new
# 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

Public Instance Methods

align() click to toggle source

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
def align
  warn "Bio::MAFFT::Report#align is deprecated. Please use \'alignment\'."
  alignment
end
alignment(method = nil) click to toggle source

Gets an multiple alignment. Returns a Bio::Alignment object.

# File lib/bio/appl/mafft/report.rb, line 177
def alignment(method = nil)
  super
end
to_a() click to toggle source

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
def to_a
  @data
end
to_fasta(*arg) click to toggle source

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
def to_fasta(*arg)
  warn "Bio::MAFFT::report#to_fasta is deprecated. Please use \'alignment.output_fasta\'"
  alignment.output_fasta(*arg)
end