Class: LabwareCreators::TaggedPlate

Inherits:
Base
  • Object
show all
Includes:
CustomPage, SupportParent::PlateOnly, TaggedPlateBehaviour
Defined in:
app/models/labware_creators/tagged_plate.rb

Overview

Handles transfer of material into a pre-existing tag plate, created via Gatekeeper. It performs a few actions: 1) Updates the state of the tag plate to flag the resource as exhausted

(Tag plates delegate their state to the qcable)

2) Converts the tag plate to a new plate purpose 3) Transfers the material from the parent, into the converted tag plate (Now the child) 4) Applies the tag template that was associated with the tag plate

Defined Under Namespace

Classes: QcableObject

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ TaggedPlate

Returns a new instance of TaggedPlate.



33
34
35
36
# File 'app/models/labware_creators/tagged_plate.rb', line 33

def initialize(*args, &block)
  super
  parent.populate_wells_with_pool
end

Instance Attribute Details

#childObject (readonly)

Returns the value of attribute child.



16
17
18
# File 'app/models/labware_creators/tagged_plate.rb', line 16

def child
  @child
end

#tag_plateObject

Returns the value of attribute tag_plate.



16
17
18
# File 'app/models/labware_creators/tagged_plate.rb', line 16

def tag_plate
  @tag_plate
end

#tag_plate_barcodeObject

Returns the value of attribute tag_plate_barcode.



17
18
19
# File 'app/models/labware_creators/tagged_plate.rb', line 17

def tag_plate_barcode
  @tag_plate_barcode
end

Instance Method Details

#create_plate! {|tag_plate.asset_uuid| ... } ⇒ Object

Yields:



38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'app/models/labware_creators/tagged_plate.rb', line 38

def create_plate!
  transfer_material_from_parent!(tag_plate.asset_uuid)

  yield(tag_plate.asset_uuid) if block_given?

  flag_tag_plate_as_exhausted

  # Convert plate instead of creating it
  # Target returns the newly converted tag plate
  @child = convert_tag_plate_to_new_purpose.target

  true
end

#cross_plate_pool_detection?Bool Originally defined in module TaggedPlateBehaviour

Note:

This option is safest to enable when:

  • The pipeline has an earlier consolidation step

  • The pipeline will never pool at a higher level than the current late

  • Only one template is available anyway

In other scenarios you may be at risk of introducing tag clashes.

In the LTHR pipeline we begin with 4x96 well plates, which get combined on a single 384 well plate. This means that the cross-plate pool detection enforces unique UDI plates. This causes problems if a tag plate is used in error, and there needs to be a rework loop. As on the second run through, tag clash detection fires.

By setting the disable_cross_plate_pool_detection config option you can turn off this check.

Returns:

  • (Bool)

    Whether to disable tag uniqueness detection

#enforce_same_template_within_pool?Boolean

Returns:

  • (Boolean)


60
61
62
# File 'app/models/labware_creators/tagged_plate.rb', line 60

def enforce_same_template_within_pool?
  purpose_config.fetch(:enforce_same_template_within_pool, false)
end

#flag_tag_plate_as_exhaustedSequencescape::Api::StateChange Originally defined in module TaggedPlateBehaviour

Update the state of the tag plate to ‘exhausted’

Returns:

  • (Sequencescape::Api::StateChange)

    The created state change

#helpObject



52
53
54
# File 'app/models/labware_creators/tagged_plate.rb', line 52

def help
  requires_tag2? ? 'dual_plate' : 'single'
end

#parentObject Originally defined in module SupportParent::PlateOnly

#pool_index(_pool_index) ⇒ Object



56
57
58
# File 'app/models/labware_creators/tagged_plate.rb', line 56

def pool_index(_pool_index)
  nil
end

#requires_tag2?Boolean Originally defined in module TaggedPlateBehaviour

Indicated that an i5 tag (tag2) is required for the tagging of this particular plate. i5 tags are required when a submission spans multiple plates, which will be tagged independently, and then pooled.

The combination of i5 and i7 tags help ensure that each sample in the pool has a unique tag. By using a combination of two tags you can maintain strong diversity in tag reads.

Returns:

  • (Boolean)

    Returns true if any submissions associated with the plate span multiple source plates.

#tag_platesObject Originally defined in module TaggedPlateBehaviour

#transfer_hashObject Originally defined in module TaggedPlateBehaviour