Class Bio::ClustalW::Report
In: lib/bio/appl/clustalw/report.rb  (CVS)
Parent: Bio::DB

CLUSTAL W result data (*.aln file) parser class.

Methods

align   alignment   header   match_line   new   to_a   to_fasta  

Constants

DELIMITER = nil   Delimiter of each entry. Bio::FlatFile uses it. In Bio::ClustalW::Report, it it nil (1 entry 1 file).

Attributes

raw  [R]  string of whole result
seqclass  [R]  sequence class (one of Bio::Sequence, Bio::Sequence::NA, Bio::Sequence::AA, …)

Public Class methods

Creates new instance. str should be a CLUSTAL format string. seqclass should on of following:

[Source]

# File lib/bio/appl/clustalw/report.rb, line 43
      def initialize(str, seqclass = nil)
        @raw = str
        @align = nil
        @match_line = nil
        @header = nil
        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 = Bio::Sequence
          end
        end
      end

Public Instance methods

This will be deprecated. Instead, please use alignment.

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

[Source]

# File lib/bio/appl/clustalw/report.rb, line 93
      def align
        warn "Bio::ClustalW#align will be deprecated. Please use \'alignment\'."
        alignment
      end

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

[Source]

# File lib/bio/appl/clustalw/report.rb, line 84
      def alignment
        do_parse() unless @align
        @align
      end

Shows first line of the result data, for example, ‘CLUSTAL W (1.82) multiple sequence alignment’. Returns a string.

[Source]

# File lib/bio/appl/clustalw/report.rb, line 71
      def header
        @header or (do_parse or @header)
      end

Shows "match line" of CLUSTAL‘s alignment result, for example, ’:* :* .* * .*::*. ** :* . * . ’. Returns a string.

[Source]

# File lib/bio/appl/clustalw/report.rb, line 78
      def match_line
        @match_line or (do_parse or @match_line)
      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 objects.

[Source]

# File lib/bio/appl/clustalw/report.rb, line 112
      def to_a
        alignment.to_fastaformat_array
      end

This will be deprecated. Instead, please use alignment.output_fasta.

Gets an fasta-format string of the sequences. Returns a string.

[Source]

# File lib/bio/appl/clustalw/report.rb, line 102
      def to_fasta(*arg)
        warn "Bio::ClustalW::report#to_fasta is deprecated. Please use \'alignment.output_fasta\'"
        alignment.output_fasta(*arg)
      end

[Validate]