Class: Rafflesia::GenomeRegionData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::GenomeRegionData
- Defined in:
- lib/rafflesia/genomes/genome_region_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ assembly_id: :assembly_id, contig: :contig, coordinate_system: :coordinate_system, end: :end, length_bp: :length_bp, normalized: :normalized, start: :start, strand: :strand, warnings: :warnings }.freeze
Instance Attribute Summary collapse
-
#assembly_id ⇒ Object
Returns the value of attribute assembly_id.
-
#contig ⇒ Object
Returns the value of attribute contig.
-
#coordinate_system ⇒ Object
Returns the value of attribute coordinate_system.
-
#end ⇒ Object
Returns the value of attribute end.
-
#length_bp ⇒ Object
Returns the value of attribute length_bp.
-
#normalized ⇒ Object
Returns the value of attribute normalized.
-
#start ⇒ Object
Returns the value of attribute start.
-
#strand ⇒ Object
Returns the value of attribute strand.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(json) ⇒ GenomeRegionData
constructor
A new instance of GenomeRegionData.
Constructor Details
#initialize(json) ⇒ GenomeRegionData
Returns a new instance of GenomeRegionData.
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/rafflesia/genomes/genome_region_data.rb', line 31 def initialize(json) super() hash = self.class.normalize(json) @assembly_id = hash[:assembly_id] @contig = hash[:contig] @coordinate_system = hash[:coordinate_system] @end = hash[:end] @length_bp = hash[:length_bp] @normalized = hash[:normalized] @start = hash[:start] @strand = hash[:strand] @warnings = (hash[:warnings] || []).map { |item| item ? Rafflesia::SearchWarning.new(item) : nil } end |
Instance Attribute Details
#assembly_id ⇒ Object
Returns the value of attribute assembly_id.
20 21 22 |
# File 'lib/rafflesia/genomes/genome_region_data.rb', line 20 def assembly_id @assembly_id end |
#contig ⇒ Object
Returns the value of attribute contig.
20 21 22 |
# File 'lib/rafflesia/genomes/genome_region_data.rb', line 20 def contig @contig end |
#coordinate_system ⇒ Object
Returns the value of attribute coordinate_system.
20 21 22 |
# File 'lib/rafflesia/genomes/genome_region_data.rb', line 20 def coordinate_system @coordinate_system end |
#end ⇒ Object
Returns the value of attribute end.
20 21 22 |
# File 'lib/rafflesia/genomes/genome_region_data.rb', line 20 def end @end end |
#length_bp ⇒ Object
Returns the value of attribute length_bp.
20 21 22 |
# File 'lib/rafflesia/genomes/genome_region_data.rb', line 20 def length_bp @length_bp end |
#normalized ⇒ Object
Returns the value of attribute normalized.
20 21 22 |
# File 'lib/rafflesia/genomes/genome_region_data.rb', line 20 def normalized @normalized end |
#start ⇒ Object
Returns the value of attribute start.
20 21 22 |
# File 'lib/rafflesia/genomes/genome_region_data.rb', line 20 def start @start end |
#strand ⇒ Object
Returns the value of attribute strand.
20 21 22 |
# File 'lib/rafflesia/genomes/genome_region_data.rb', line 20 def strand @strand end |
#warnings ⇒ Object
Returns the value of attribute warnings.
20 21 22 |
# File 'lib/rafflesia/genomes/genome_region_data.rb', line 20 def warnings @warnings end |