-
Notifications
You must be signed in to change notification settings - Fork 1
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
Switch to using generalized resources #90
Conversation
Bleep bloop, I am a robot. Alas, some of the Nextflow configuration tests failed! test/configtest-F16.json@ ["params","proc_resource_params"]
- {"deduplicate_records_SAMtools":{"cpus":"2","memory":"27.9 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"extract_GenomeIntervals":{"cpus":"1","memory":"1 GB"},"remove_intermediate_files":{"cpus":"1","memory":"1 GB"},"remove_merged_BAM":{"cpus":"1","memory":"1 GB"},"remove_unmerged_BAMs":{"cpus":"1","memory":"1 GB"},"run_ApplyBQSR_GATK":{"cpus":"1","memory":"2 GB","retry_strategy":{"memory":{"operand":"4","strategy":"exponential"}}},"run_BaseRecalibrator_GATK":{"cpus":"1","memory":"27.9 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_CalculateContamination_GATK":{"cpus":"1","memory":"14 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_DepthOfCoverage_GATK":{"cpus":"1","memory":"14 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_GetPileupSummaries_GATK":{"cpus":"1","memory":"14 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_IndelRealigner_GATK":{"cpus":"2","memory":"4 GB","retry_strategy":{"memory":{"operand":"4","strategy":"exponential"}}},"run_MergeSamFiles_Picard":{"cpus":"2","memory":"27.9 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_RealignerTargetCreator_GATK":{"cpus":"2","memory":"4 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_SplitIntervals_GATK":{"cpus":"1","memory":"1 GB"},"run_index_SAMtools":{"cpus":"1","memory":"2 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_validate_PipeVal":{"cpus":"1","memory":"1 GB"}}
@ ["params","base_allocations"]
+ {"deduplicate_records_SAMtools":{"cpus":"2","memory":"8 GB"},"extract_GenomeIntervals":{"cpus":"1","memory":"1 GB"},"remove_intermediate_files":{"cpus":"1","memory":"1 GB"},"remove_merged_BAM":{"cpus":"1","memory":"1 GB"},"remove_unmerged_BAMs":{"cpus":"1","memory":"1 GB"},"run_ApplyBQSR_GATK":{"cpus":"1","memory":"2 GB"},"run_BaseRecalibrator_GATK":{"cpus":"1","memory":"30 GB"},"run_CalculateContamination_GATK":{"cpus":"1","memory":"5 GB"},"run_DepthOfCoverage_GATK":{"cpus":"1","memory":"5 GB"},"run_GetPileupSummaries_GATK":{"cpus":"1","memory":"5 GB"},"run_IndelRealigner_GATK":{"cpus":"2","memory":"4 GB"},"run_MergeSamFiles_Picard":{"cpus":"2","memory":"8 GB"},"run_RealignerTargetCreator_GATK":{"cpus":"2","memory":"4 GB"},"run_SplitIntervals_GATK":{"cpus":"1","memory":"1 GB"},"run_index_SAMtools":{"cpus":"1","memory":"2 GB"},"run_validate_PipeVal":{"cpus":"1","memory":"1 GB"}}
@ ["params","max_time"]
+ "24d 20h 31m 24s"
@ ["params","min_time"]
+ "1s"
@ ["params","retry_information"]
+ {"deduplicate_records_SAMtools":{"memory":{"operand":"2","strategy":"exponential"}},"run_ApplyBQSR_GATK":{"memory":{"operand":"4","strategy":"exponential"}},"run_BaseRecalibrator_GATK":{"memory":{"operand":"2","strategy":"exponential"}},"run_CalculateContamination_GATK":{"memory":{"operand":"2","strategy":"exponential"}},"run_DepthOfCoverage_GATK":{"memory":{"operand":"2","strategy":"exponential"}},"run_GetPileupSummaries_GATK":{"memory":{"operand":"2","strategy":"exponential"}},"run_IndelRealigner_GATK":{"memory":{"operand":"4","strategy":"exponential"}},"run_MergeSamFiles_Picard":{"memory":{"operand":"2","strategy":"exponential"}},"run_RealignerTargetCreator_GATK":{"memory":{"operand":"2","strategy":"exponential"}},"run_index_SAMtools":{"memory":{"operand":"2","strategy":"exponential"}}}
@ ["process","cpus"]
- {"1":"1","2":"2","3":"3","closure":"closure()"}
+ "16"
@ ["process","errorStrategy"]
- {"1":"terminate","2":"terminate","3":"terminate","closure":"terminate"}
@ ["process","maxRetries"]
- "1"
@ ["process","withLabel:process_high"]
- {"cpus":{"1":"12","2":"12","3":"12","closure":"retry_updater(12, add, 0, $task.attempt, cpus)"},"memory":{"1":"31 GB","2":"31 GB","3":"31 GB","closure":"retry_updater(84 GB, exponential, 2, $task.attempt, memory)"}}
@ ["process","withLabel:process_low"]
- {"cpus":{"1":"2","2":"2","3":"2","closure":"retry_updater(2, add, 0, $task.attempt, cpus)"},"memory":{"1":"3 GB","2":"6 GB","3":"12 GB","closure":"retry_updater(3 GB, exponential, 2, $task.attempt, memory)"}}
@ ["process","withLabel:process_medium"]
- {"cpus":{"1":"6","2":"6","3":"6","closure":"retry_updater(6, add, 0, $task.attempt, cpus)"},"memory":{"1":"31 GB","2":"31 GB","3":"31 GB","closure":"retry_updater(42 GB, exponential, 2, $task.attempt, memory)"}}
@ ["process","withName:deduplicate_records_SAMtools","memory"]
- {"1":"27.9 GB","2":"31 GB","3":"31 GB","closure":"retry_updater(27.9 GB, exponential, 2, $task.attempt, memory)"}
+ "27.9 GB"
@ ["process","withName:run_BaseRecalibrator_GATK","memory"]
- {"1":"27.9 GB","2":"31 GB","3":"31 GB","closure":"retry_updater(27.9 GB, exponential, 2, $task.attempt, memory)"}
+ "27.9 GB"
@ ["process","withName:run_CalculateContamination_GATK","memory"]
- {"1":"14 GB","2":"27.9 GB","3":"31 GB","closure":"retry_updater(14 GB, exponential, 2, $task.attempt, memory)"}
+ "14 GB"
@ ["process","withName:run_DepthOfCoverage_GATK","memory"]
- {"1":"14 GB","2":"27.9 GB","3":"31 GB","closure":"retry_updater(14 GB, exponential, 2, $task.attempt, memory)"}
+ "14 GB"
@ ["process","withName:run_GetPileupSummaries_GATK","memory"]
- {"1":"14 GB","2":"27.9 GB","3":"31 GB","closure":"retry_updater(14 GB, exponential, 2, $task.attempt, memory)"}
+ "14 GB"
@ ["process","withName:run_MergeSamFiles_Picard","memory"]
- {"1":"27.9 GB","2":"31 GB","3":"31 GB","closure":"retry_updater(27.9 GB, exponential, 2, $task.attempt, memory)"}
+ "27.9 GB"
@ ["resource_handler"]
+ {"handle_resources":"closure()","set_resource_limit_params":"closure()","set_retry":"closure()","setup_retry":"closure()"} test/configtest-F32.json@ ["params","proc_resource_params"]
- {"deduplicate_records_SAMtools":{"cpus":"2","memory":"57.6 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"extract_GenomeIntervals":{"cpus":"1","memory":"1 GB"},"remove_intermediate_files":{"cpus":"1","memory":"1 GB"},"remove_merged_BAM":{"cpus":"1","memory":"1 GB"},"remove_unmerged_BAMs":{"cpus":"1","memory":"1 GB"},"run_ApplyBQSR_GATK":{"cpus":"1","memory":"2 GB","retry_strategy":{"memory":{"operand":"4","strategy":"exponential"}}},"run_BaseRecalibrator_GATK":{"cpus":"1","memory":"57.6 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_CalculateContamination_GATK":{"cpus":"1","memory":"28.8 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_DepthOfCoverage_GATK":{"cpus":"1","memory":"28.8 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_GetPileupSummaries_GATK":{"cpus":"1","memory":"28.8 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_IndelRealigner_GATK":{"cpus":"4","memory":"6 GB","retry_strategy":{"memory":{"operand":"4","strategy":"exponential"}}},"run_MergeSamFiles_Picard":{"cpus":"2","memory":"57.6 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_RealignerTargetCreator_GATK":{"cpus":"4","memory":"6 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_SplitIntervals_GATK":{"cpus":"1","memory":"1 GB"},"run_index_SAMtools":{"cpus":"1","memory":"2 GB","retry_strategy":{"memory":{"operand":"2","strategy":"exponential"}}},"run_validate_PipeVal":{"cpus":"1","memory":"1 GB"}}
@ ["params","base_allocations"]
+ {"deduplicate_records_SAMtools":{"cpus":"2","memory":"8 GB"},"extract_GenomeIntervals":{"cpus":"1","memory":"1 GB"},"remove_intermediate_files":{"cpus":"1","memory":"1 GB"},"remove_merged_BAM":{"cpus":"1","memory":"1 GB"},"remove_unmerged_BAMs":{"cpus":"1","memory":"1 GB"},"run_ApplyBQSR_GATK":{"cpus":"1","memory":"2 GB"},"run_BaseRecalibrator_GATK":{"cpus":"1","memory":"60 GB"},"run_CalculateContamination_GATK":{"cpus":"1","memory":"5 GB"},"run_DepthOfCoverage_GATK":{"cpus":"1","memory":"10 GB"},"run_GetPileupSummaries_GATK":{"cpus":"1","memory":"5 GB"},"run_IndelRealigner_GATK":{"cpus":"4","memory":"6 GB"},"run_MergeSamFiles_Picard":{"cpus":"2","memory":"8 GB"},"run_RealignerTargetCreator_GATK":{"cpus":"4","memory":"6 GB"},"run_SplitIntervals_GATK":{"cpus":"1","memory":"1 GB"},"run_index_SAMtools":{"cpus":"1","memory":"2 GB"},"run_validate_PipeVal":{"cpus":"1","memory":"1 GB"}}
@ ["params","max_time"]
+ "24d 20h 31m 24s"
@ ["params","min_time"]
+ "1s"
@ ["params","retry_information"]
+ {"deduplicate_records_SAMtools":{"memory":{"operand":"2","strategy":"exponential"}},"run_ApplyBQSR_GATK":{"memory":{"operand":"4","strategy":"exponential"}},"run_BaseRecalibrator_GATK":{"memory":{"operand":"2","strategy":"exponential"}},"run_CalculateContamination_GATK":{"memory":{"operand":"2","strategy":"exponential"}},"run_DepthOfCoverage_GATK":{"memory":{"operand":"2","strategy":"exponential"}},"run_GetPileupSummaries_GATK":{"memory":{"operand":"2","strategy":"exponential"}},"run_IndelRealigner_GATK":{"memory":{"operand":"4","strategy":"exponential"}},"run_MergeSamFiles_Picard":{"memory":{"operand":"2","strategy":"exponential"}},"run_RealignerTargetCreator_GATK":{"memory":{"operand":"2","strategy":"exponential"}},"run_index_SAMtools":{"memory":{"operand":"2","strategy":"exponential"}}}
@ ["process","cpus"]
- {"1":"1","2":"2","3":"3","closure":"closure()"}
+ "32"
@ ["process","errorStrategy"]
- {"1":"terminate","2":"terminate","3":"terminate","closure":"terminate"}
@ ["process","maxRetries"]
- "1"
@ ["process","withLabel:process_high"]
- {"cpus":{"1":"12","2":"12","3":"12","closure":"retry_updater(12, add, 0, $task.attempt, cpus)"},"memory":{"1":"64 GB","2":"64 GB","3":"64 GB","closure":"retry_updater(84 GB, exponential, 2, $task.attempt, memory)"}}
@ ["process","withLabel:process_low"]
- {"cpus":{"1":"2","2":"2","3":"2","closure":"retry_updater(2, add, 0, $task.attempt, cpus)"},"memory":{"1":"3 GB","2":"6 GB","3":"12 GB","closure":"retry_updater(3 GB, exponential, 2, $task.attempt, memory)"}}
@ ["process","withLabel:process_medium"]
- {"cpus":{"1":"6","2":"6","3":"6","closure":"retry_updater(6, add, 0, $task.attempt, cpus)"},"memory":{"1":"42 GB","2":"64 GB","3":"64 GB","closure":"retry_updater(42 GB, exponential, 2, $task.attempt, memory)"}}
@ ["process","withName:deduplicate_records_SAMtools","memory"]
- {"1":"57.6 GB","2":"64 GB","3":"64 GB","closure":"retry_updater(57.6 GB, exponential, 2, $task.attempt, memory)"}
+ "57.6 GB"
@ ["process","withName:run_BaseRecalibrator_GATK","memory"]
- {"1":"57.6 GB","2":"64 GB","3":"64 GB","closure":"retry_updater(57.6 GB, exponential, 2, $task.attempt, memory)"}
+ "57.6 GB"
@ ["process","withName:run_CalculateContamination_GATK","memory"]
- {"1":"28.8 GB","2":"57.6 GB","3":"64 GB","closure":"retry_updater(28.8 GB, exponential, 2, $task.attempt, memory)"}
+ "28.8 GB"
@ ["process","withName:run_DepthOfCoverage_GATK","memory"]
- {"1":"28.8 GB","2":"57.6 GB","3":"64 GB","closure":"retry_updater(28.8 GB, exponential, 2, $task.attempt, memory)"}
+ "28.8 GB"
@ ["process","withName:run_GetPileupSummaries_GATK","memory"]
- {"1":"28.8 GB","2":"57.6 GB","3":"64 GB","closure":"retry_updater(28.8 GB, exponential, 2, $task.attempt, memory)"}
+ "28.8 GB"
@ ["process","withName:run_MergeSamFiles_Picard","memory"]
- {"1":"57.6 GB","2":"64 GB","3":"64 GB","closure":"retry_updater(57.6 GB, exponential, 2, $task.attempt, memory)"}
+ "57.6 GB"
@ ["resource_handler"]
+ {"handle_resources":"closure()","set_resource_limit_params":"closure()","set_retry":"closure()","setup_retry":"closure()"} If the above changes are surprising, stop and determine what happened. If the above changes are expected, there are two ways to fix this:
|
These test changes should be carefully reviewed, as the logic generating them is at the core of this PR. |
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
@nwiltsie This should now be an identical configuration in terms of allocations and setup; the differences in the JSONs are largely due to the base allocations now being split from the retry strategy per process if you want to confirm |
Confirmed, the differences all seem structural and not quantitative. Thanks for fixing those up! |
uclahs-cds/pipeline-Nextflow-config#73 has been merged, so I've updated the submodule to point to |
I'll go over this today or tomorrow! |
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! I tweaked some of the default allocations in 9125ad6
Tested with log: /hot/software/pipeline/pipeline-recalibrate-BAM/Nextflow/development/1.0.2/nwiltsie-generalize-resources/log-nftest-20241220T014616Z.log
If the tweaks look good, I'm good to merge this
Description
This updates the pipeline to use generalized resources, as detailed in this comment.
I've updated the pipeline-Nextflow-config submodule to uclahs-cds/pipeline-Nextflow-config@c612346 (currently the head of uclahs-cds/pipeline-Nextflow-config#73). That PR should be merged and the submodule updated again before this PR is merged.
Testing Results
/hot/software/pipeline/pipeline-recalibrate-BAM/Nextflow/development/unreleased/nwiltsie-generalize-resources/log-nftest-20241115T182709Z.log
Checklist
I have read the code review guidelines and the code review best practice on GitHub check-list.
I have reviewed the Nextflow pipeline standards.
The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].
I have set up or verified the branch protection rule following the github standards before opening this pull request.
I have added my name to the contributors listings in the
manifest
block in thenextflow.config
as part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)
I have added the changes included in this pull request to the
CHANGELOG.md
under the next release version or unreleased, and updated the date.I have updated the version number in the
metadata.yaml
andmanifest
block of thenextflow.config
file following semver, or the version number has already been updated. (Leave it unchecked if you are unsure about new version number and discuss it with the infrastructure team in this PR.)I have tested the pipeline using NFTest, or I have justified why I did not need to run NFTest above.