-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPL-544 (materialized) view for the Samples Extraction for reporting #117
Comments
Refining with a select statement before building it as a view.
|
Users are associated with steps, not activities. This means that it is possible to have multiple users per activity. (In practice I'm seeing 1 for the majority of activities, with 23 activities performed by two users, and one by three. A few options:
|
Data looking a little patchy at the moment, it may make sense to filter out some of the rows based on missing data. |
Ahh, I see, for plates, samples are linked to the wells, which in turn are linked to the plates. |
Bit more fleshed out now (stopped editing the one above). This handles samples on plates.
|
The input barcode on this appears to be an output barcode (at least for some actions), but its possible I'm just not understanding the process, and attempting to play around with the UAT app isn't helping. Things I need:
|
Current select statement
|
Switched the input asset to output asset, as that's what its looking like for the examples I'm seeing.
|
Spoke to Eduardo:
|
Sent query: I’ve got a few questions:
I’ll keep poking at point 2 for now, just in case a moment of inspiration strikes. James |
Response:
Follow up:
Response:
|
So we can limit the possibility space a bit, but still have to deal with rare cases where we may have to find grandparents, not parents. |
Looks like this these limitations we can assume stamps, although if we go that rout I'd be happier if we immediately get a WH replacement prioritised. Still tempted to go that route from the off. |
Existing data appears to all conform to having a single output asset, checking to see if this is a constraint of the actual application. |
Hmm, looks like two plates Can be scanned into the process, but both the target plates appear to be linked to both source plates. This is probably not a scenario we need to worry ourselves with today... |
So, this query works for anything that hasn't had intermediate plates. Should be possible to rejig, but want a starting point to help highlight any errors. Bit concerned about writing tests for this, as barely understand the process.
|
Well got it working, but bit worried about how brittle it'll be: (Note: This probably isn't correct actually, its selecting the last transfer, not the first, but flipping that logic has no effect. Need to poke out exception a little more)
|
Now with users as well. Just a bit of tidy-up:
|
Got rid of the abbreviated aliases, remove the misleading input asset barcode and stripped out a couple of the columns added for debugging
|
Looks like my preliminary google to check exactly how a materialised view differed from a standard view missed a salient point. MySQL doesn't support materialised views. Proceeding with standard view. (Performance in testing hasn't seemed too bad.) |
Completes sanger#117 Adds a heron activiteis view
User story
GPL-544 | As SRA for CGaP (Laura) I want a (materialized) view for the Samples Extraction database, so we can check and report on the data
Who are the primary contacts for this story
Laura L
Neil
Draft Acceptance criteria
Column headers something like;
Input barcode,
Output barcode,
Activity type,
Instrument,
Kit barcode,
Kit type,
Date,
User.
[Samples]
This would create a row per plate/rack extracted, alternative would be to do it on a per sample basis, in which case the first column would be COG-UK barcode/Supplier sample name
Dependencies
This story is blocked by the following dependencies:
Additional context
L
The text was updated successfully, but these errors were encountered: