Using a variable inside a Custom Dialog?

Hi. I am building a multi-plate normalization protocol, and my vision is to first ask the user how many plates we are working with, and after that looping over a Custom Dialog prompt to ask for each plate’s input file.

So how can I accomplish something like “Please choose the input file for [intNumberOfPlates]”? On each iteration changing the displayed number to match with which number plate we are currently choosing. The help file for the Custom Dialogs in quite sparse.

Also having a bit of a hard time wrapping my mind around how to go from there: should I make a new Sequence into which the samples from each plate get added to? I’m thinking of having a maximum of 96 samples at first.

Thanks!

First part is pretty simple.

For a dialog that prompts the user for a number of plates you could set something up like this:

The initial value is retrieved from int_maxPlate and then the dialog box replaces that value with whatever is chosen. So this snippet would show 5 when the method is run, then if you traced it out after it would be whatever is set in the numerical value.

Then in the second dialog box you mentioned, you could set it up in a loop as such:

image
The Str library allows you to concatenate a message together which is passed in to the text box within the dialog itself:


and gets updated with whatever the loop counter says each time it’s run:

image

For the second part, I would probably just make one sequence (e.g. seq_dispense) and one volume array (arr_fltDestVol). If you’re going from a reservoir with a buffer, the aspirate sequence is already handled. If you’re cherry picking from a source to a destination, the aspirate portion would probably come from a file, so you’d have to add that in.

Basically, once the user puts in their file, it will go through it and add the pieces to the dispense sequence and the volume array. Then they’re prompted for the next file and it processes through that until you hit the max plates they defined.

This method assumes you have positions on deck with IDs of “SamplePlate1” “SamplePlate2”… and so on until your max setup.

Hope this is clear! The file stuff is just a skeleton example and there’s no pipetting steps included here.

5 Likes

Thanks so much @mnewsom ! :raised_hands: I will dig into this today.

1 Like

I got the first part in order but the use of variable sequences feels a bit cryptic to me. How do I “connect” a variable sequence to an actual deck “labware” sequence?

Thanks again :slight_smile:

That’s part of the labware ID component.

In my layout for this, I would have something like the following:

where the SamplePlate# is the labware id for each of the plates that are possible to dispense to. The loop on that first bit, where it’s concatenating the loopCounter1 variable to the str_destPlateName which gives you a string (str_plateID) that you can use as the labware id.

Every time it goes through it adds the new loop counter to the end of that so you end up with a string that references
SamplePlate1
SamplePlate2
and so on. These labware IDs must match what’s in your layout. As you build the sequence (SeqAdd function), it takes the result from the concatenation (str_plateID) and the position it reads from the file (file1_dest_well) and adds it to the sequence which in this case is just called seq_dispense.

The final seq_dispense would look something like
Labware - Position
SamplePlate1 - A1
SamplePlate1 - B1
SamplePlate2 - A1
SamplePlate2 - B1
SamplePlate3 - A1

Using this would look something like:

This assumes you’re aspirating from a buffer trough with the sequence defined in the layout (which is why we’re not incrementing that sequence - manual counting) and you’re incrementing the seq_dispense in the dispense step (automatic counting). Then the volume is taken from the array you made when reading the file and that array index is incremented with every loop at the end.

Note: I didn’t simulate this so there may be errors :face_with_spiral_eyes:

1 Like

Thanks so much again :slight_smile:

1 Like