Class: Rafflesia::GenomeInterval

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/genomes/genome_interval.rb

Constant Summary collapse

HASH_ATTRS =
{
  contig: :contig,
  end: :end,
  length_bp: :length_bp,
  name: :name,
  start: :start,
  strand: :strand
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ GenomeInterval

Returns a new instance of GenomeInterval.



25
26
27
28
29
30
31
32
33
34
# File 'lib/rafflesia/genomes/genome_interval.rb', line 25

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @contig = hash[:contig]
  @end = hash[:end]
  @length_bp = hash[:length_bp]
  @name = hash[:name]
  @start = hash[:start]
  @strand = hash[:strand]
end

Instance Attribute Details

#contigObject

Returns the value of attribute contig.



17
18
19
# File 'lib/rafflesia/genomes/genome_interval.rb', line 17

def contig
  @contig
end

#endObject

Returns the value of attribute end.



17
18
19
# File 'lib/rafflesia/genomes/genome_interval.rb', line 17

def end
  @end
end

#length_bpObject

Returns the value of attribute length_bp.



17
18
19
# File 'lib/rafflesia/genomes/genome_interval.rb', line 17

def length_bp
  @length_bp
end

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/rafflesia/genomes/genome_interval.rb', line 17

def name
  @name
end

#startObject

Returns the value of attribute start.



17
18
19
# File 'lib/rafflesia/genomes/genome_interval.rb', line 17

def start
  @start
end

#strandObject

Returns the value of attribute strand.



17
18
19
# File 'lib/rafflesia/genomes/genome_interval.rb', line 17

def strand
  @strand
end