sequencescape
sequencescape copied to clipboard
DPL-346 - [BUG] Swapping lanes in batches results in possible warehouse data integrity issue [C=M, V=3]
When swapping lanes in batches that only contain 2 lanes/requests the mlwh iseq_flowcell table is updated correctly however if there are more than one move is involved i.e 1<=>4 then the iseq_flowcell table gets out of sync and the positions are wrong. NB I found saving after each move works.
To Reproduce Find a batch that has 4 different source barcodes (it makes it easier on the eye/brain when checking the table) Production examples are id: 90442, 90440, 90436, 90433 Edit the batch (RHS) move position 1 to position 4 and 3 (the old 4) to position 1, check iseq_flowcell table positions compared to Sequencescape The batch ids are iseq_flowcell.id_flowcell_lims The batch source barcodes are the iseq_flowcell.id_pool_lims
Gut is that this bug probably predates the recent shift to data-tables, which was an attempt to fix similar pre-existing issues. Suspect the problem lies in the underlying ruby code. Eyeballing the method didn't throw up any immediately obvious problems, so it might be worth considering:
- Callbacks on batch or request undoing our work
- Some issue with cached resources (especially batch_request), and either not correctly persisting, or possibly stale copies being used for flowcell rebroadcast. (Assuming we're not just sending a stub message at this point)
Edit: By cached resources here I mean something like having eager loaded batch-requests on the batch object, and then updating another instance of the record when updating or broadcasting.
Notes from conversation: Lane swaps happen ~2 a month Heron lab know how to use the swap function in SS so this has dropped off to zero from them, however Heron run 2 lane NovaSeq so this bug isn’t an issue. Other teams do not know that they can swap lanes because over the years we (I) have not told them they can do this as we knew it was broken.. so in answer to your question we hardly ever/never get asked to fix a result of ‘bad’ lane swapping. Last time we did was pre COVID, James was on leave and Phillip and Eduardo spent the best part of a week trying to understand the problem and fix the messages to repair the data and in the end we edited the MLWH directly. If it isn’t fixed then it will just be added to the list of broken bits is SS Personally I think the page is too complicated. All that is needed is an admin interface that says swap these two source assets from this batch position to this batch position (which covers moving between 2 batches)
@JamesGlover would you have an idea of a sizing for this?
It's a little tricky, as I thought I'd already identified and fixed the issue once, so the bug is very much an unknown and may take a while to track down. I'm hoping fairly small.
Oh, and just to add (because I forgot it last time I looked at this) this interface is not only used for lane swaps, but also routinely by the sequencing teams for setting up lane order in the first place. (So Neil's suggestion would have to be in addition to this page, not instead of it - although we could lock down this page after batch release and direct people at the lane-swap page instead.)
Should also be clarified that this page can be used for all batches, although given that its pretty much just cherrypicking, fluidigm and sequencing in SS now, I'm not sure what use it would be in the other pipelines. (There are much easier ways for sort requests for cherrypicking)