Class | Bio::Alignment::MultiFastaFormat
In: | lib/bio/appl/mafft/report.rb
Parent: | Object

Data class for fasta-formatted multiple sequence alignment data, which is simply multiple entiries of fasta formatted sequences.

### Methods

alignment entries new

### Constants

DELIMITER | = | RS = nil |  | delimiter for flatfile

### Public Class methods

new(str)

Creates a new data object. `str` should be a (multi-)fasta formatted string.

[Source]

        # File lib/bio/appl/mafft/report.rb, line 46
    46:       def initialize(str)
    47:         ff = Bio::FlatFile.new(Bio::FastaFormat, StringIO.new(str))
    48:         @data = ff.to_a
    49:         @alignment = nil
    50:         @seq_method = nil
    51:       end

### Public Instance methods

alignment(method = nil)

Gets an multiple alignment. Returns a Bio::Alignment object. `method` should be one of :naseq, :aaseq, :seq, or nil (default). nil means to automatically determine nucleotide or amino acid.

This method returns previously parsed object if the same method is given (or guessed method is the same).

[Source]

        # File lib/bio/appl/mafft/report.rb, line 60
    60:       def alignment(method = nil)
    61:         m = determine_seq_method(@data, method)
    62:         if !@alignment or m != @seq_method then
    63:           @seq_method = m
    64:           @alignment = do_parse(@data, @seq_method)
    65:         end
    66:         @alignment
    67:       end

entries()

Gets an array of the fasta formatted sequence objects. Returns an array of Bio::FastaFormat objects.

[Source]

        # File lib/bio/appl/mafft/report.rb, line 71
    71:       def entries
    72:         @data
    73:       end

[Validate]