class Bio::Probcons::DEFAULT_PARSER

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



delimiter for flatfile

Public Class Methods

new(str) click to toggle source

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

# File lib/bio/appl/mafft/report.rb, line 46
def initialize(str)
  ff =,
  @data = ff.to_a
  @alignment = nil
  @seq_method = nil

Public Instance Methods

alignment(method = nil) click to toggle source

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).

# File lib/bio/appl/mafft/report.rb, line 60
def alignment(method = nil)
  m = determine_seq_method(@data, method)
  if !@alignment or m != @seq_method then
    @seq_method = m
    @alignment = do_parse(@data, @seq_method)
entries() click to toggle source

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

# File lib/bio/appl/mafft/report.rb, line 71
def entries