2246_verso_tests/verso_spelling/ziath_read_to_available_tub...

17 lines
483 B
Python
Raw Normal View History

2024-10-24 18:59:10 +00:00
#Cellario modules
from HRB.Cellario.Scripting import *
from HRB.Cellario.Scripting.API import *
import json
def Execute(api : PythonScriptingApi):
sampleName = api.CurrentPlate.Name
with open(f"C:/temp/{sampleName}.txt", "r") as file:
j = json.load(file)
tubes = j["tubeBarcode"]
barcodes = [tube["barcode"] for tube in tubes]
with open("C:/temp/availabletubes.txt","a") as file:
for barcode in barcodes:
file.write(f"{barcode}\n")