Writing Completed Aspirate/Dispense steps to .csv


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.

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?


Hi @RollOnYouBears and welcome to the forum!

You can use the Generate Mapping File function from Data Handling Steps to generate this file. You can customize it to get the values that you requested. See below:

Barcode of Source and Target racks scanned using Autoload.

Reference the Target and Source sequences and specify the file type to be csv.

Using the Customize… option you can only check the items that you want to be in the output file.

Note that you can also change the name of the column in this option.

Final output file.



Thank you for demonstrating this, I tested it on my laptop and it has the functionality I need. Very helpful!

We currently have “Sample Tracking” turned off in our System Config on our STAR. What are the consequences of turning this on in order to use this step?

1 Like

There aren’t any real consequences. Sample tracking can be enabled and run in the background whether you use Data Handling steps in the method or not. It creates extra database files in the Hamilton\Logfiles directory for every run so you may just need to monitor the file size in that directory. VENUS 6 has an auto-archiving functionality built-in to assist with that.

Hi Eric,

Thank you for this - I’ve successfully used it to generate map files for our runs now.