sanger / tol-lab-share

Rabbitmq consumer for TOL data input
MIT License
0 stars 0 forks source link

DPL-753 Consumer to receive new QC fields from message queue (S=L,C=M) #36

Closed emrojo closed 1 year ago

emrojo commented 1 year ago

User story As TOL I want to receive new QC fields from the queue:

Qc columns

Who are the primary contacts for this story Eduardo Martin

Who is the nominated tester for UAT Charlie (TOL)

Acceptance criteria To be considered successful the solution must allow:

Dependencies This story is blocked by the following dependencies:

References This story has a non-blocking relationship with:

Additional context

Definition of fields in: https://docs.google.com/spreadsheets/d/1OW78PEbC8BzqV5TtRV9zV_4OU3t7HhCeBWSJv0rGno0/edit#gid=0

emrojo commented 1 year ago

As a suggestion, these fields could be provided from a new message, using the sampleUuid as reference.

TWJW-SANGER commented 1 year ago

James has confirmed that that the long read QC data in the message can be stored and viewed from the MLWH. Once this story is done we can review if we can help Long Read deprecate the Google Sheet they are using to store and track this information. By Long Read QC data I mean these fields:

The other fields in this story:

These can also be stored in the MLWH but it's worth noting that these fields will be common for all samples being submitted to SeqOps, so likely be used in different views.

emrojo commented 1 year ago

Tasks

A) UPDATE THE SCHEMA - DPL-753-1

B) PROCESS THE FIELDS IN CONSUMER - DPL-753-2

C) PROCESS THE FIELDS IN TRACTION DPL-754

harrietc52 commented 1 year ago

Traction Service tasks

MLWH / Unified WH tasks

Sangeetha-Bheeman commented 1 year ago

Steps to deploy:

  1. Publish the new schema to red panda:

push.sh <REDPANDA_URL> <API_KEY>

For UAT(Use the right API KEY from vault):

./push.sh https://redpanda.uat.tol.psd.sanger.ac.uk API_KEY

  1. Deploy tol-lab-share:

UAT:

ansible-playbook -vD deploy_tol_lab_share.yml -i environments/uat -e "github_branch=0.2.0-5574405014-develop"

The new schema is deployed to UAT and it can be fetched as below (Use the right API-KEY):

curl -H "Content-Type: application/vnd.schemaregistry.v1+json" -H "X-API-KEY: API-KEY" "https://redpanda.uat.tol.psd.sanger.ac.uk/subjects/create-labware/versions/latest"

{ "subject": "create-labware", "version": 30, "id": 18, "schema": "{\"namespace\":\"uk.ac.sanger.psd\",\"type\":\"record\",\"name\":\"CreateLabwareMessage\",\"doc\":\"A create message to process new labware.\",\"fields\":[{\"name\":\"messageUuid\",\"doc\":\"Unique message ID.\",\"type\":{\"name\":\"version4MessageUuid\",\"type\":\"fixed\",\"size\":36}},{\"name\":\"messageCreateDateUtc\",\"doc\":\"Date (UTC) that the message was created.\",\"type\":{\"type\":\"long\",\"logicalType\":\"timestamp-millis\"}},{\"name\":\"labware\",\"doc\":\"Labware to process.\",\"type\":{\"name\":\"Labware\",\"type\":\"record\",\"doc\":\"Labware data.\",\"fields\":[{\"name\":\"labwareType\",\"type\":\"string\"},{\"name\":\"barcode\",\"type\":\"string\",\"doc\":\"The barcode for this labware.\"},{\"name\":\"samples\",\"doc\":\"An array of data for samples on the labware.\",\"type\":{\"type\":\"array\",\"items\":{\"name\":\"Sample\",\"type\":\"record\",\"doc\":\"A labware sample\",\"fields\":[{\"name\":\"sampleUuid\",\"doc\":\"Unique sample ID in UUID format.\",\"type\":\"version4MessageUuid\"},{\"name\":\"studyUuid\",\"doc\":\"Unique study UUID where the sample belongs to\",\"type\":\"version4MessageUuid\"},{\"name\":\"sangerSampleId\",\"type\":\"string\",\"doc\":\"Unique id to identify the sample inside Sanger lims\"},{\"name\":\"location\",\"type\":\"string\",\"doc\":\"The location for the sample inside the labware, or null if location is not relevant in labware (Eg: tube).\"},{\"name\":\"supplierSampleName\",\"type\":\"string\",\"doc\":\"Name given by the supplier of the sample\"},{\"name\":\"volume\",\"type\":\"string\",\"doc\":\"Volume of the sample.\"},{\"name\":\"concentration\",\"type\":\"string\",\"doc\":\"Concentration of the sample.\"},{\"name\":\"publicName\",\"type\":\"string\",\"doc\":\"Public name of the sample.\"},{\"name\":\"taxonId\",\"type\":\"string\",\"doc\":\"Taxonomy Identifier.\"},{\"name\":\"commonName\",\"type\":\"string\",\"doc\":\"Common name for the sample\"},{\"name\":\"donorId\",\"type\":\"string\",\"doc\":\"Identifier for the donor of the sample\"},{\"name\":\"libraryType\",\"type\":\"string\",\"doc\":\"Type of library created for sequencing\"},{\"name\":\"countryOfOrigin\",\"type\":\"string\",\"doc\":\"Country of origin for the sample\"},{\"name\":\"sampleCollectionDateUtc\",\"doc\":\"Sample Collection of the sample in UTC format.\",\"type\":{\"type\":\"long\",\"logicalType\":\"timestamp-millis\"}},{\"name\":\"costCode\",\"type\":\"string\",\"doc\":\"Code for the project for billing purposes\"},{\"name\":\"genomeSize\",\"type\":\"string\",\"doc\":\"Size of genome\"},{\"name\":\"accessionNumber\",\"type\":\"string\",\"doc\":\"Accession number for publication in ENA/EBI\"},{\"name\":\"shearedFemtoFragmentSize\",\"type\":\"string\",\"doc\":\"Sheared Femto Fragment Size\"},{\"name\":\"postSPRIConcentration\",\"type\":\"string\",\"doc\":\"Post SPRI Concentration (ng/ul)\"},{\"name\":\"postSPRIVolume\",\"type\":\"string\",\"doc\":\"Post SPRI Volume (ul)\"},{\"name\":\"finalNanoDrop280\",\"type\":\"string\",\"doc\":\"Final NanoDrop 260/280\"},{\"name\":\"finalNanoDrop230\",\"type\":\"string\",\"doc\":\"Final NanoDrop 260/230\"},{\"name\":\"finalNanoDrop\",\"type\":\"string\",\"doc\":\"Final NanoDrop ng/ul\"},{\"name\":\"shearingAndQCComments\",\"type\":\"string\",\"doc\":\"Shearing & QC comments\"},{\"name\":\"dateSubmittedUTC\",\"doc\":\"Date submitted in UTC format.\",\"type\":{\"type\":\"long\",\"logicalType\":\"timestamp-millis\"}},{\"name\":\"priorityLevel\",\"type\":\"string\",\"doc\":\"Priority level (if High or Medium)\"},{\"name\":\"dateRequiredBy\",\"type\":\"string\",\"doc\":\"Date data required by\"},{\"name\":\"reasonForPriority\",\"type\":\"string\",\"doc\":\"Reason for priority\"}]}}}]}}]}" }

Sangeetha-Bheeman commented 1 year ago

Closing this, as all the tasks in this are being tracked as part of DPL- 753-1, DPL-753-2 and DPL-754.