thanks for the response and for the opentrons from “box to protocol” series. I am trying to run the following code now, using the Shinedalgarno suggestion. This is the code I am loading in the opentron app > protocol > import
import sys
import os
from opentrons import protocol_api
metadata = {‘apiLevel’: ‘2.13’}
def run(protocol: protocol_api.ProtocolContext):
source_plate = protocol.load_labware(
load_name=‘nest_96_wellplate_2ml_deep’,
location=1)
target_plate = protocol.load_labware(
load_name=‘armadillo_96_wellplate_200ul_pcr_full_skirt’,
location=2)
reservoir = protocol.load_labware(
load_name=‘opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical’,
location=3)
tiprack_1 = protocol.load_labware(
load_name=‘opentrons_96_tiprack_300ul’,
location=4)
tiprack_2 = protocol.load_labware(
load_name=‘opentrons_96_tiprack_300ul’,
location=5)
p300 = protocol.load_instrument(
instrument_name=‘p300_single’,
mount=‘left’,
tip_racks=[tiprack_1, tiprack_2])
sys.path.append("/var/lib/jupyter/notebooks/")
os.chdir ("/var/lib/jupyter/notebooks")
# buffer volumes
buffer_volumes = open("sample_volumes.txt", "r").read().split("\n")
buffer_volumes_int = [int(x) for x in buffer_volumes]
# solvent volumes
p300.distribute(buffer_volumes_int, reservoir['A1'], target_plate.wells()[:len (buffer_volumes)])
The protocol fails analysis and I get the following message:
“FileNotFoundError [line 28]: [WinError 3] The system cannot find the path specified: ‘/var/lib/jupyter/notebooks’”
In the jupyter notebook I have imported the “sample_volumes.txt” file and I can check that both the ‘/var/lib/jupyter/notebooks’ directory and the ‘sample_volumes.txt’, exists by running the following code:
import os
import opentrons.execute
protocol = opentrons.execute.get_protocol_api(“2.13”)
protocol.home()
os.listdir()
I get
[‘sample_volumes.txt’,
‘.ipynb_checkpoints’,
‘prepare glycerol plates.ipynb’,
‘Dilution protocol for Jordan V1 tested.ipynb’,
‘Untitled1.ipynb’,
‘inoculate glycerols.ipynb’,
‘Untitled.ipynb’]