Class: Ensembl::Helpers::VariationPosition
- Inherits:
-
Object
- Object
- Ensembl::Helpers::VariationPosition
- Defined in:
- lib/ensembl/helpers/variation_position.rb
Instance Attribute Summary collapse
-
#chromosome ⇒ Object
readonly
Returns the value of attribute chromosome.
-
#end_pos ⇒ Object
readonly
Returns the value of attribute end_pos.
-
#start_pos ⇒ Object
readonly
Returns the value of attribute start_pos.
Instance Method Summary collapse
-
#initialize(row) ⇒ VariationPosition
constructor
A new instance of VariationPosition.
- #strand ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(row) ⇒ VariationPosition
14 15 16 |
# File 'lib/ensembl/helpers/variation_position.rb', line 14 def initialize(row) @chromosome,@start_pos,@end_pos,@strand=row end |
Instance Attribute Details
#chromosome ⇒ Object (readonly)
Returns the value of attribute chromosome.
12 13 14 |
# File 'lib/ensembl/helpers/variation_position.rb', line 12 def chromosome @chromosome end |
#end_pos ⇒ Object (readonly)
Returns the value of attribute end_pos.
12 13 14 |
# File 'lib/ensembl/helpers/variation_position.rb', line 12 def end_pos @end_pos end |
#start_pos ⇒ Object (readonly)
Returns the value of attribute start_pos.
12 13 14 |
# File 'lib/ensembl/helpers/variation_position.rb', line 12 def start_pos @start_pos end |
Instance Method Details
#strand ⇒ Object
18 19 20 21 22 23 |
# File 'lib/ensembl/helpers/variation_position.rb', line 18 def strand if @strand==1 return 'forward' end 'reverse' end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/ensembl/helpers/variation_position.rb', line 25 def to_s 'Chromosome: ' + @chromosome + ' ' + @start_pos.to_s + ':' + @end_pos.to_s end |