class Bio::Fasta::Report::Hit::Query
Attributes
Returns a Hash containing 'sq_len', 'sq_offset', 'sq_type', 'al_start', 'al_stop', and 'al_display_start' values. You can access most of these values by Report::Hit#query_* methods.
Returns the definition of the entry as a String. You can access this value by Bio::Fasta::Report::Hit#query_def method.
Returns the sequence (with gaps) as a String. You can access this value by the Bio::Fasta::Report::Hit#query_seq method.
Public Class Methods
# File lib/bio/appl/fasta/format10.rb, line 333 def initialize(data) @definition, *data = data.split(/\n/) @data = {} @sequence = '' pat = /;\s+([^:]+):\s+(.*)/ data.each do |x| if pat.match(x) @data[$1] = $2 else @sequence += x end end end
Public Instance Methods
Returns the first word in the definition as a String. You can get this value by Bio::Fasta::Report::Hit#query_id method.
# File lib/bio/appl/fasta/format10.rb, line 364 def entry_id @definition[/\S+/] end
Returns the sequence length. You can access this value by the Bio::Fasta::Report::Hit#query_len method.
# File lib/bio/appl/fasta/format10.rb, line 370 def length @data['sq_len'].to_i end
Returns 'p' for protein sequence, 'D' for nucleotide sequence.
# File lib/bio/appl/fasta/format10.rb, line 375 def moltype @data['sq_type'] end
Returns alignment start position. You can also access this value by Bio::Fasta::Report::Hit#query_start method for shortcut.
# File lib/bio/appl/fasta/format10.rb, line 381 def start @data['al_start'].to_i end
Returns alignment end position. You can access this value by Bio::Fasta::Report::Hit#query_end method for shortcut.
# File lib/bio/appl/fasta/format10.rb, line 387 def stop @data['al_stop'].to_i end