Class: LibraryCreationPipeline

Inherits:
Pipeline show all
Defined in:
app/models/library_creation_pipeline.rb

Direct Known Subclasses

MultiplexedLibraryCreationPipeline

Constant Summary

Constants inherited from Pipeline

Pipeline::ALWAYS_SHOW_RELEASE_ACTIONS

Instance Method Summary collapse

Methods inherited from Pipeline

#all_requests_from_submissions_selected?, #allow_tag_collision_on_tagging_task?, #completed_request_as_part_of_release_batch, #detach_request_from_batch, #extract_requests_from_input_params, #has_controls?, #input_labware, #is_read_length_consistent_for_batch?, #on_start_batch, #output_labware, #post_finish_batch, #post_release_batch, #request_actions, #request_types_including_controls, #robot_verified!

Methods included from SharedBehaviour::Named

included

Methods included from Pipeline::BatchValidation

#validation_of_batch, #validation_of_batch_for_completion

Methods included from Uuid::Uuidable

included, #unsaved_uuid!, #uuid

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Warren::BroadcastMessages

#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren

Instance Method Details

#create_batch_from_assets(assets) ⇒ Object

This is specific for multiplexing batches for plates Is this still used?


14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/models/library_creation_pipeline.rb', line 14

def create_batch_from_assets(assets)
  batch = create_batch
  ActiveRecord::Base.transaction do
    assets.each do |asset|
      parent_asset_with_request = asset.parents.select { |parent| !parent.requests.empty? }.first
      request = parent_asset_with_request.requests.find_by(state: 'pending', request_type_id: request_type_id)
      request.create_batch_request!(batch: batch, position: asset.map.location_id)
      request.update!(target_asset: asset)
      request.start!
    end
  end
  batch
end

#update_detached_request(batch, request) ⇒ Object


7
8
9
10
# File 'app/models/library_creation_pipeline.rb', line 7

def update_detached_request(batch, request)
  super
  batch.remove_link(request)
end