Class: Ont::Flowcell

Inherits:
ApplicationRecord show all
Includes:
Uuidable
Defined in:
app/models/ont/flowcell.rb

Overview

Ont::Flowcell

Constant Summary collapse

FLOWCELL_ID_FORMAT =

flowcell_ids have 3 letters followed by 3 numbers

'ABC%03d'

Instance Method Summary collapse

Methods included from Uuidable

#add_uuid

Instance Method Details

#flowcell_id=(value) ⇒ Object

Strip and upcase flowcell_ids to accept case-insensitive barcodes



80
81
82
# File 'app/models/ont/flowcell.rb', line 80

def flowcell_id=(value)
  super(value&.strip&.upcase)
end

#position_nameObject

Returns alternative adressing for position if available



74
75
76
77
# File 'app/models/ont/flowcell.rb', line 74

def position_name
  map = run&.instrument&.position_names
  map.present? ? map[position] : position
end