Class: GENOME::SNP
- Inherits:
-
Object
- Object
- GENOME::SNP
- Defined in:
- lib/genome/snp.rb
Instance Attribute Summary collapse
-
#chromosome ⇒ Object
Returns the value of attribute chromosome.
-
#genotype ⇒ Object
Returns the value of attribute genotype.
-
#position ⇒ Object
Returns the value of attribute position.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(chromosome, position, genotype) ⇒ SNP
constructor
A new instance of SNP.
- #to_s ⇒ Object
Constructor Details
#initialize(chromosome, position, genotype) ⇒ SNP
Returns a new instance of SNP.
4 5 6 7 8 |
# File 'lib/genome/snp.rb', line 4 def initialize(chromosome, position, genotype) @chromosome = chromosome @position = position @genotype = genotype end |
Instance Attribute Details
#chromosome ⇒ Object
Returns the value of attribute chromosome.
3 4 5 |
# File 'lib/genome/snp.rb', line 3 def chromosome @chromosome end |
#genotype ⇒ Object
Returns the value of attribute genotype.
3 4 5 |
# File 'lib/genome/snp.rb', line 3 def genotype @genotype end |
#position ⇒ Object
Returns the value of attribute position.
3 4 5 |
# File 'lib/genome/snp.rb', line 3 def position @position end |
Instance Method Details
#==(other) ⇒ Object
14 15 16 17 18 |
# File 'lib/genome/snp.rb', line 14 def ==(other) chromosome == other.chromosome && @position == other.position && @genotype == other.genotype end |
#to_s ⇒ Object
10 11 12 |
# File 'lib/genome/snp.rb', line 10 def to_s "<SNP: chromosome=#{chromosome} position=#{position} genotype=#{genotype}>" end |