Closed KatyTaylor closed 6 months ago
It seems this issue arises when trying to cherrypick samples that belong to plates of different sizes. There will be two (or possibly more) options when selecting an output plate purpose. This causes there to be plate templates of varying sizes to choose from, which will cause an error when mixed.
There are a couple of options that we have to go about this if this isn't an intended/common use case:
If this does have a use case, then further discussion would be needed.
Thanks for the update. Just to add a bit more detail - it's when trying to cherrypick a batch where a) there are no 'next requests' i.e. this is the last request in the chain of requests in the submission, and b) the requests don't all have the same size of 'target purpose' (meaning the purpose of the intended destination plate) - this is selected while making the submission in the following screen:
We've contacted the customer who raised the RT ticket to try to understand the use cases more and decide on a solution.
Email from Joe D:
To the best of my recollection, I believe that the root cause was attributed to human error at the time. After scanning in the IFC assay chip barcode, Sequencescape automatically tabbed down into the next available data entry point - “Plate Template”. I subsequently scrolled to the bottom of the page to submit the sample batch. Unbeknown to me, I must have accidentally switched the template from "Fluidigm 192.24 Template" to “H12 Empty” instead of scrolling to the bottom of the page. We have since introduced a CAPA to double-check that the correct plate template is selected prior to batch creation. Generally speaking, we create our own sample submissions for our Fluidigm QC workflow, so I am somewhat reluctant to directly involve the SSR’s on this occasion. I would however be happy to discuss this issue in greater detail, how to improve the process and assist you in answering any further questions that you may have.
Write-up of chat with Joe & Ada from Sample Prep team 26/4/24:
Notes:
Thoughts:
Actions (for PSD):
Describe the bug On the 'Select Plate Template' screen in the Cherrypicking pipelines, you are allowed to select templates that are not appropriate for the intended size of the destination plate. This can cause an unhandled exception to occur when the next screen is loaded.
RT Ticket Number Would prevent https://rt.sanger.ac.uk/Ticket/Display.html?id=796306 from happening again in future.
To Reproduce Steps to reproduce the behaviour:
Expected behaviour The template list should only contain templates whose size matches that of the output plate purpose.
Also, if they do somehow manage to select an inappropriate template, the exception should be handled gracefully. More is explained below.
Additional context In the RT, the exception came from
workflows > _plate.html.erb
line 20 -undefined method
[]' for nil:NilClass, meaning that
current_wellwas
nilon one of the iterations.
current_wellis set by
current_well = plate[col*plate_rows + row]- this was trying to access an element that was not in the array. This happened because
platecontained 96 wells, while
plate_rowsand
plate_cols` were 16 and 12 respectively - so the sizes were mismatching.plate
,plate_rows
andplate_cols
are passed in by_cherrypick_batches.html.erb
and generated by_cherrypick_handler
, at the end ofrender_cherrypick_task
method.@plate_rows
and@plate_cols
come from the destination plate, if it's a partial, or else the destination plate purpose.@plates
is generated bypick_new_plate
incherrypick_task
- initially a list of wells bybuild_plate_wells_from_requests
, then they get split into plates by the lambdapush_completed_plate
, after the checkcurrent_destination_plate.full?
.current_destination_plate.full?
comes frompick_target.rb
, which uses thesize
passed in from thetemplate
(selected in the UI.So ultimately, the plate purpose size and the plate template size were mismatched and it should be enforced that they are the same.