Y24-304 - Allow fixed placement of controls when cherrypicking
Closed this issue · 5 comments
User story
As a user of the cherrypicking pipeline in Sequencescape, I would like there to be an option to add controls into a fixed location on the destination plate(s), so that I can choose where I want my controls.
Existing behaviour:
The cherrypicking pipeline currently has a dropdown called 'Control Plate', which is populated with the existing control plates in the system. A Control Plate is a special kind of labware, which generally has just a few of its wells populated with control samples. When a control plate is selected in the cherrypicking pipeline, these control samples are put into wells on the destination plate(s). The current behaviour is to randomise the location of these samples on the destination plate(s).
Who are the primary contacts for this story
Anna G, Adrianne L, Katy
Who is the nominated tester for UAT
Anna G, Rich C
Acceptance criteria
To be considered successful the solution must allow:
- I am able to choose to place the controls in pre-specified fixed locations on the destination plates (e.g. H10, H11 and H12).
- Existing randomisation behaviour continues to work.
- Control plates are used as the source of the control samples.
- Control samples are added to the same locations on the destination plate as they are in on the control plate.
- In UAT, get customer to make their own control plate using this documentation (developer needed for final step), and test using that.
- If needed, update instructions for making Control Plates
- If the control plate and plate template clash, display an error message
Dependencies
Original research story - sanger/limber#1864
Additional context
UX & design options are discussed in a comment on this issue.
See code in:
cherrypick_task.rb
cherrypick_handler.rb
control_locator.rb
Quickest way to get to the cherrypicking screen:
- Create stock plate: UAT tab, Create Plate, accept default options, copy resulting plate barcode
- Create cherrypick submission: UAT tab, Test Submission, submission template = 'Cherrypick', Plate barcode = paste in your barcode
- Create cherrypick batch: Pipelines tab, Cherrypick, refresh page until your plate appears in the table, select that row and hit Submit
- Click on 'Select Plate Template'
Had a call with Rich C to check whether there is an existing way to add controls to fixed locations in destination plates. He said that this did exist before the Heron project, and wasn't aware that when the control randomisation was implemented for the Heron project it overwrote any previous behaviour around fixed locations. He thought that the different 'control plates' in the dropdown behaved differently in terms of how they were added to the destination plate.
Instead of having a second dropdown 'control addition method' (like I have suggested in the story), he requested that the 'control plates' behave differently - so the existing Heron control plates would have 'randomise' behaviour and the new RVI one would have 'fixed' behaviour.
He also suggested a story to clean up any control plates that are not used any more.
The control placement algorithm will need two inputs:
- Control Plate (currently selected via dropdown in UI, and used in code as the source of the control samples)
- Control placement method (new - currently randomises the location, but we want to add the option of fixed locations)
Option 1: User selects both, independently, through the UI:
Option 2: User selects one thing in the UI, which specifies both inputs (this is the UX preferred by Rich C).
We could replace the Control Plate dropdown with one called 'Control Plate and Method' or something, and the values could read something like:
- Heron A1+ H12- (randomise)
- RVI H10 H11 H12 (fixed)
Ideas for how to implement this:
a) Store 'control placement method' against the control plate labware (existing column, new column, PolyMetadata)
b) Create a new table / model to link the two bits of data together
c) Create a new config file to link the two bits of data together
Do we need to create a new manifest / way of creating Control Plates, to allow users to enter this info? (If so this would be a separate story)
3 elements:
- write algorithm to add controls in fixed locations
- determine how to store the link between control plate and control placement method
- tweak the UI to display the control placement method alongside the control plate name
Currently, when adding the control samples to the destination plate, the order of wells (relative to well position and map IDs) are inverse. This seems to be because when making a control plate, the wells are ordered in this way, which is the opposite of how the destination plate wells are ordered.
To solve this, I've written a function to find the well position on an emulated "invalid plate" and track the map ID that corresponds to the well position on the valid plate, which represents the order of wells on the destination plate.
Another solution would be to change how the manifests are created so that when making a control plate, the order is changed so that work doesn't need to be done in the control locator.
Just to transfer some conversations with Shiv after testing here:
- in UAT, when generating CP submission with a control plate (with controls sitting in H10,H11,H12) and several sample plates (total the sample number= 96); it automatically populated samples and controls into 2 plates (first plate is full and second plate is partial) see attached image
- the first (full) plate has controls going into the wells the same as wells in the control plate (H10,H11,H12) with samples being randomly allocated. This fulfills our requirement👍!
- the second (partial) plate however populates the samples and controls in well order (A1-H12) with controls going to wells right after the samples in stead of going into H10,H11,H12. This is NOT fullfill the requirement.
- I'd suggest: for all FULL plates => controls automatically added into fixed well positions (the same as control plate); while for all PARTIAL plates => controls NOT automaticlly added during CP submission.
Many thanks