Class: Robots::Bed::Pooling

Inherits:
Base
  • Object
show all
Defined in:
app/models/robots/bed/pooling.rb

Overview

Pooling beds can have multiple parents, and have additional methods to support this

Direct Known Subclasses

PoolingAndSplitting

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parentsObject

Returns the value of attribute parents.



6
7
8
# File 'app/models/robots/bed/pooling.rb', line 6

def parents
  @parents
end

Instance Method Details

#each_parentObject



8
9
10
11
12
13
# File 'app/models/robots/bed/pooling.rb', line 8

def each_parent
  range.each do |i|
    labware_barcode = parent_labware[i]&.barcode || SBCF::EmptyBarcode.new
    yield(parents[i], labware_barcode)
  end
end

#find_all_labwareObject



15
16
17
# File 'app/models/robots/bed/pooling.rb', line 15

def find_all_labware
  Sequencescape::Api::V2::Plate.find_all({ barcode: @barcodes }, includes: [:purpose, { wells: :upstream_plates }])
end

#parent_labwareObject



19
20
21
22
23
# File 'app/models/robots/bed/pooling.rb', line 19

def parent_labware
  return [] if labware.nil?

  @parent_labware ||= labware.plate? ? parent_labware_of_plate : []
end