Skip to content
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

patch - Concatenate Microbial fastq files #3958

Merged
merged 13 commits into from
Nov 25, 2024

Conversation

diitaz93
Copy link
Contributor

@diitaz93 diitaz93 commented Nov 20, 2024

Description

Addresses https://github.com/Clinical-Genomics/bug-reports/issues/17
The Microbial fastq orders currently behave in the backend as a normal fastq order, while in reality, they should have a hybrid functionality between Microsalt and fastq. This is, the raw data fastq files should be concatenated for a sample (the replicates in multiple lanes) as it is done in Microsalt, but no analysis should start, as in fastq orders.

This PR overwrites the Workflow of Microbial-fastq cases from Workflow.RAW_DATA to Workflow.MICROSALT just for the delivery service.

Added

  • Static method _convert_workflow in DeliveryServiceFactory that patches the workflow of microbial fastq cases as Microsalt
  • Unit test for new function

Changed

  • The parameters of the public function build_delivery_service from DeliveryServiceFactory to receive case and delivery_type instead of Workflow and delivery_type

Fixed

  • All calls to build_delivery_service with the new parameters
  • Tests for build_delivery_service

How to prepare for test

  • Ssh to relevant server (depending on type of change)
  • Use stage: us
  • Paxa the environment: paxa
  • Install on stage (example for Hasta):
    bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_cg -t cg -b concatenate-w-pseudo-workflow -a

How to test

  • Copy housekeeper bundle fastq files from prod to stage
  • Do cg -l DEBUG deliver ticket -t 1001074 --dry-run

Expected test outcome

  • Check that a folder with the ticket id was created in home/proj/stage/customers/cust121
  • Check that the folder has concatenated fastq files

Review

  • Tests executed by SD
  • "Merge and deploy" approved by CO, IO
    Thanks for filling in who performed the code review and the test!

This version is a

  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

Implementation Plan

  • Deployed to stage:
  • Deployed to production:

cg/constants/constants.py Outdated Show resolved Hide resolved
cg/cli/deliver/base.py Outdated Show resolved Hide resolved
cg/cli/deliver/utils.py Outdated Show resolved Hide resolved
@diitaz93 diitaz93 changed the title add pseudo workflow to delivery patch - Concatenate Microbial fastq files Nov 21, 2024
@diitaz93 diitaz93 marked this pull request as ready for review November 21, 2024 10:59
@diitaz93 diitaz93 requested a review from a team as a code owner November 21, 2024 10:59
Copy link
Contributor

@ChrOertlin ChrOertlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@diitaz93 diitaz93 mentioned this pull request Nov 21, 2024
15 tasks
Copy link
Contributor

@islean islean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments! I think it makes sense to check apptags in statusdb since then we do not need to apply changes to the code when entries are changed. I also think we can clarify the intent of a method by changing its return type to bool

Copy link

sonarcloud bot commented Nov 22, 2024

@diitaz93
Copy link
Contributor Author

Tests on stage

Command finished without errors
Concatenated files are shown in customer folder in hasta
Screenshot 2024-11-22 at 11 17 50

@diitaz93 diitaz93 merged commit db9214d into master Nov 25, 2024
9 checks passed
@diitaz93 diitaz93 deleted the concatenate-w-pseudo-workflow branch November 25, 2024 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants