Class: SequencescapeExcel::SpecialisedField::ReferenceGenome

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
app/sequencescape_excel/sequencescape_excel/specialised_field/reference_genome.rb

Overview

The reference genome is a value which must already exist. Reference genome is stored as object on sample_metadata

Instance Attribute Summary collapse

Attributes included from Base

#sample_manifest_asset, #value

Instance Method Summary collapse

Methods included from Base

#link

Instance Attribute Details

#reference_genomeObject



19
20
21
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/reference_genome.rb', line 19

def reference_genome
  @reference_genome ||= ::ReferenceGenome.find_by(name: value)
end

Instance Method Details

#update(_attributes = {}) ⇒ Object



15
16
17
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/reference_genome.rb', line 15

def update(_attributes = {})
  sample..reference_genome = reference_genome if valid?
end