Class: Rafflesia::BlastSearchData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/sequences/blast_search_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  backend: :backend,
  command: :command,
  db: :db,
  db_prefix: :db_prefix,
  db_refs: :db_refs,
  dry_run: :dry_run,
  hit_count: :hit_count,
  hits: :hits,
  index_format: :index_format,
  manifest_id: :manifest_id,
  materialization: :materialization,
  normalized_output_object: :normalized_output_object,
  output_object: :output_object,
  output_path: :output_path,
  pack_access_mode: :pack_access_mode,
  parameters: :parameters,
  plan: :plan,
  profile: :profile,
  program: :program,
  query: :query,
  raw_output_object: :raw_output_object,
  raw_output_objects: :raw_output_objects,
  relation: :relation,
  remote_read_metrics: :remote_read_metrics,
  routing: :routing,
  shards: :shards
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ BlastSearchData

Returns a new instance of BlastSearchData.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 65

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @backend = hash[:backend]
  @command = (hash[:command] || [])
  @db = hash[:db]
  @db_prefix = hash[:db_prefix]
  @db_refs = (hash[:db_refs] || [])
  @dry_run = hash[:dry_run]
  @hit_count = hash[:hit_count]
  @hits = (hash[:hits] || []).map { |item| item ? Rafflesia::BlastSearchHit.new(item) : nil }
  @index_format = hash[:index_format]
  @manifest_id = hash[:manifest_id]
  @materialization = hash[:materialization] ? Rafflesia::BlastDbMaterializeData.new(hash[:materialization]) : nil
  @normalized_output_object = hash[:normalized_output_object] ? Rafflesia::ObjectRef.new(hash[:normalized_output_object]) : nil
  @output_object = hash[:output_object] ? Rafflesia::ObjectRef.new(hash[:output_object]) : nil
  @output_path = hash[:output_path]
  @pack_access_mode = hash[:pack_access_mode]
  @parameters = hash[:parameters] || {}
  @plan = hash[:plan] ? Rafflesia::BlastSearchPlanData.new(hash[:plan]) : nil
  @profile = hash[:profile] ? Rafflesia::BlastSearchProfile.new(hash[:profile]) : nil
  @program = hash[:program]
  @query = hash[:query]
  @raw_output_object = hash[:raw_output_object] ? Rafflesia::ObjectRef.new(hash[:raw_output_object]) : nil
  @raw_output_objects = (hash[:raw_output_objects] || []).map { |item| item ? Rafflesia::ObjectRef.new(item) : nil }
  @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil
  @remote_read_metrics = hash[:remote_read_metrics] ? Rafflesia::BlastRemoteReadMetrics.new(hash[:remote_read_metrics]) : nil
  @routing = hash[:routing] ? Rafflesia::BlastSearchRoutingData.new(hash[:routing]) : nil
  @shards = (hash[:shards] || []).map { |item| item ? Rafflesia::BlastSearchShardData.new(item) : nil }
end

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def backend
  @backend
end

#commandObject

Returns the value of attribute command.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def command
  @command
end

#dbObject

Returns the value of attribute db.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def db
  @db
end

#db_prefixObject

Returns the value of attribute db_prefix.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def db_prefix
  @db_prefix
end

#db_refsObject

Returns the value of attribute db_refs.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def db_refs
  @db_refs
end

#dry_runObject

Returns the value of attribute dry_run.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def dry_run
  @dry_run
end

#hit_countObject

Returns the value of attribute hit_count.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def hit_count
  @hit_count
end

#hitsObject

Returns the value of attribute hits.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def hits
  @hits
end

#index_formatObject

Returns the value of attribute index_format.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def index_format
  @index_format
end

#manifest_idObject

Returns the value of attribute manifest_id.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def manifest_id
  @manifest_id
end

#materializationObject

Returns the value of attribute materialization.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def materialization
  @materialization
end

#normalized_output_objectObject

Returns the value of attribute normalized_output_object.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def normalized_output_object
  @normalized_output_object
end

#output_objectObject

Returns the value of attribute output_object.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def output_object
  @output_object
end

#output_pathObject

Returns the value of attribute output_path.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def output_path
  @output_path
end

#pack_access_modeObject

Returns the value of attribute pack_access_mode.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def pack_access_mode
  @pack_access_mode
end

#parametersObject

Returns the value of attribute parameters.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def parameters
  @parameters
end

#planObject

Returns the value of attribute plan.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def plan
  @plan
end

#profileObject

Returns the value of attribute profile.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def profile
  @profile
end

#programObject

Returns the value of attribute program.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def program
  @program
end

#queryObject

Returns the value of attribute query.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def query
  @query
end

#raw_output_objectObject

Returns the value of attribute raw_output_object.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def raw_output_object
  @raw_output_object
end

#raw_output_objectsObject

Returns the value of attribute raw_output_objects.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def raw_output_objects
  @raw_output_objects
end

#relationObject

Returns the value of attribute relation.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def relation
  @relation
end

#remote_read_metricsObject

Returns the value of attribute remote_read_metrics.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def remote_read_metrics
  @remote_read_metrics
end

#routingObject

Returns the value of attribute routing.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def routing
  @routing
end

#shardsObject

Returns the value of attribute shards.



37
38
39
# File 'lib/rafflesia/sequences/blast_search_data.rb', line 37

def shards
  @shards
end