class Bio::Tcoffee::DEFAULT_PARSER
CLUSTAL W result data (*.aln file) parser class.
Constants
- DELIMITER
-
Delimiter of each entry.
Bio::FlatFile
uses it. InBio::ClustalW::Report
, it it nil (1 entry 1 file).
Attributes
string of whole result
sequence class (one of Bio::Sequence
, Bio::Sequence::NA
, Bio::Sequence::AA
, …)
Public Class Methods
Source
# File lib/bio/appl/clustalw/report.rb 46 def initialize(str, seqclass = nil) 47 @raw = str 48 @align = nil 49 @match_line = nil 50 @header = nil 51 case seqclass 52 when /PROTEIN/i 53 @seqclass = Bio::Sequence::AA 54 when /[DR]NA/i 55 @seqclass = Bio::Sequence::NA 56 else 57 if seqclass.is_a?(Module) then 58 @seqclass = seqclass 59 else 60 @seqclass = Bio::Sequence 61 end 62 end 63 end
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’, …
Public Instance Methods
Source
# File lib/bio/appl/clustalw/report.rb 112 def align 113 warn "Bio::ClustalW#align will be deprecated. Please use \'alignment\'." 114 alignment 115 end
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 103 def alignment 104 do_parse() unless @align 105 @align 106 end
Gets an multiple alignment. Returns a Bio::Alignment
object.
Source
# File lib/bio/appl/clustalw/report.rb 84 def get_sequence(row) 85 a = alignment 86 return nil if row < 0 or row >= a.keys.size 87 id = a.keys[row] 88 seq = a.to_hash[id] 89 s = Bio::Sequence.new(seq.seq) 90 s.definition = id 91 s 92 end
Returns the Bio::Sequence
in the matrix at row ‘row’ as Bio::Sequence
object. When row is out of range a nil is returned.
Arguments:
-
(required) row: Integer
- Returns
Source
# File lib/bio/appl/clustalw/report.rb 74 def header 75 @header or (do_parse or @header) 76 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 97 def match_line 98 @match_line or (do_parse or @match_line) 99 end
Shows “match line” of CLUSTAL’s alignment result, for example, ‘:* :* .* * .::. ** :* . * . ’. Returns a string.
Source
# File lib/bio/appl/clustalw/report.rb 131 def to_a 132 alignment.to_fastaformat_array 133 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 121 def to_fasta(*arg) 122 warn "Bio::ClustalW::report#to_fasta is deprecated. Please use \'alignment.output_fasta\'" 123 alignment.output_fasta(*arg) 124 end
This will be deprecated. Instead, please use alignment.output_fasta.
Gets an fasta-format string of the sequences. Returns a string.