Class: Hsp
- Inherits:
-
Object
- Object
- Hsp
- Defined in:
- lib/genevalidator/hsp.rb
Instance Attribute Summary (collapse)
-
- (Object) align_len
Returns the value of attribute align_len.
-
- (Object) bit_score
positive (mis)matches with +, mismatches and gaps are with space.
-
- (Object) gaps
Returns the value of attribute gaps.
-
- (Object) hit_alignment
Returns the value of attribute hit_alignment.
-
- (Object) hit_from
references from the unaligned hit sequence.
-
- (Object) hit_to
Returns the value of attribute hit_to.
-
- (Object) hsp_evalue
Returns the value of attribute hsp_evalue.
-
- (Object) hsp_score
Returns the value of attribute hsp_score.
-
- (Object) identity
number of conserved residues.
-
- (Object) match_query_from
references from the unaligned query sequence.
-
- (Object) match_query_to
Returns the value of attribute match_query_to.
-
- (Object) middles
conserved residues are with letters,.
-
- (Object) pidentity
percentage of identical matches.
-
- (Object) positive
positive score for the (mis)match.
-
- (Object) query_alignment
Returns the value of attribute query_alignment.
-
- (Object) query_reading_frame
Returns the value of attribute query_reading_frame.
Instance Method Summary (collapse)
-
- (Object) init_tabular_attribute(column, value, type = :protein)
Initializes the corresponding attribute of the hsp with respect to the column name of the tabular blast output Params: column: String with column name value: Value of the column type: type of the sequences: :nucleotide or :protein.
-
- (Hsp) initialize
constructor
A new instance of Hsp.
Constructor Details
- (Hsp) initialize
Returns a new instance of Hsp
25 26 27 28 |
# File 'lib/genevalidator/hsp.rb', line 25 def initialize query_alignment = nil hit_alignment = nil end |
Instance Attribute Details
- (Object) align_len
Returns the value of attribute align_len
23 24 25 |
# File 'lib/genevalidator/hsp.rb', line 23 def align_len @align_len end |
- (Object) bit_score
positive (mis)matches with +, mismatches and gaps are with space
16 17 18 |
# File 'lib/genevalidator/hsp.rb', line 16 def bit_score @bit_score end |
- (Object) gaps
Returns the value of attribute gaps
22 23 24 |
# File 'lib/genevalidator/hsp.rb', line 22 def gaps @gaps end |
- (Object) hit_alignment
Returns the value of attribute hit_alignment
11 12 13 |
# File 'lib/genevalidator/hsp.rb', line 11 def hit_alignment @hit_alignment end |
- (Object) hit_from
references from the unaligned hit sequence
6 7 8 |
# File 'lib/genevalidator/hsp.rb', line 6 def hit_from @hit_from end |
- (Object) hit_to
Returns the value of attribute hit_to
7 8 9 |
# File 'lib/genevalidator/hsp.rb', line 7 def hit_to @hit_to end |
- (Object) hsp_evalue
Returns the value of attribute hsp_evalue
18 19 20 |
# File 'lib/genevalidator/hsp.rb', line 18 def hsp_evalue @hsp_evalue end |
- (Object) hsp_score
Returns the value of attribute hsp_score
17 18 19 |
# File 'lib/genevalidator/hsp.rb', line 17 def hsp_score @hsp_score end |
- (Object) identity
number of conserved residues
19 20 21 |
# File 'lib/genevalidator/hsp.rb', line 19 def identity @identity end |
- (Object) match_query_from
references from the unaligned query sequence
8 9 10 |
# File 'lib/genevalidator/hsp.rb', line 8 def match_query_from @match_query_from end |
- (Object) match_query_to
Returns the value of attribute match_query_to
9 10 11 |
# File 'lib/genevalidator/hsp.rb', line 9 def match_query_to @match_query_to end |
- (Object) middles
conserved residues are with letters,
13 14 15 |
# File 'lib/genevalidator/hsp.rb', line 13 def middles @middles end |
- (Object) pidentity
percentage of identical matches
20 21 22 |
# File 'lib/genevalidator/hsp.rb', line 20 def pidentity @pidentity end |
- (Object) positive
positive score for the (mis)match
21 22 23 |
# File 'lib/genevalidator/hsp.rb', line 21 def positive @positive end |
- (Object) query_alignment
Returns the value of attribute query_alignment
12 13 14 |
# File 'lib/genevalidator/hsp.rb', line 12 def query_alignment @query_alignment end |
- (Object) query_reading_frame
Returns the value of attribute query_reading_frame
10 11 12 |
# File 'lib/genevalidator/hsp.rb', line 10 def query_reading_frame @query_reading_frame end |
Instance Method Details
- (Object) init_tabular_attribute(column, value, type = :protein)
Initializes the corresponding attribute of the hsp with respect to the column name of the tabular blast output Params: column: String with column name value: Value of the column type: type of the sequences: :nucleotide or :protein
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/genevalidator/hsp.rb', line 37 def init_tabular_attribute(column, value, type=:protein) case column when "qstart" if type == :nucleotide @match_query_from = (value.to_i/3)+1 else @match_query_from = value.to_i end when "qend" if type == :nucleotide @match_query_to = (value.to_i/3) + 1 else @match_query_to = value.to_i end when "qframe" @query_reading_frame = value.to_i when "sstart" @hit_from = value.to_i when "send" @hit_to = value.to_i when "qseq" @query_alignment = value seq_type = BlastUtils.guess_sequence_type(value) if seq_type != nil and seq_type != :protein raise SequenceTypeError end when "sseq" @hit_alignment = value seq_type = BlastUtils.guess_sequence_type(value) if seq_type != nil and seq_type != :protein raise SequenceTypeError end when "length" @align_len = value.to_i when "pident" @pidentity = value.to_f when "evalue" @hsp_evalue = value.to_f end end |