Class | Bio::ClustalW::Report
In: | lib/bio/appl/clustalw/report.rb
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

new(str, seqclass = nil)

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

- Class: Bio::Sequence::AA, Bio::Sequence::NA, …
- String: ‘PROTEIN’, ‘DNA’, …

[Source]

        # File lib/bio/appl/clustalw/report.rb, line 43
    43:       def initialize(str, seqclass = nil)
    44:         @raw = str
    45:         @align = nil
    46:         @match_line = nil
    47:         @header = nil
    48:         case seqclass
    49:         when /PROTEIN/i
    50:           @seqclass = Bio::Sequence::AA
    51:         when /[DR]NA/i
    52:           @seqclass = Bio::Sequence::NA
    53:         else
    54:           if seqclass.is_a?(Module) then
    55:             @seqclass = seqclass
    56:           else
    57:             @seqclass = Bio::Sequence
    58:           end
    59:         end
    60:       end

### Public Instance methods

align()

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
    93:       def align
    94:         warn "Bio::ClustalW#align will be deprecated. Please use \'alignment\'."
    95:         alignment
    96:       end

alignment()

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

[Source]

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

header()

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
    71:       def header
    72:         @header or (do_parse or @header)
    73:       end

match_line()

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

[Source]

        # File lib/bio/appl/clustalw/report.rb, line 78
    78:       def match_line
    79:         @match_line or (do_parse or @match_line)
    80:       end

to_a()

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
    112:       def to_a
    113:         alignment.to_fastaformat_array
    114:       end

to_fasta(*arg)

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

[Validate]