class OpenTrons::Pipette
Attributes
instruments[RW]
model[RW]
mount[RW]
protocol[RW]
tip_model[RW]
tip_racks[RW]
Public Class Methods
new(protocol, instruments, model, mount: "left", tip_racks: [], tip_model: nil)
click to toggle source
# File lib/opentrons/instruments.rb, line 77 def initialize(protocol, instruments, model, mount: "left", tip_racks: [], tip_model: nil) @protocol = protocol @instruments = instruments @model = model @mount = mount @tip_racks = tip_racks @tip_model = tip_model end
Public Instance Methods
aspirate(volume, location)
click to toggle source
# File lib/opentrons/instruments.rb, line 102 def aspirate(volume, location) command = Aspirate.new(self, volume, location) protocol.commands.command_list << command return command end
blowout(location)
click to toggle source
# File lib/opentrons/instruments.rb, line 193 def blowout(location) command = Blowout.new(self, location) protocol.commands.command_list << command return command end
delay(wait, message: "")
click to toggle source
# File lib/opentrons/instruments.rb, line 199 def delay(wait, message: "") command = Delay.new(wait, message) protocol.commands.command_list << command return command end
dispense(volume, location)
click to toggle source
# File lib/opentrons/instruments.rb, line 108 def dispense(volume, location) command = Dispense.new(self, volume, location) protocol.commands.command_list << command return command end
drop_tip(location=false)
click to toggle source
# File lib/opentrons/instruments.rb, line 180 def drop_tip(location=false) location = protocol.trash.wells(0) if !location command = DropTip.new(self, location) protocol.commands.command_list << command return command end
get_next_tip(multi: false)
click to toggle source
For whatever reason, air gap has no location in Python API but has a location in the JSON schema. Not implemented for now. def air_gap(volume, location)
command = Aspirate.new(self, volume, location) self.protocol.commands << command return command
end
# File lib/opentrons/instruments.rb, line 122 def get_next_tip(multi: false) location = nil catch :tip_found do tip_racks.each do |tip_rack| tip_rack.well_list.each do |column| if multi if column.all? {|x| x.tip} location = column[0] throw :tip_found end else column.each do |x| if x.tip location = x throw :tip_found end end end end end return false end return location end
inspect()
click to toggle source
# File lib/opentrons/instruments.rb, line 98 def inspect to_s end
pick_up_tip(location=false)
click to toggle source
# File lib/opentrons/instruments.rb, line 148 def pick_up_tip(location=false) if !location tip_location = self.get_next_tip() # If no tip found and tip model is provided, create a tip rack. if !tip_location if tip_model tip_racks << protocol.labware.load(tip_model, protocol.labware.free_slots[-1], 'Auto-generated-tip-rack') else raise ArgumentError.new "pick_up_tip called without location and pipette is out of tips." end end tip_location = self.get_next_tip() location = tip_location end if location.is_a? Array well = location[0] else well = location end if !(well.tip) puts "Warning: Already picked up tip at #{location}." else well.tip = false end command = PickUpTip.new(self, location) protocol.commands.command_list << command return command end
to_hash()
click to toggle source
# File lib/opentrons/instruments.rb, line 87 def to_hash as_hash = {} as_hash["mount"] = mount as_hash["model"] = model return as_hash end
to_s()
click to toggle source
# File lib/opentrons/instruments.rb, line 94 def to_s "<OpenTrons::Pipette:0x#{self.__id__.to_s(16)}>" end
touch_tip(location)
click to toggle source
# File lib/opentrons/instruments.rb, line 187 def touch_tip(location) command = TouchTip.new(self, location) protocol.commands.command_list << command return command end