Module: SampleManifest::CoreBehaviour::LibraryAssets

Included in:
LibraryPlateBehaviour::Core, LibraryTubeBehaviour::Core, MultiplexedLibraryBehaviour::Core
Defined in:
app/models/sample_manifest/core_behaviour.rb

Instance Method Summary collapse

Instance Method Details

#generate_sample_and_aliquot(sanger_sample_id, receptacle) ⇒ Object


42
43
44
45
46
47
# File 'app/models/sample_manifest/core_behaviour.rb', line 42

def generate_sample_and_aliquot(sanger_sample_id, receptacle)
  create_sample(sanger_sample_id).tap do |sample|
    receptacle.aliquots.create!(sample: sample, study: study, library: receptacle)
    study.samples << sample
  end
end