-
Notifications
You must be signed in to change notification settings - Fork 3
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
feature(streamline mutant delivery and upload) #3916
Conversation
…ith LIMS metadata
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding some comments. In general I am positive, but I do think we can make the code a bit clearer since it is taking me quite some time to puzzle together what the actual flow is here. I will try to map the flow out and you can correct me.
- So we have SampleFiles being passed to the FileFormattingService. The first layer of formatting from the SampleFileFormatter returns a list of
FormattedFile
s which have the original path attached, and a formatted path which prepends the sample name? - These formatted files are now concatenated in the
SampleFileConcatenationFormatter
. This results in the formatted_path attributes becoming exchanged so that all FormattedFiles whose original_path corresponds to a file from the same sample with the same direction have the same concatenated formatted_path. - We now enter the MutantFileFormatter which prepends the region and region code to the file names. In doing so, all the formatted_paths from step 2 are actually set to the original paths of all the formatted files. The formatted paths are exactly the same as the original paths but with the reqion and lab code prepended.
- We now filter out unique FormattedFiles. I guess this is because the change of the original_path in step 3 now makes it so that for a sample having 2 forward fastq files, we will have 2 duplicated FormattedFile entries? This indicates to me that we are using the list of FormattedFiles in a not intended way.
- We now rename all the FormattedFiles from their original path to the formatted path. Will this work? I guess the original paths all correspond to the concatenated paths now so they have been created in step 2? Is the only goal at this point to rename the already concatenated fastq files so that they contain the lims metadata?
Also - in the _concatenate_fastq_files
in the SampleFileConcatenationFormatter
we seem to have hard coded that we are removing the raw fastq files which I thought should not happen in this case. Is it intended that we remove the raw fastq files?
cg/services/deliver_files/file_formatter/utils/mutant_sample_service.py
Outdated
Show resolved
Hide resolved
cg/services/deliver_files/file_formatter/utils/mutant_sample_service.py
Outdated
Show resolved
Hide resolved
cg/services/deliver_files/file_formatter/utils/sample_service.py
Outdated
Show resolved
Hide resolved
cg/services/deliver_files/file_formatter/utils/mutant_sample_service.py
Outdated
Show resolved
Hide resolved
cg/services/deliver_files/file_formatter/utils/mutant_sample_service.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Some unclarity stemming from Mutant with the multiple formatting steps but that is fine
cg/services/deliver_files/file_formatter/utils/mutant_sample_service.py
Outdated
Show resolved
Hide resolved
## Description add specific FOHM upload tags
# Description Adds GSAID and FOHM upload to mutantuploadapi
# description Update covid orderform
cg/services/deliver_files/deliver_files_service/deliver_files_service.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Since we've touched the delivery flow, have you tested that non-sars-cov2 deliveries still behave as we expect them?
cg/services/deliver_files/deliver_files_service/deliver_files_service.py
Outdated
Show resolved
Hide resolved
cg/services/deliver_files/file_formatter/component_files/mutant_service.py
Outdated
Show resolved
Hide resolved
cg/services/deliver_files/file_formatter/component_files/abstract.py
Outdated
Show resolved
Hide resolved
type hint Co-authored-by: Vincent Janvid <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 🚀 Lets rename the component class if possible
cg/services/deliver_files/file_formatter/component_files/concatenation_service.py
Outdated
Show resolved
Hide resolved
cg/services/deliver_files/file_formatter/component_files/concatenation_service.py
Outdated
Show resolved
Hide resolved
cg/services/deliver_files/file_formatter/component_files/concatenation_service.py
Outdated
Show resolved
Hide resolved
tests/services/file_delivery/file_formatter/files/test_formatter_utils.py
Outdated
Show resolved
Hide resolved
Sebastian review Co-authored-by: Sebastian Diaz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nice improvement!
cg/services/deliver_files/deliver_files_service/deliver_files_service.py
Show resolved
Hide resolved
cg/services/deliver_files/deliver_files_service/deliver_files_service.py
Outdated
Show resolved
Hide resolved
cg/services/deliver_files/file_formatter/files/concatenation_service.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Isak Ohlsson Ångnell <[email protected]>
Co-authored-by: Isak Ohlsson Ångnell <[email protected]>
Co-authored-by: Isak Ohlsson Ångnell <[email protected]>
Co-authored-by: Isak Ohlsson Ångnell <[email protected]>
Quality Gate passedIssues Measures |
Description
This PR is a feature branch that will implement the automation of the mutant file delivery as well as a partial rework of what files we store and upload in the FOHM upload api.
Added
How to prepare for test
us
paxa
Requires
Merges of:
Clinical-Genomics/MUTANT#178
https://github.com/Clinical-Genomics/servers/pull/1520
https://github.com/Clinical-Genomics/clinical-genomics-ui/pull/620
How to test
Expected test outcome
Review
Thanks for filling in who performed the code review and the test!
This version is a
Implementation Plan