Class: GeneValidator::Query
- Inherits:
-
Object
- Object
- GeneValidator::Query
- Defined in:
- lib/genevalidator/query.rb
Overview
This is a class for the storing data on each sequence
Instance Attribute Summary collapse
-
#accession_no ⇒ Object
Returns the value of attribute accession_no.
-
#definition ⇒ Object
Returns the value of attribute definition.
-
#hsp_list ⇒ Object
array of Hsp objects.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#length_protein ⇒ Object
Returns the value of attribute length_protein.
-
#nucleotide_rf ⇒ Object
used only for nucleotides.
-
#protein_translation ⇒ Object
used only for nucleotides.
-
#raw_sequence ⇒ Object
Returns the value of attribute raw_sequence.
-
#reading_frame ⇒ Object
Returns the value of attribute reading_frame.
-
#species ⇒ Object
Returns the value of attribute species.
-
#type ⇒ Object
protein | mRNA.
Instance Method Summary collapse
-
#init_tabular_attribute(hash) ⇒ Object
Initializes the corresponding attribute of the sequence with respect to the column name of the tabular blast output.
-
#initialize ⇒ Query
constructor
A new instance of Query.
Constructor Details
#initialize ⇒ Query
Returns a new instance of Query.
17 18 19 20 21 22 |
# File 'lib/genevalidator/query.rb', line 17 def initialize @hsp_list = [] @raw_sequence = nil @protein_translation = nil @nucleotide_rf = nil end |
Instance Attribute Details
#accession_no ⇒ Object
Returns the value of attribute accession_no.
8 9 10 |
# File 'lib/genevalidator/query.rb', line 8 def accession_no @accession_no end |
#definition ⇒ Object
Returns the value of attribute definition.
5 6 7 |
# File 'lib/genevalidator/query.rb', line 5 def definition @definition end |
#hsp_list ⇒ Object
array of Hsp objects
11 12 13 |
# File 'lib/genevalidator/query.rb', line 11 def hsp_list @hsp_list end |
#identifier ⇒ Object
Returns the value of attribute identifier.
6 7 8 |
# File 'lib/genevalidator/query.rb', line 6 def identifier @identifier end |
#length_protein ⇒ Object
Returns the value of attribute length_protein.
9 10 11 |
# File 'lib/genevalidator/query.rb', line 9 def length_protein @length_protein end |
#nucleotide_rf ⇒ Object
used only for nucleotides
15 16 17 |
# File 'lib/genevalidator/query.rb', line 15 def nucleotide_rf @nucleotide_rf end |
#protein_translation ⇒ Object
used only for nucleotides
14 15 16 |
# File 'lib/genevalidator/query.rb', line 14 def protein_translation @protein_translation end |
#raw_sequence ⇒ Object
Returns the value of attribute raw_sequence.
13 14 15 |
# File 'lib/genevalidator/query.rb', line 13 def raw_sequence @raw_sequence end |
#reading_frame ⇒ Object
Returns the value of attribute reading_frame.
10 11 12 |
# File 'lib/genevalidator/query.rb', line 10 def reading_frame @reading_frame end |
#species ⇒ Object
Returns the value of attribute species.
7 8 9 |
# File 'lib/genevalidator/query.rb', line 7 def species @species end |
#type ⇒ Object
protein | mRNA
4 5 6 |
# File 'lib/genevalidator/query.rb', line 4 def type @type end |
Instance Method Details
#init_tabular_attribute(hash) ⇒ Object
Initializes the corresponding attribute of the sequence with respect to the column name of the tabular blast output
31 32 33 34 35 |
# File 'lib/genevalidator/query.rb', line 31 def init_tabular_attribute(hash) @identifier = hash['sseqid'] if hash['sseqid'] @accession_no = hash['sacc'] if hash['sacc'] @length_protein = hash['slen'].to_i if hash['slen'] end |