Module: LabwareCreators

Defined in:
app/models/labware_creators.rb,
app/models/labware_creators/base.rb,
app/models/labware_creators/ten_stamp.rb,
app/models/labware_creators/final_tube.rb,
app/models/labware_creators/multi_stamp.rb,
app/models/labware_creators/uncreatable.rb,
app/models/labware_creators/baited_plate.rb,
app/models/labware_creators/merged_plate.rb,
app/models/labware_creators/tagged_plate.rb,
app/models/labware_creators/stamped_plate.rb,
app/models/labware_creators/quadrant_stamp.rb,
app/models/labware_creators/tube_from_tube.rb,
app/models/labware_creators/multi_plate_pool.rb,
app/models/labware_creators/multi_stamp_tubes.rb,
app/models/labware_creators/pooled_tubes_base.rb,
app/models/labware_creators/custom_pooled_tubes.rb,
app/models/labware_creators/custom_tagged_plate.rb,
app/models/labware_creators/donor_pooling_plate.rb,
app/models/labware_creators/plate_with_template.rb,
app/models/labware_creators/quadrant_stamp_base.rb,
app/models/labware_creators/cardinal_pools_plate.rb,
app/models/labware_creators/quadrant_split_plate.rb,
app/models/labware_creators/final_tube_from_plate.rb,
app/models/labware_creators/partial_stamped_plate.rb,
app/models/labware_creators/fixed_normalised_plate.rb,
app/models/labware_creators/pooled_tubes_by_sample.rb,
app/models/labware_creators/normalised_binned_plate.rb,
app/models/labware_creators/plate_with_primer_panel.rb,
app/models/labware_creators/plate_split_to_tube_racks.rb,
app/models/labware_creators/concentration_binned_plate.rb,
app/models/labware_creators/pooled_tubes_by_submission.rb,
app/models/labware_creators/quadrant_stamp_primer_panel.rb,
app/models/labware_creators/custom_pooled_tubes/csv_file.rb,
app/models/labware_creators/multi_stamp_library_splitter.rb,
app/models/labware_creators/pcr_cycles_binned_plate_base.rb,
app/models/labware_creators/pooled_tubes_from_whole_tubes.rb,
app/models/labware_creators/concentration_normalised_plate.rb,
app/models/labware_creators/pooled_tubes_from_whole_plates.rb,
app/models/labware_creators/custom_pooled_tubes/csv_file/row.rb,
app/models/labware_creators/pooled_wells_by_sample_in_groups.rb,
app/models/labware_creators/common_file_handling/csv_file_base.rb,
app/models/labware_creators/custom_pooled_tubes/csv_file/header.rb,
app/models/labware_creators/pcr_cycles_binned_plate/csv_file_base.rb,
app/models/labware_creators/pooled_tubes_by_submission_with_phi_x.rb,
app/models/labware_creators/common_file_handling/csv_file/row_base.rb,
app/models/labware_creators/multi_stamp_tubes_using_tube_rack_scan.rb,
app/models/labware_creators/partial_stamped_plate_without_dilution.rb,
app/models/labware_creators/pcr_cycles_binned_plate_for_duplex_seq.rb,
app/models/labware_creators/pcr_cycles_binned_plate_for_t_nano_seq.rb,
app/models/labware_creators/stamped_plate_adding_randomised_controls.rb,
app/models/labware_creators/pcr_cycles_binned_plate/csv_file/row_base.rb,
app/models/labware_creators/common_file_handling/csv_file_for_tube_rack.rb,
app/models/labware_creators/common_file_handling/csv_file/row_for_tube_rack.rb,
app/models/labware_creators/pcr_cycles_binned_plate/csv_file/duplex_seq/row.rb,
app/models/labware_creators/pcr_cycles_binned_plate/csv_file/t_nano_seq/row.rb,
app/models/labware_creators/pcr_cycles_binned_plate/csv_file_for_duplex_seq.rb,
app/models/labware_creators/pcr_cycles_binned_plate/csv_file_for_t_nano_seq.rb,
app/models/labware_creators/pcr_cycles_binned_plate/csv_file/plate_barcode_header.rb,
app/models/labware_creators/pcr_cycles_binned_plate/csv_file/well_details_header_base.rb,
app/models/labware_creators/common_file_handling/csv_file_for_tube_rack_with_rack_barcode.rb,
app/models/labware_creators/pcr_cycles_binned_plate/csv_file/duplex_seq/well_details_header.rb,
app/models/labware_creators/pcr_cycles_binned_plate/csv_file/t_nano_seq/well_details_header.rb,
app/models/labware_creators/common_file_handling/csv_file/row_for_tube_rack_with_rack_barcode.rb

Overview

Part of the Labware creator classes

Defined Under Namespace

Modules: CommonFileHandling, CustomPage, DonorPoolingCalculator, DonorPoolingValidator, GenerateQcResults, NoCustomPage, PcrCyclesBinnedPlate, RequireWellsWithCollectedBy, RequireWellsWithConcentrations, SupportParent, TaggedPlateBehaviour, Tagging Classes: BaitedPlate, Base, CardinalPoolsPlate, ConcentrationBinnedPlate, ConcentrationNormalisedPlate, CreatorButton, CustomCreatorButton, CustomPooledTubes, CustomTaggedPlate, DonorPoolingPlate, FinalTube, FinalTubeFromPlate, FixedNormalisedPlate, MergedPlate, MultiPlatePool, MultiStamp, MultiStampLibrarySplitter, MultiStampTubes, MultiStampTubesUsingTubeRackScan, NormalisedBinnedPlate, PartialStampedPlate, PartialStampedPlateWithoutDilution, PcrCyclesBinnedPlateBase, PcrCyclesBinnedPlateForDuplexSeq, PcrCyclesBinnedPlateForTNanoSeq, PlateSplitToTubeRacks, PlateWithPrimerPanel, PlateWithTemplate, PooledTubesBase, PooledTubesBySample, PooledTubesBySubmission, PooledTubesBySubmissionWithPhiX, PooledTubesFromWholePlates, PooledTubesFromWholeTubes, PooledWellsBySampleInGroups, QuadrantSplitPlate, QuadrantStamp, QuadrantStampBase, QuadrantStampPrimerPanel, ResourceInvalid, StampedPlate, StampedPlateAddingRandomisedControls, TaggedPlate, TenStamp, TubeFromTube, Uncreatable, WellFilter, WellFilterAllowingPartials

Class Method Summary collapse

Class Method Details

.class_for(purpose_uuid) ⇒ Object



15
16
17
18
19
20
21
# File 'app/models/labware_creators.rb', line 15

def self.class_for(purpose_uuid)
  # While most creators have a creator_class assigned by default, this wasn't the case with tube racks
  # when first added. Here we fall back to 'LabwareCreators::Uncreatable' in cases where the purpose is
  # not fully configured
  refer = Settings.purposes.fetch(purpose_uuid, {}).fetch(:creator_class, 'LabwareCreators::Uncreatable')
  refer.is_a?(String) ? refer.constantize : refer[:name].constantize
end

.params_for(purpose_uuid) ⇒ Object



23
24
25
26
27
28
# File 'app/models/labware_creators.rb', line 23

def self.params_for(purpose_uuid)
  refer = Settings.purposes.fetch(purpose_uuid, {}).fetch(:creator_class, 'LabwareCreators::Uncreatable')
  return { params: {} } if refer.is_a?(String)

  { params: refer[:params] }
end