sanger / General-Backlog-Items

Broad bucket to collate backlog items that have no obvious repository
0 stars 0 forks source link

DPL-511 Bioscan OKR: Tag plate creation and tracking #219

Closed andrewsparkes closed 1 year ago

andrewsparkes commented 2 years ago

Description As R&D we would like to track the creation of 24 variants of 384-well tag plate instances for the Bioscan project. These instances are generated from batch master plates supplied by a 3rd party (TBC). There are tag sequences and UMI indexes that need to be tracked and available to be exported in the Limber Sample Summary file available at the end of the Limber library prep pipeline.

Who the primary contacts are for this work e.g. John Smith

Knowledge or Stake holders Other people that may have specific knowledge about this work or have a stake in how it is implemented. e.g. John Smith is an expert on x

Additional context or information How to provide this tag plate tracking functionality with 24 x 384-well layouts? It sounds like we need a new mini-service, perhaps with a Limber front-end. What other functionality would this application need? What other use cases exist? Do we need to view the tag plates in either Limber or Sequencescape?


Scott has said that they expect to build one set of 24 x 384-well plate instances per month. This should minimise chances for overlap and tag clashes. The tag plates are prepared on an Echo acoustic liquid handler, by stamping from parent plates supplied by a 3rd party. The method for that is already built and tested. The parent plates may come from different batches and that must be tracked. Ideally they would like the user prompted in Limber to use the next tag plate instance in that set for that month when they perform the transfer in Limber, i.e. if instance 3 of 24 was used last time, instance 4 of 24 should ideally be used next.

See this story for information about the Sample Summary File: https://github.com/sanger/limber/issues/1170

andrewsparkes commented 2 years ago

For MVP can we use existing tag groups and tag plate templates to to set up the 24 abstract plate layouts (perhaps generate via a script and api?) and then use similar functionality to the UAT action that creates tag plates (uses QcableCreator.create!) to generate the 24 tag plate instances and their barcodes for a months work?

TWJW-SANGER commented 2 years ago

Regarding: "Parent plates may come from different batches and that must be tracked". Given that one set is built per month, for the MVP is the having the creation date of the plate sufficient to track which batch they come from?

andrewsparkes commented 2 years ago

How would they see even that bit of information in SS/Limber? Or the plate index 1-24? I've had a quick look at the tag layout template options in SS and we don't have a way to make these tag plates currently. Some variation of the 'quadrant' layout algorithm is needed that can cope with how we want to use the reverse primers in sets of 4.

andrewsparkes commented 1 year ago

Can confirm that for MVP we could use the existing tag group, tag layout template and tag plate generation code to create the 24 variations, with some minor code changes. To get a UI for the users would be more work. See the 'tag plate creation' tab in this document for details. In summary, create one tag group of 96 tags for the forward tags. Create 24 tag groups of 4 tags for the reverse primers. Create a variation of the tag layout "InColumnsThenRows" with the tag 2 index calculation changed from this: app/models/tag_layout/in_columns_then_rows.rb

def self.tag2_index(row, column, scale, _height, _width)
 (column % scale) + ((row % scale) * scale)
end

to this:

def self.tag2_index(row, column, scale, _height, _width)
 (column % scale) * scale + (row % scale)
end

Then generate 24 tag layout templates using the forward tag group and each of the 24 reverse tag groups. Could be done with a script. Can then use QcableCreator.create! to generate a set of 24 tag plates from those 24 templates. Could be done with a script (less risky) or manually via rails console.

andrewsparkes commented 1 year ago

NB. The mBrave file needs to include the 1-24 number of the tag plate variant for each sample.

andrewsparkes commented 1 year ago

Closing in favor of MVP story https://github.com/sanger/sequencescape/issues/3692