Class: Rafflesia::BlastDbManifest

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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

#artifactsObject

Returns the value of attribute artifacts.



29
30
31
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29

def artifacts
  @artifacts
end

#build_commandObject

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_atObject

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_idObject

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_prefixObject

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

#engineObject

Returns the value of attribute engine.



29
30
31
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29

def engine
  @engine
end

#engine_versionObject

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_formatObject

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_idObject

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_versionObject

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

#moleculeObject

Returns the value of attribute molecule.



29
30
31
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29

def molecule
  @molecule
end

#nameObject

Returns the value of attribute name.



29
30
31
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29

def name
  @name
end

#pack_segmentsObject

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

#parametersObject

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_256Object

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_fastaObject

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

#titleObject

Returns the value of attribute title.



29
30
31
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29

def title
  @title
end

#versionObject

Returns the value of attribute version.



29
30
31
# File 'lib/rafflesia/sequences/blast_db_manifest.rb', line 29

def version
  @version
end