Class: Rafflesia::BlastDbManifest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::BlastDbManifest
- Defined in:
- lib/rafflesia/sequences/blast_db_manifest.rb
Constant Summary collapse
- HASH_ATTRS =
{ artifacts: :artifacts, build_command: :build_command, created_at: :created_at, db_id: :db_id, db_prefix: :db_prefix, engine: :engine, engine_version: :engine_version, index_format: :index_format, manifest_id: :manifest_id, manifest_version: :manifest_version, molecule: :molecule, name: :name, pack_segments: :pack_segments, parameters: :parameters, sequence_order_sha256: :sequence_order_sha_256, source_fasta: :source_fasta, title: :title, version: :version }.freeze
Instance Attribute Summary collapse
-
#artifacts ⇒ Object
Returns the value of attribute artifacts.
-
#build_command ⇒ Object
Returns the value of attribute build_command.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#db_id ⇒ Object
Returns the value of attribute db_id.
-
#db_prefix ⇒ Object
Returns the value of attribute db_prefix.
-
#engine ⇒ Object
Returns the value of attribute engine.
-
#engine_version ⇒ Object
Returns the value of attribute engine_version.
-
#index_format ⇒ Object
Returns the value of attribute index_format.
-
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
-
#manifest_version ⇒ Object
Returns the value of attribute manifest_version.
-
#molecule ⇒ Object
Returns the value of attribute molecule.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pack_segments ⇒ Object
Returns the value of attribute pack_segments.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#sequence_order_sha_256 ⇒ Object
Returns the value of attribute sequence_order_sha_256.
-
#source_fasta ⇒ Object
Returns the value of attribute source_fasta.
-
#title ⇒ Object
Returns the value of attribute title.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(json) ⇒ BlastDbManifest
constructor
A new instance of BlastDbManifest.
Constructor Details
#initialize(json) ⇒ BlastDbManifest
Returns a new instance of BlastDbManifest.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 49 def initialize(json) super() hash = self.class.normalize(json) @artifacts = (hash[:artifacts] || []).map { |item| item ? Rafflesia::BlastDbArtifact.new(item) : nil } @build_command = (hash[:build_command] || []) @created_at = hash[:created_at] @db_id = hash[:db_id] @db_prefix = hash[:db_prefix] @engine = hash[:engine] @engine_version = hash[:engine_version] @index_format = hash[:index_format] @manifest_id = hash[:manifest_id] @manifest_version = hash[:manifest_version] @molecule = hash[:molecule] @name = hash[:name] @pack_segments = (hash[:pack_segments] || []).map { |item| item ? Rafflesia::BlastPackSegmentRef.new(item) : nil } @parameters = hash[:parameters] || {} @sequence_order_sha_256 = hash[:sequence_order_sha256] @source_fasta = hash[:source_fasta] ? Rafflesia::BlastDbArtifact.new(hash[:source_fasta]) : nil @title = hash[:title] @version = hash[:version] end |
Instance Attribute Details
#artifacts ⇒ Object
Returns the value of attribute artifacts.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def artifacts @artifacts end |
#build_command ⇒ Object
Returns the value of attribute build_command.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def build_command @build_command end |
#created_at ⇒ Object
Returns the value of attribute created_at.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def created_at @created_at end |
#db_id ⇒ Object
Returns the value of attribute db_id.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def db_id @db_id end |
#db_prefix ⇒ Object
Returns the value of attribute db_prefix.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def db_prefix @db_prefix end |
#engine ⇒ Object
Returns the value of attribute engine.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def engine @engine end |
#engine_version ⇒ Object
Returns the value of attribute engine_version.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def engine_version @engine_version end |
#index_format ⇒ Object
Returns the value of attribute index_format.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def index_format @index_format end |
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def manifest_id @manifest_id end |
#manifest_version ⇒ Object
Returns the value of attribute manifest_version.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def manifest_version @manifest_version end |
#molecule ⇒ Object
Returns the value of attribute molecule.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def molecule @molecule end |
#name ⇒ Object
Returns the value of attribute name.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def name @name end |
#pack_segments ⇒ Object
Returns the value of attribute pack_segments.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def pack_segments @pack_segments end |
#parameters ⇒ Object
Returns the value of attribute parameters.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def parameters @parameters end |
#sequence_order_sha_256 ⇒ Object
Returns the value of attribute sequence_order_sha_256.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def sequence_order_sha_256 @sequence_order_sha_256 end |
#source_fasta ⇒ Object
Returns the value of attribute source_fasta.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def source_fasta @source_fasta end |
#title ⇒ Object
Returns the value of attribute title.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def title @title end |
#version ⇒ Object
Returns the value of attribute version.
29 30 31 |
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29 def version @version end |