Class: Rafflesia::GenomeAssemblyData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::GenomeAssemblyData
- Defined in:
- lib/rafflesia/genomes/genome_assembly_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ assembly_id: :assembly_id, contigs: :contigs, name: :name, organism: :organism, source: :source, source_version: :source_version, taxon: :taxon, warnings: :warnings }.freeze
Instance Attribute Summary collapse
-
#assembly_id ⇒ Object
Returns the value of attribute assembly_id.
-
#contigs ⇒ Object
Returns the value of attribute contigs.
-
#name ⇒ Object
Returns the value of attribute name.
-
#organism ⇒ Object
Returns the value of attribute organism.
-
#source ⇒ Object
Returns the value of attribute source.
-
#source_version ⇒ Object
Returns the value of attribute source_version.
-
#taxon ⇒ Object
Returns the value of attribute taxon.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(json) ⇒ GenomeAssemblyData
constructor
A new instance of GenomeAssemblyData.
Constructor Details
#initialize(json) ⇒ GenomeAssemblyData
Returns a new instance of GenomeAssemblyData.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rafflesia/genomes/genome_assembly_data.rb', line 29 def initialize(json) super() hash = self.class.normalize(json) @assembly_id = hash[:assembly_id] @contigs = (hash[:contigs] || []).map { |item| item ? Rafflesia::GenomeContig.new(item) : nil } @name = hash[:name] @organism = hash[:organism] @source = hash[:source] @source_version = hash[:source_version] @taxon = hash[:taxon] @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.
19 20 21 |
# File 'lib/rafflesia/genomes/genome_assembly_data.rb', line 19 def assembly_id @assembly_id end |
#contigs ⇒ Object
Returns the value of attribute contigs.
19 20 21 |
# File 'lib/rafflesia/genomes/genome_assembly_data.rb', line 19 def contigs @contigs end |
#name ⇒ Object
Returns the value of attribute name.
19 20 21 |
# File 'lib/rafflesia/genomes/genome_assembly_data.rb', line 19 def name @name end |
#organism ⇒ Object
Returns the value of attribute organism.
19 20 21 |
# File 'lib/rafflesia/genomes/genome_assembly_data.rb', line 19 def organism @organism end |
#source ⇒ Object
Returns the value of attribute source.
19 20 21 |
# File 'lib/rafflesia/genomes/genome_assembly_data.rb', line 19 def source @source end |
#source_version ⇒ Object
Returns the value of attribute source_version.
19 20 21 |
# File 'lib/rafflesia/genomes/genome_assembly_data.rb', line 19 def source_version @source_version end |
#taxon ⇒ Object
Returns the value of attribute taxon.
19 20 21 |
# File 'lib/rafflesia/genomes/genome_assembly_data.rb', line 19 def taxon @taxon end |
#warnings ⇒ Object
Returns the value of attribute warnings.
19 20 21 |
# File 'lib/rafflesia/genomes/genome_assembly_data.rb', line 19 def warnings @warnings end |