Module: IlluminaC::PlatePurposes

Extended by:
IlluminaHtp::PlatePurposes::PurposeHelpers
Defined in:
app/models/illumina_c/plate_purposes.rb

Constant Summary collapse

PLATE_PURPOSE_FLOWS =
[
  [
    'ILC Stock',
    'ILC AL Libs',
    'ILC Lib PCR',
    'ILC Lib PCR-XP',
    'ILC AL Libs Tagged',
    'ILC Lib Chromium'
  ]
]
TUBE_PURPOSE_FLOWS =
[
  [
    'ILC Lib Pool Norm'
  ]
]
QC_TUBE_PURPOSE_FLOWS =
[]
QC_TUBE =
'ILC QC Pool'
BRANCHES =
[
  ['ILC Stock', 'ILC AL Libs', 'ILC Lib PCR', 'ILC Lib PCR-XP', 'ILC Lib Pool Norm'],
  ['ILC Stock', 'ILC AL Libs Tagged', 'ILC Lib Pool Norm'],
  ['ILC Stock', 'ILC Lib Chromium', 'ILC Lib Pool Norm']
]
STOCK_PLATE_PURPOSE =
'ILC Stock'
PLATE_PURPOSE_LEADING_TO_QC_TUBES =

We Don't have QC Plates

[
  'ILC AL Libs Tagged',
  'ILC Lib PCR-XP'
]
STOCK_PLATE_PURPOSE_TO_OUTER_REQUEST =
[
  ['ILC Stock', 'illumina_c_pcr'],
  ['ILC Stock', 'illumina_c_nopcr'],
  ['ILC Stock', 'illumina_c_pcr_no_pool'],
  ['ILC Stock', 'illumina_c_no_pcr_no_pool'],
  ['ILC Stock', 'illumina_c_chromium_library']
]
OUTPUT_PLATE_PURPOSES =
[]
PLATE_PURPOSE_TYPE =
{
  'ILC QC Pool' => IlluminaC::QcPoolPurpose,
  'ILC Stock' => IlluminaC::StockPurpose,
  'ILC AL Libs' => PlatePurpose::InitialPurpose,
  'ILC Lib PCR' => IlluminaC::LibPcrPurpose,
  'ILC Lib PCR-XP' => IlluminaC::LibPcrXpPurpose,
  'ILC AL Libs Tagged' => IlluminaC::AlLibsTaggedPurpose,
  'ILC Lib Chromium' => IlluminaC::AlLibsTaggedPurpose,
  'ILC Lib Pool Norm' => IlluminaC::MxTubePurpose
}

Class Method Summary collapse

Class Method Details

.create_qc_platesObject


64
65
66
# File 'app/models/illumina_c/plate_purposes.rb', line 64

def self.create_qc_plates
  nil
end

.create_qc_tubesObject


73
74
75
76
77
78
79
80
81
# File 'app/models/illumina_c/plate_purposes.rb', line 73

def self.create_qc_tubes
  ActiveRecord::Base.transaction do
    qc_tube_purpose = purpose_for(self::QC_TUBE).create!(name: self::QC_TUBE, target_type: 'QcTube', barcode_printer_type: BarcodePrinterType1DTube.first)
    self::PLATE_PURPOSE_LEADING_TO_QC_TUBES.each do |name|
      plate_purpose = Purpose.find_by(name: name) or raise StandardError, "Cannot find purpose #{name.inspect}"
      plate_purpose.child_relationships.create!(child: qc_tube_purpose)
    end
  end
end

.create_tube_purposesObject


68
69
70
71
# File 'app/models/illumina_c/plate_purposes.rb', line 68

def self.create_tube_purposes
  super
  create_qc_tubes
end

.request_type_prefixObject


58
59
60
# File 'app/models/illumina_c/plate_purposes.rb', line 58

def self.request_type_prefix
  'Illumina-C'
end