Class: CherrypickPipeline

Inherits:
CherrypickingPipeline show all
Defined in:
app/models/cherrypick_pipeline.rb

Overview

Note:

Cherrypicking is typically processed by an SSR, and the batch worksheet is passed over to the lab. Actual lab work is tracked via Robot::Verification::Base classes through the RobotVerificationsController

Processes CherrypickRequest Allows material from wells on one or more source plates to be laid out onto either a NEW plate of a specified PlatePurpose or onto a plate created as part of an earlier cherrypick.

WARNING! Cherrypick requests create their target wells upfront and are laid out onto otherwise well-less plates. This results in odd behaviour:

  • You cannot cherrypick onto plates with all their wells, even if those wells are empty
  • Prior to processing, wells attached to cherrypick requests will not be assigned to a plate.
  • Occasionally it is possible to pick two wells to the same location. This does not result in pooling or a tag clash, but rather two wells with the same location on the same plate.

Constant Summary

Constants inherited from CherrypickingPipeline

CherrypickingPipeline::PICKED_STATES

Instance Method Summary collapse

Methods inherited from CherrypickingPipeline

#pick_information?, #request_actions, #robot_verified!

Methods included from Pipeline::GroupByParent

#extract_requests_from_input_params, #input_labware, #output_labware, #requests_in_inbox

Methods included from Pipeline::InboxGroupedBySubmission

included

Methods inherited from Pipeline

#all_requests_from_submissions_selected?, #completed_request_as_part_of_release_batch, #detach_request_from_batch, #extract_requests_from_input_params, #input_labware, #is_flowcell_type_consistent_for_batch?, #is_read_length_consistent_for_batch?, #on_start_batch, #output_labware, #pick_information?, #request_actions, #request_count_in_inbox, #request_types_including_controls, #requests_in_inbox, #robot_verified!

Methods included from SharedBehaviour::Named

included

Methods included from Uuid::Uuidable

included, #unsaved_uuid!, #uuid

Methods inherited from ApplicationRecord

alias_association, convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Squishify

extended

Instance Method Details

#post_finish_batch(batch, user) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'app/models/cherrypick_pipeline.rb', line 18

 do
  # NOTE: The following attribute is not required for Microarray Genotyping.
  # I think this might be broken and suggests that there should be separate classes for project: one for
  # next-gen sequencing that includes this attribute in it's metadata, and one for microarray genotyping
  # that doesn't.
  include ProjectManager::Associations
  include BudgetDivision::Associations

  custom_attribute(:project_cost_code, required: true)
  custom_attribute(:funding_comments)
  custom_attribute(:collaborators)
  custom_attribute(:external_funding_source)
  custom_attribute(:sequencing_budget_cost_centre)
  custom_attribute(:project_funding_model, in: PROJECT_FUNDING_MODELS)
  custom_attribute(:gt_committee_tracking_id)

  before_validation do |record|
    record.project_cost_code = nil if record.project_cost_code.blank?
    record.project_funding_model = nil if record.project_funding_model.blank?
  end
end

#post_release_batch(batch, _user) ⇒ Object

rubocop:todo Metrics/MethodLength



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'app/models/cherrypick_pipeline.rb', line 22

 do
  # NOTE: The following attribute is not required for Microarray Genotyping.
  # I think this might be broken and suggests that there should be separate classes for project: one for
  # next-gen sequencing that includes this attribute in it's metadata, and one for microarray genotyping
  # that doesn't.
  include ProjectManager::Associations
  include BudgetDivision::Associations

  custom_attribute(:project_cost_code, required: true)
  custom_attribute(:funding_comments)
  custom_attribute(:collaborators)
  custom_attribute(:external_funding_source)
  custom_attribute(:sequencing_budget_cost_centre)
  custom_attribute(:project_funding_model, in: PROJECT_FUNDING_MODELS)
  custom_attribute(:gt_committee_tracking_id)

  before_validation do |record|
    record.project_cost_code = nil if record.project_cost_code.blank?
    record.project_funding_model = nil if record.project_funding_model.blank?
  end
end