Class: Rafflesia::MmseqSearchData

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

Constant Summary collapse

HASH_ATTRS =
{
  backend: :backend,
  command: :command,
  dry_run: :dry_run,
  hit_count: :hit_count,
  hits: :hits,
  manifest_id: :manifest_id,
  materialization: :materialization,
  output_object: :output_object,
  output_path: :output_path,
  parameters: :parameters,
  query: :query,
  raw_output_object: :raw_output_object,
  relation: :relation,
  target: :target
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ MmseqSearchData

Returns a new instance of MmseqSearchData.



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 41

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @backend = hash[:backend]
  @command = (hash[:command] || [])
  @dry_run = hash[:dry_run]
  @hit_count = hash[:hit_count]
  @hits = (hash[:hits] || []).map { |item| item ? Rafflesia::MmseqSearchHit.new(item) : nil }
  @manifest_id = hash[:manifest_id]
  @materialization = hash[:materialization] ? Rafflesia::ObjectArtifactMaterializeData.new(hash[:materialization]) : nil
  @output_object = hash[:output_object] ? Rafflesia::ObjectRef.new(hash[:output_object]) : nil
  @output_path = hash[:output_path]
  @parameters = hash[:parameters] || {}
  @query = hash[:query]
  @raw_output_object = hash[:raw_output_object] ? Rafflesia::ObjectRef.new(hash[:raw_output_object]) : nil
  @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil
  @target = hash[:target]
end

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def backend
  @backend
end

#commandObject

Returns the value of attribute command.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def command
  @command
end

#dry_runObject

Returns the value of attribute dry_run.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def dry_run
  @dry_run
end

#hit_countObject

Returns the value of attribute hit_count.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def hit_count
  @hit_count
end

#hitsObject

Returns the value of attribute hits.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def hits
  @hits
end

#manifest_idObject

Returns the value of attribute manifest_id.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def manifest_id
  @manifest_id
end

#materializationObject

Returns the value of attribute materialization.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def materialization
  @materialization
end

#output_objectObject

Returns the value of attribute output_object.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def output_object
  @output_object
end

#output_pathObject

Returns the value of attribute output_path.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def output_path
  @output_path
end

#parametersObject

Returns the value of attribute parameters.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def parameters
  @parameters
end

#queryObject

Returns the value of attribute query.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def query
  @query
end

#raw_output_objectObject

Returns the value of attribute raw_output_object.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def raw_output_object
  @raw_output_object
end

#relationObject

Returns the value of attribute relation.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def relation
  @relation
end

#targetObject

Returns the value of attribute target.



25
26
27
# File 'lib/rafflesia/sequences/mmseq_search_data.rb', line 25

def target
  @target
end