Class: Labels::PlateLabelLbsn96Lysate

Inherits:
PlateLabelBase
  • Object
show all
Defined in:
app/models/labels/plate_label_lbsn_96_lysate.rb

Overview

Plate label class to print off the 2 labels for the Bioscan LBSN-96 Lysate plate. First label has the standard 96-well plate label information. Second label has the partner plate barcode, plus a reference to the first label. Very specific to this particular pipeline and plate purpose.

Constant Summary collapse

MAX_LENGTH_PARTNER_ID =
8
PARTNER_INFO_TEXT =
'PARTNER ID LABEL'
PARTNER_ID_SUFFIX =
'SDC'
PARTNER_ID_MISSING =
'NO PARTNER ID FOUND'

Instance Method Summary collapse

Instance Method Details

#additional_label_definitionsObject

Define the second label for the lysate plate



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'app/models/labels/plate_label_lbsn_96_lysate.rb', line 19

def additional_label_definitions
  [
    {
      top_left: date_today,
      # We repaet the lysate plate barcode on this second label so they can see the two labels go together
      bottom_left: labware.barcode.human,
      # At top right we display text to make it clear this is the partner id label
      top_right: PARTNER_INFO_TEXT,
      # This is the human readable text version of the partner id
      bottom_right: partner_id_text,
      # This is the barcode version of the partner id, with human readable text underneath
      barcode: partner_id_barcode
    }
  ]
end

#attributesObject

Define the standard first label for the lysate plate



14
15
16
# File 'app/models/labels/plate_label_lbsn_96_lysate.rb', line 14

def attributes
  super.merge(barcode: labware.barcode.human)
end