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

Add low volume warning to aliquot volume EPP #547

Merged
merged 5 commits into from
Oct 14, 2024
Merged

Conversation

Karl-Svard
Copy link
Collaborator

@Karl-Svard Karl-Svard commented Oct 14, 2024

Connected to the feature request in issue #435

Added

  • New exception for low volumes, LowVolumeError
  • New Click option for minimum volume threshold, minimum_volume

Changed

  • Restructured aliquot_volume.py EPP

Steps to consider while deploying

  • Configuration changes:
  • Documentation updates:
  • Inform users by email:

Review:

  • Code approved by
  • Tests executed on stage by: (Document the test done with screen shots and description.)
  • "Merge and deploy" approved by

This version is a:

  • MAJOR - when you make incompatible API changes
  • MINOR - when you add functionality in a backwards compatible manner
  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

@Karl-Svard
Copy link
Collaborator Author

Tests on stage

Test with some samples missing UDFs

Screenshot 2024-10-14 at 13 51 18

Test with some samples having aliquots below the given threshold

Screenshot 2024-10-14 at 13 50 19

Test with all samples passing the threshold check

Screenshot 2024-10-14 at 14 03 27

Summary

The scripts passed all tests and the resulting aliquots are identical to those calculated by the previous script

Copy link
Contributor

@idalindegaard idalindegaard left a comment

Choose a reason for hiding this comment

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

Bra jobbat!👏💯

@Karl-Svard
Copy link
Collaborator Author

Current usage of the script in prod:

INFO:cg_lims.scripts.check_config:Button: Calculate Volume
INFO:cg_lims.scripts.check_config:Bash string: bash -c -l "conda activate cg_lims &&  lims -c  /home/glsai/.genologics.yaml epps -l {compoundOutputFileLuid0} -p {processLuid}  udf calculate aliquot-volume --concentration-udf 'Concentration' --volume-udf 'Sample Volume (ul)' --buffer-udf 'Volume H2O (ul)' --total-volume-udf 'Total Volume (ul)' --amount-ng-udf 'Amount needed (ng)'"
INFO:cg_lims.scripts.check_config:Processes: [('1357', 'Aliquot samples for enzymatic fragmentation TWIST v2')] 

INFO:cg_lims.scripts.check_config:Button: Calculate Aliquotation Volume from Average concentration (ng/ul) Saphyr
INFO:cg_lims.scripts.check_config:Bash string: bash -c -l "conda activate cg_lims &&  lims -c  /home/glsai/.genologics.yaml epps -l {compoundOutputFileLuid0} -p {processLuid}   udf calculate aliquot-volume --concentration-udf 'Initial Concentration (ng/ul)' --amount-ng-udf 'Amount needed (ng)' --volume-udf 'Sample Volume (ul)' --buffer-udf 'Volume H2O (ul)' --total-volume-udf 'Total Volume (ul)'"
INFO:cg_lims.scripts.check_config:Processes: [('1909', 'Labelling & Staining (Saphyr)')] 

Current usage of script in stage

INFO:cg_lims.scripts.check_config:Button: Calculate Volume
INFO:cg_lims.scripts.check_config:Bash string: bash -c -l "conda activate cg_lims &&  lims -c  /home/glsai/.genologics.yaml epps -l {compoundOutputFileLuid0} -p {processLuid}  udf calculate aliquot-volume --concentration-udf 'Concentration' --volume-udf 'Sample Volume (ul)' --buffer-udf 'Volume H2O (ul)' --total-volume-udf 'Total Volume (ul)' --amount-ng-udf 'Amount needed (ng)' --min-volume 1"
INFO:cg_lims.scripts.check_config:Processes: [('1357', 'Aliquot samples for enzymatic fragmentation TWIST v2')] 

INFO:cg_lims.scripts.check_config:Button: Calculate Aliquotation Volume from Average concentration (ng/ul) Saphyr
INFO:cg_lims.scripts.check_config:Bash string: bash -c -l "conda activate cg_lims &&  lims -c  /home/glsai/.genologics.yaml epps -l {compoundOutputFileLuid0} -p {processLuid}   udf calculate aliquot-volume --concentration-udf 'Initial Concentration (ng/ul)' --amount-ng-udf 'Amount needed (ng)' --volume-udf 'Sample Volume (ul)' --buffer-udf 'Volume H2O (ul)' --total-volume-udf 'Total Volume (ul)'"
INFO:cg_lims.scripts.check_config:Processes: [('1909', 'Labelling & Staining (Saphyr)')] 

INFO:cg_lims.scripts.check_config:Button: Calculate EB Volume
INFO:cg_lims.scripts.check_config:Bash string: bash -c -l "conda activate cg_lims &&  lims -c  /home/glsai/.genologics.yaml epps -l {compoundOutputFileLuid0} -p {processLuid}  udf calculate aliquot-volume --concentration-udf 'Concentration' --volume-udf 'Sample Volume (ul)' --buffer-udf 'Volume Buffer (ul)' --total-volume-udf 'Total Volume (ul)' --amount-ng-udf 'Amount needed (ng)'"
INFO:cg_lims.scripts.check_config:Processes: [('2022', 'Aliquot samples for WGS fragmentation v1'), ('2034', 'Aliquot samples for DNA size selection (SRE) v1')] 

Only the TWIST and Watchmaker steps will have to be updated as --min-volume is fully optional and it will behave as normal without it (default is 0ul). Both TWIST and Watchmaker will use 1ul as the lower threshold.

@Karl-Svard Karl-Svard merged commit 0971327 into master Oct 14, 2024
2 checks passed
@Karl-Svard Karl-Svard deleted the add_aliquot_warning branch October 14, 2024 13:08
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.

2 participants