Skip to content

Feature/prs modules - #10

Merged
Jorisvansteenbrugge merged 61 commits into
mainfrom
feature/prs_modules
Aug 7, 2026
Merged

Jorisvansteenbrugge merged 61 commits into
mainfrom
feature/prs_modules

Conversation

@Jorisvansteenbrugge

@Jorisvansteenbrugge Jorisvansteenbrugge commented Jul 15, 2026 •

Copy link
Copy Markdown
Collaborator

The modules and subworkflows from DxNextflowPRS have been moved to the central Modules repository. A few small refactors have been made to make the subworkflows more 'stand alone', but 90% of the content of this PR was previously reviewed and is already used in production (https://github.com/UMCUGenetics/DxNextflowPRS/tree/main)

  • Software version outputs have been moved to 'topic' versions.
  • Module configuration that is specific to the PRS workflow is included in subworkflows/UMCUGenetics/bam_prs/nextflow.config
  • All nf-tests and linting tests are passing

@rernst
rernst self-requested a review August 3, 2026 09:19

@rernst rernst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, some minor remarks / discussion points and comments:

  • Add version to (python) tools instead of nextflow module.
  • Update diff comparisons to reflect update modules -> maybe evaluate whether we still need to 'copy' these nf-core modules in our own repo (out of scope for this PR)?
  • I think it would be a good idea to create a separate 'prsutils' repo for the python tools in that module. Comparable to what we want to do with for example DIMS.

# Required for nft-utils nfcoreInstall() to install nf-core modules
# during test setup (provides the `nf-core` CLI on PATH).
shell: bash
run: python -m pip install --upgrade --force-reinstall git+https://github.com/UMCUGenetics/nf-core-tools.git

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we still need our own checkout -> if so, we should make sure to keep it up to date.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It is worth to discus this. Technically, no we don't need it. But using the unforked nf-core tools would require us to add more metadata and a few other required fields in main.nf. Most notably a meta.yml file for each module/subworkflow. In my opinion it it very useful to have documentation alongside each entity, but that would involve some extra work on the development side as a tradeoff.

I've made an example PR that highlights the differences between the linting requirements of nf-core/tools and our fork: https://github.com/UMCUGenetics/NF-Modules/pull/13/changes

Comment thread modules/UMCUGenetics/ancestry/calc/main.nf

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need our own custom GATK module? Do we use a different version?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

For PRS we need the input tuple val(meta7), path(alleles), path(alleles_tbi) which is not present in the nf-core version of the module by default. In DxNextflowPRS I previously added this input and generated a path file with nf-core modules patch, but the module patch does not carry over when installing the subworkflow from this modules repository into a pipeline.

Hence I vendored the module and renamed it to GATK4_HAPLOTYPECALLERALLELES to disambiguate. A cleaner solution would be to fix this upstream and add the alleles input as an optional input in the nf-core/modules repo. However, that is a lot of work, as it would require me to also check all subworkflows and other modules in the nf-core repo that use GATK4_HAPLOTYPECALLER and update those as well

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we add a meta.yml for our modules as well? Is there any added value?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This ties in with the thread over here: https://github.com/UMCUGenetics/NF-Modules/pull/10/changes#r3702790926

tldr: documentation has added value, but it involves more work on the development side. What do you think?

Comment thread modules/UMCUGenetics/pgscatalog/combine/main.nf Outdated
Comment thread modules/UMCUGenetics/plink2/extract/plink2-extract.diff Outdated
Comment thread modules/UMCUGenetics/plink2/scoreexpanded/plink2-score.diff Outdated
Comment thread modules/UMCUGenetics/plink2/vcfexpanded/plink2-vcf.diff Outdated
Comment thread subworkflows/UMCUGenetics/bam_haplotypecaller_norm/main.nf Outdated

@Jorisvansteenbrugge Jorisvansteenbrugge left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Comments from @rernst have been addressed, a few discussion points remain.

# Required for nft-utils nfcoreInstall() to install nf-core modules
# during test setup (provides the `nf-core` CLI on PATH).
shell: bash
run: python -m pip install --upgrade --force-reinstall git+https://github.com/UMCUGenetics/nf-core-tools.git

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It is worth to discus this. Technically, no we don't need it. But using the unforked nf-core tools would require us to add more metadata and a few other required fields in main.nf. Most notably a meta.yml file for each module/subworkflow. In my opinion it it very useful to have documentation alongside each entity, but that would involve some extra work on the development side as a tradeoff.

I've made an example PR that highlights the differences between the linting requirements of nf-core/tools and our fork: https://github.com/UMCUGenetics/NF-Modules/pull/13/changes

Comment thread subworkflows/UMCUGenetics/bam_haplotypecaller_norm/main.nf Outdated
Comment thread modules/UMCUGenetics/ancestry/calc/main.nf

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

For PRS we need the input tuple val(meta7), path(alleles), path(alleles_tbi) which is not present in the nf-core version of the module by default. In DxNextflowPRS I previously added this input and generated a path file with nf-core modules patch, but the module patch does not carry over when installing the subworkflow from this modules repository into a pipeline.

Hence I vendored the module and renamed it to GATK4_HAPLOTYPECALLERALLELES to disambiguate. A cleaner solution would be to fix this upstream and add the alleles input as an optional input in the nf-core/modules repo. However, that is a lot of work, as it would require me to also check all subworkflows and other modules in the nf-core repo that use GATK4_HAPLOTYPECALLER and update those as well

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This ties in with the thread over here: https://github.com/UMCUGenetics/NF-Modules/pull/10/changes#r3702790926

tldr: documentation has added value, but it involves more work on the development side. What do you think?

Comment thread modules/UMCUGenetics/pgscatalog/combine/main.nf Outdated
@rernst
rernst self-requested a review August 7, 2026 08:57
@Jorisvansteenbrugge
Jorisvansteenbrugge merged commit c433f4b into main Aug 7, 2026
38 checks passed
@Jorisvansteenbrugge
Jorisvansteenbrugge deleted the feature/prs_modules branch August 7, 2026 08:59
@Jorisvansteenbrugge
Jorisvansteenbrugge restored the feature/prs_modules branch August 7, 2026 09:21
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