Hello,
I am looking for the cleanest way to create a sample tracking .csv during a Venus protocol.
For example, I have a method where an operator can choose to aspirate from a variable number of tubes (1-96, distributed across between 1 to 4 racks) and dispense into a variable number of output plates (1 or 2 96w plates).
I would like to produce a .csv with:
- Source Rack ID (this could be the labwareId or better yet, the barcode of this rack)
- Source Rack positionId (ideally the well location format)
- Destination Plate ID (this could be the labwareID or better yet, the barcode of this rack)
- Destination positionId (ideally the well location format)
I’ve brainstormed and tested a few potential avenues for this and nothing seems particularly clean or intuitive. Ideally this solution would be added after each aspiration and dispense step so that if a run is aborted for some reason, the tracking can still be performed with onAbort methods.
SeqWritetoFile
The first thought was to use the SeqWritetoFile function, but this requires creating two sequences (say, “seq_CompletedAspirations” and “seq_CompletedDispenses” that are populated after the aspirate and dispense respectively, and I’m not aware of a clean to populate these. I’m imagining a pandas .loc function where you can slice some labwareId <> positionId data based on a range of indices. Not to mention, the WritetoFile contains more info than I need so there’s probably some additional manipulation to be done.
Current Position → GetPositionId → write to array
Another way may be to fetch the positionId and write this to an array. For example, an aspiration is performed with each of 8 channels. SetCurrentPosition to the first position in the sequence that was aspirated, get labwareId and positionId, add these to an array, increment current position. This is the leading idea right now, but still requires loops within loops.
I haven’t described volume tracking, but that would be ideal too.
Does anyone have some cleaner ideas on how to do this? The .trc contains much of the information in which we’re interested, so another option is to parse the .trc to construct this file, but I feel that doing this within Venus is a better option. It feels like a capability that should exist: maybe there’s a library out there for doing this?