Class: LabwareCreators::BaitedPlate
Overview
In ISC pipeline. Provides a user with a preview of the expected bait library layout Creates a new plate, which is a stamp of the parent. Applies the bait library to the aliquots of the plate in accordance with the baits specified at submission.
Defined Under Namespace
Classes: Baits
Instance Method Summary
collapse
Instance Method Details
#bait_library_layout_preview ⇒ Object
27
28
29
|
# File 'app/models/labware_creators/baited_plate.rb', line 27
def bait_library_layout_preview
@bait_library_layout_preview ||= api.bait_library_layout.preview!(plate: parent_uuid, user: user_uuid).layout
end
|
#baits ⇒ Object
37
38
39
|
# File 'app/models/labware_creators/baited_plate.rb', line 37
def baits
wells.select { |w| w.bait.present? }
end
|
#create_labware! ⇒ Object
31
32
33
34
35
|
# File 'app/models/labware_creators/baited_plate.rb', line 31
def create_labware!
create_plate_with_standard_transfer! do |child|
api.bait_library_layout.create!(plate: child.uuid, user: user_uuid)
end
end
|
#plate ⇒ Object
23
24
25
|
# File 'app/models/labware_creators/baited_plate.rb', line 23
def plate
parent
end
|
#wells ⇒ Object
41
42
43
44
45
46
47
48
|
# File 'app/models/labware_creators/baited_plate.rb', line 41
def wells
parent.locations_in_rows.map do |location|
bait = bait_library_layout_preview[location]
aliquot = bait
Baits.new(location, bait, [aliquot].compact, nil)
end
end
|
#wells_by_row ⇒ Object
50
51
52
|
# File 'app/models/labware_creators/baited_plate.rb', line 50
def wells_by_row
PlateWalking::Walker.new(parent, wells)
end
|