Skip to content

Commit

Permalink
Merge branch 'develop' into 0fdc01
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl11 authored Jun 30, 2023
2 parents edbf8ab + d25c7a8 commit d8f6396
Show file tree
Hide file tree
Showing 571 changed files with 34,351 additions and 972 deletions.
82 changes: 82 additions & 0 deletions Cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Table of Contents:
* [Basic Skeleton Protocol](#basic-skeleton-protocol)
* [Liquid Level Tracking - Simple](#liquid-level-tracking---simple)
* [Liquid Level Tracking - Complex](#liquid-level-tracking---complex)
* [Liquid Level Tracking - Complex API level 2.13 and beyond](liquid-level-tracking---complex-versions-after-opentrons_Simulate)
* [Refill Tips Mid-Protocol](#refill-tips-mid-protocol)
* [Wash Steps](#wash-steps)
* [Remove Supernatant](#remove-supernatant)
Expand Down Expand Up @@ -157,6 +158,87 @@ def run(ctx):
transfer(250, source, dest)
p300.drop_tip()
```
## Liquid Level Tracking - Complex Versions After Opentrons_Simulate

This liquid level tracking employs extension of the Opentrons `Well` class to add custom attributes for current liquid height, current liquid volume, minimum allowable height for aspiration, and a compensation coefficient.These values were moved from well._impl to well.parent, and well._core in APIlevel 2.13.

The compensation coefficient denotes a multiple that tells the how much "extra" to calculate incrementing or decrementing the liquid level height calculation based on a volume dispensed or aspirated, to account for real-world liquid behavior. This coefficient will likely be higher for viscous liquids, and lower (close to 1.0) for non-viscous liquids.



```
from opentrons import protocol_api, types
from opentrons import APIVersion
from opentrons.protocol_api.labware import Well
import math
metadata = {
'title': 'inheritance',
'author': 'Nick Diehl',
'apiLevel': '2.13'
}
def run(ctx):
class WellH(Well):
def __init__(self, well, height=0, min_height=5, comp_coeff=1.15,
current_volume=0):
# Change one is that we deprecated well._impl
super().__init__(well.parent, well._core, APIVersion(2, 13))
self.well = well
self.height = height
self.min_height = min_height
self.comp_coeff = comp_coeff
self.radius = self.diameter/2
self.current_volume = current_volume
def height_dec(self, vol):
dh = (vol/(math.pi*(self.radius**2)))*self.comp_coeff
if self.height - dh > self.min_height:
self.height = self.height - dh
else:
self.height = self.min_height
if self.current_volume - vol > 0:
self.current_volume = self.current_volume - vol
else:
self.current_volume = 0
return(self.well.bottom(self.height))
def height_inc(self, vol):
dh = (vol/(math.pi*(self.radius**2)))*self.comp_coeff
if self.height + dh < self.depth:
self.height = self.height + dh
else:
self.height = self.depth
self.current_volume += vol
return(self.well.bottom(self.height + 20))
wellrack = ctx.load_labware(
'opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical', '1')
tiprack = ctx.load_labware('opentrons_96_tiprack_300ul', '2')
p300 = ctx.load_instrument('p300_single_gen2', 'right',
tip_racks=[tiprack])
source = WellH(wellrack.wells()[0], height=50, current_volume=7000)
dest = WellH(wellrack.wells()[-1], comp_coeff=1.2)
def transfer(vol, s: WellH, d: WellH, new_tip='never', pip=p300):
if new_tip == 'never' and not pip.has_tip:
pip.pick_up_tip()
pip.transfer(vol, s.height_dec(vol), d.height_inc(vol),
new_tip=new_tip)
ctx.comment(f'Source height: {round(s.height, 2)}mm')
ctx.comment(f'Destination height: {round(d.height, 2)}mm')
p300.pick_up_tip()
for _ in range(20):
transfer(250, source, dest)
p300.drop_tip()
```



## Refill Tips Mid-Protocol

Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ venvs/ot2:
pip install pipenv==2021.5.29 && \
pushd $(OT2_MONOREPO_DIR)/api/ && \
$(MAKE) setup && \
python setup.py install && \
popd

.PHONY: parse-errors
Expand Down
66 changes: 49 additions & 17 deletions data/data/fields.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_add_water,2
_add_water,1
_air_dry,2
_asp_ht,1
_csv,3
Expand Down Expand Up @@ -231,6 +231,7 @@ component_2_height,1
component_2_volume,1
component_3_volume,1
conc_target,1
concentration_csv,2
concentration_template,1
control_plate,1
count_mix,1
Expand Down Expand Up @@ -367,12 +368,12 @@ dna_volume,5
dna_well_plate_lname,1
dna_well_plate_tmod,1
do_cool_samples,1
do_day1,1
do_day2,1
do_deactivate_tc,1
do_dnase_step,1
do_mm_resusp_pause,1
do_plate_mm,1
do_premix,1
do_remove_media,1
do_sds_step,1
do_vortex_pause,1
donor_384_type,1
Expand Down Expand Up @@ -455,7 +456,7 @@ final_extension_cycles,1
final_plate_slot4,1
final_temp,3
final_tubes,1
final_vol,3
final_vol,4
first_media_x,1
flash,32
flow_rate_asp,1
Expand Down Expand Up @@ -494,6 +495,8 @@ height_final,1
height_intermediate_high,1
height_intermediate_low,1
height_intermediate_middle,1
height_offset_aspirate,1
height_offset_dispense,1
height_sample,1
height_source,1
hs_rpm,1
Expand Down Expand Up @@ -551,7 +554,7 @@ init_vol_dil,2
init_vols_csv,1
initial_denaturation_cycles,1
initial_vol,1
input_csv,19
input_csv,18
input_file,10
input_file2,6
input_labware,1
Expand Down Expand Up @@ -600,6 +603,7 @@ labware_6,1
labware_96,1
labware_96rxnplate,1
labware_aliquots,1
labware_child,2
labware_clinical_samples_1,1
labware_clinical_samples_2,1
labware_collect_plate,1
Expand All @@ -614,10 +618,11 @@ labware_magneticmodule,5
labware_mm,1
labware_mmplate,1
labware_p300_tips,1
labware_parent,2
labware_patient_samples,1
labware_pcr,1
labware_pcr_plate,10
labware_plate,3
labware_plate,1
labware_plates,9
labware_pool,1
labware_pre_pcr_plate,2
Expand Down Expand Up @@ -671,8 +676,11 @@ loc_rnase,1
loc_tween,1
lw_checkit,1
lw_deepwell_plate,3
lw_deepwell_plate_open,1
lw_dmso,1
lw_hplc,1
lw_media,1
lw_refill,1
lw_source,1
lw_tiprack300,1
lw_tuberack,1
Expand All @@ -682,7 +690,7 @@ lysis_vol,1
m10_mount,2
m1k,1
m20_mount,77
m300_mount,98
m300_mount,102
m300_type,2
m_mount,1
mag_bead_mix_resuspend_reps,1
Expand Down Expand Up @@ -778,12 +786,12 @@ mntsingle,2
module_type,1
mother_plate_type,1
mount,2
mount_m20,8
mount_m300,13
mount_m20,9
mount_m300,14
mount_p1000,2
mount_p20,11
mount_p300,9
mount_pip,1
mount_pip,2
mount_side,1
move_side,2
move_vol,1
Expand Down Expand Up @@ -841,10 +849,12 @@ num_cell_lines,2
num_col,8
num_cols,3
num_columns,1
num_curves,1
num_daughter_plates,1
num_drug_plates,1
num_extracts,1
num_gene,1
num_lw,1
num_mag_beads_tubes,1
num_mastermix,3
num_mixes,1
Expand All @@ -863,13 +873,14 @@ num_row,1
num_rows_a,1
num_rows_b,1
num_rxns,1
num_samp,67
num_samp,68
num_samp_p1,1
num_samp_p2,1
num_samp_plate1,1
num_samp_plate2,1
num_samp_plate3,1
num_samp_plate4,1
num_sample_columns,1
num_samples,172
num_samples_1,1
num_samples_2,1
Expand All @@ -884,12 +895,14 @@ num_tests,1
num_tipracks,1
num_tubes,2
num_wells,2
number_of_columns,1
number_of_dna_samples,1
number_of_oligo_standards,1
number_of_plates,4
number_of_samples,18
number_of_samples_to_process,5
number_of_slides_to_process,1
number_of_standards,2
numinc,1
numplates,6
numpools,1
Expand Down Expand Up @@ -931,7 +944,7 @@ p1kmnt,1
p1n,1
p1num,1
p20_blowout_height,1
p20_mount,126
p20_mount,127
p20_multi_mount,3
p20_rate,2
p20_reservoir_height,1
Expand All @@ -948,7 +961,7 @@ p2num,1
p300_gen,1
p300_mixing_height,1
p300_mnt,3
p300_mount,146
p300_mount,148
p300_mount_1,1
p300_multi_mount,7
p300_rate,1
Expand Down Expand Up @@ -1067,8 +1080,16 @@ poolvol,1
post_aspiration_wait,2
post_size_selection_volume,1
post_user_sample_volume,1
pre_dil_facta,1
pre_dil_factb,1
pre_dil_factc,1
pre_dil_factd,1
pre_dil_factor,1
pre_dilution,1
pre_dilutiona,1
pre_dilutionb,1
pre_dilutionc,1
pre_dilutiond,1
prefill,1
prepare_mastermix,2
prepare_standard,2
Expand All @@ -1082,6 +1103,7 @@ primer_vol,1
primer_volume,2
process,1
protocol,1
protocol_selection,1
protocol_type,1
prototype,1
puncture_agar,1
Expand Down Expand Up @@ -1169,7 +1191,7 @@ run_number,1
rxn_bf_volume,1
rxn_bf_well,1
rxn_mix_vol_p3,1
rxn_vol,2
rxn_vol,3
s_csv,1
s_mount,1
s_pip,1
Expand Down Expand Up @@ -1233,6 +1255,10 @@ sep_time_elu,6
sep_time_wash,6
serial_boolean,1
serial_csv,1
serial_dil_facta,1
serial_dil_factb,1
serial_dil_factc,1
serial_dil_factd,1
set_tip_max,2
settling_1,1
settling_2,1
Expand Down Expand Up @@ -1306,6 +1332,7 @@ start_column,1
start_index_tip,1
start_tip,1
start_urea_vol,1
starting_buffer_volume,1
starting_conc,2
starting_diluent_vol,1
starting_plasma_vol,1
Expand Down Expand Up @@ -1374,6 +1401,7 @@ temp_s4_part2,1
temp_s7_part1,1
temp_s7_part2,1
temp_set_reservoir,1
temp_setting,1
tempblock,1
tempdeck_gen,1
tempdeck_name,1
Expand Down Expand Up @@ -1432,6 +1460,7 @@ tipwell_start,1
tmod_1_lname,1
tmod_2_lname,1
total_mixing_volume,2
total_plate,4
total_samples,5
touch_radius,1
touch_tip,2
Expand Down Expand Up @@ -1503,8 +1532,10 @@ tubetype,1
tvol,1
twb_rate,1
twelve_well_resv_lname,1
type_pip,1
type_matrix,1
type_pip,2
type_pipette_small,1
type_tc,1
udi_start_col,1
uploaded_csv,18
uploaded_csv_mastermix,1
Expand All @@ -1521,7 +1552,7 @@ use_tuberack_b,1
user_enzyme_volume,1
user_enzyme_well,1
using_magdeck,1
using_tempdeck,3
using_tempdeck,4
v_0_tube,1
v_0_tube1,2
v_0_tube2,1
Expand Down Expand Up @@ -1569,6 +1600,7 @@ vol_peptide2,1
vol_peptide3,1
vol_pma_ca,1
vol_reagent,1
vol_refill,1
vol_removal,1
vol_sample,7
vol_sample_redissolved,1
Expand All @@ -1587,7 +1619,7 @@ vol_tube3,1
vol_wash,1
vol_water,3
vol_xp1,1
volume,4
volume,5
volume_csv,1
volume_eb_in_ul,2
volume_final_elution_in_ul,2
Expand Down
2 changes: 1 addition & 1 deletion protoBuilds/0045f1/README.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
]
},
"deck-setup": "\n",
"description": "This protocol spots up to 6 slides with antibody. Each slide has 8 wells, to which the protocol will spot with 8 dots for wells 2-7. The user has the ability to manipulate the spacing between the dots, as well as the volume of the dispenses. The user can also specify the number of slides spotted. Please see below for the order in which slides are spotted.\nExplanation of complex parameters below:\n* Number of tubes: Specify the number of tubes this protocol will run.\n* Number of Slides: Specify the number of slides for this run (1-6).\n* Spot Spacing: Specify the spacing between dots on the slide wells.\n* Spot Volume: Specify the volume of each dot.\n* Aspiration Flow Rate: Specify the aspiration rate. A value of 1 is the default rate, a value of 1.2 is a 20% increase of the default rate, a value of 0.5 is half of the default rate.\n* Dispense Flow Rate: Specify the dispense rate. A value of 1 is the default rate, a value of 1.2 is a 20% increase of the default rate, a value of 0.5 is half of the default rate.\n* P20 Single-Channel Mount: Specify which mount (left or right) to host the P20 single-channel pipette.\n",
"description": "This protocol spots up to 6 slides with antibody. Each slide has 8 wells, to which the protocol will spot with 8 dots for wells 2-7. The user has the ability to manipulate the spacing between the dots, as well as the volume of the dispenses. The user can also specify the number of slides spotted. Please see below for the order in which slides are spotted.\nExplanation of complex parameters below:\n Number of tubes: Specify the number of tubes this protocol will run.\n Number of Slides: Specify the number of slides for this run (1-6).\n Spot Spacing: Specify the spacing between dots on the slide wells.\n Spot Volume: Specify the volume of each dot.\n Aspiration Flow Rate: Specify the aspiration rate. A value of 1 is the default rate, a value of 1.2 is a 20% increase of the default rate, a value of 0.5 is half of the default rate.\n Dispense Flow Rate: Specify the dispense rate. A value of 1 is the default rate, a value of 1.2 is a 20% increase of the default rate, a value of 0.5 is half of the default rate.\n* P20 Single-Channel Mount: Specify which mount (left or right) to host the P20 single-channel pipette.\n",
"internal": "0045f1",
"labware": "\nOpentrons 10ul filter tips\nOpentrons 4-in-1 tube rack with Eppendorf 1.5mL safelock snapcap\nCustom slide plate\n",
"markdown": {
Expand Down
Loading

0 comments on commit d8f6396

Please sign in to comment.