Skip to content

Add support for variant scoring by MIVMIR, GICAM models#812

Open
torbjorgen wants to merge 1 commit into
nf-core:devfrom
torbjorgen:variant-scoring-by-mivmir-gicam
Open

Add support for variant scoring by MIVMIR, GICAM models#812
torbjorgen wants to merge 1 commit into
nf-core:devfrom
torbjorgen:variant-scoring-by-mivmir-gicam

Conversation

@torbjorgen

@torbjorgen torbjorgen commented Apr 16, 2026

Copy link
Copy Markdown

Add support for SNV variant ranking using MIVMIR, GICAM models.

TODOs

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/raredisease branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Ensure the test suite passes (nextflow run . -profile test_singleton,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

@nf-core-bot

Copy link
Copy Markdown
Member

Warning

Newer version of the nf-core template is available.

Your pipeline is using an old version of the nf-core template: 3.5.1.
Please update your pipeline to the latest version.

For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation.

@torbjorgen

Copy link
Copy Markdown
Author

I'd appreciate your input here @ramprasadn thanks : )

@torbjorgen torbjorgen force-pushed the variant-scoring-by-mivmir-gicam branch 5 times, most recently from 262d52c to 543604f Compare April 17, 2026 09:20
@torbjorgen torbjorgen marked this pull request as ready for review April 17, 2026 11:13
@torbjorgen

Copy link
Copy Markdown
Author

@ramprasadn @peterpru Appreciate your review here. Thanks : )

@torbjorgen torbjorgen linked an issue Apr 20, 2026 that may be closed by this pull request
@torbjorgen torbjorgen force-pushed the variant-scoring-by-mivmir-gicam branch 6 times, most recently from 5d2f14b to f986c17 Compare April 23, 2026 07:39

@fellen31 fellen31 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice! Some comments/questions.

Comment thread modules/local/gicam/main.nf
Comment thread modules/local/gicam/main.nf
Comment thread modules/local/gicam/main.nf
Comment thread modules/local/gicam/main.nf Outdated
Comment thread modules/local/gicam/main.nf Outdated
Comment thread modules/local/mivmir/meta.yml Outdated
Comment thread subworkflows/local/rank_variants/main.nf Outdated
Comment thread subworkflows/local/rank_variants/main.nf Outdated
Comment thread subworkflows/local/rank_variants/main.nf Outdated
Comment thread CHANGELOG.md Outdated
@torbjorgen

torbjorgen commented Apr 29, 2026

Copy link
Copy Markdown
Author
  • Refactored according to @fellen31 comments
  • Added module unit test for MIVMIR, GICAM (with actual data)
  • Added subworkflow test for rank_variants (with actual data)

@torbjorgen torbjorgen force-pushed the variant-scoring-by-mivmir-gicam branch from 982c61f to 504e895 Compare April 29, 2026 09:42
@torbjorgen

Copy link
Copy Markdown
Author
  • Resolved merge conflicts in docs and changelog

@torbjorgen torbjorgen force-pushed the variant-scoring-by-mivmir-gicam branch from 504e895 to b27e058 Compare April 29, 2026 09:44
@torbjorgen

Copy link
Copy Markdown
Author
  • Docs lint fix

@torbjorgen torbjorgen force-pushed the variant-scoring-by-mivmir-gicam branch from b27e058 to 81ea672 Compare April 29, 2026 11:50
@torbjorgen

Copy link
Copy Markdown
Author
  • EOF fix

@torbjorgen torbjorgen requested a review from fellen31 April 29, 2026 13:24

@fellen31 fellen31 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good overall! There are some tests failing though https://github.com/nf-core/raredisease/actions/runs/25107174156/job/73586432922?pr=812.

I think I'll leave it to @ramprasadn to do a final review if I missed something :)

Comment thread docs/output.md Outdated
Comment thread modules/local/mivmir/meta.yml Outdated
- CSQ/SpliceAI_pred_DS_AG
- most_severe_consequence
- CADD
- SWEGENAF

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since this is a very specific resource needed for an open source nf-core pipeline, maybe we could add some guidance on where this can be accessed?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@jemten @ramprasadn Can you please shed some light on how to get a hold on data required for annotating with SWEGENAF, grch37_anon-swegen_str_nsphs_-1000samples-.vcf.gz ?

##INFO=<ID=SWEGENAF,Number=A,Type=Float,Description="Allele Frequency, for each ALT allele, in the same order as listed (from grch37_anon-swegen_str_nsphs_-1000samples-.vcf.gz)">

Comment on lines +103 to +107
with (path(workflow.out.vcf.get(0).get(1)).vcf.variants) {
for (int i = 0; i < size(); i++) {
assert snapshot(get(i).getAttribute('MivmirScore')).match('MIVMIR_GICAM-' + get(i).getChr() + '-' + get(i).getStart() + '-MivmirScore')
assert snapshot(get(i).getAttribute('MivmirExplanation')).match('MIVMIR_GICAM-' + get(i).getChr() + '-' + get(i).getStart() + '-MivmirExplanation')
assert snapshot(get(i).getAttribute('GicamScore')).match('MIVMIR_GICAM-' + get(i).getChr() + '-' + get(i).getStart() + '-GicamScore')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sure! I think it would be okay to snapshot the first few lines also to see that it contains the correct info keys.

For loops are being removed though, is it possible to use each?
https://docs.seqera.io/nextflow/strict-syntax#for-and-while-loops

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'll leave it to @ramprasadn to explain how to snapshot ch_publish, since I'm not sure what the best way is.

Comment thread subworkflows/local/rank_variants/tests/nextflow.config Outdated
Comment thread subworkflows/local/rank_variants/tests/nextflow.config Outdated
Comment thread subworkflows/local/rank_variants/main.nf Outdated
Comment thread subworkflows/local/rank_variants/main.nf Outdated
Comment thread subworkflows/local/rank_variants/main.nf Outdated
Comment thread main.nf
Comment thread README.md
@torbjorgen torbjorgen force-pushed the variant-scoring-by-mivmir-gicam branch from 81ea672 to 92eb9e0 Compare May 6, 2026 09:25
@torbjorgen

Copy link
Copy Markdown
Author

Rebased on latest dev

@torbjorgen torbjorgen force-pushed the variant-scoring-by-mivmir-gicam branch 2 times, most recently from 9e1d573 to e2786a6 Compare May 7, 2026 14:37
@torbjorgen

Copy link
Copy Markdown
Author

@torbjorgen

Copy link
Copy Markdown
Author

Tests failing now is related to:

  • saltshaker snapshots
  • Sentieon license file missing
  • Outdated utils_nfschema_plugin

@torbjorgen torbjorgen force-pushed the variant-scoring-by-mivmir-gicam branch 3 times, most recently from be6047f to ab95221 Compare May 11, 2026 07:30
@torbjorgen

Copy link
Copy Markdown
Author
  • Refactored to use bcftools --write-index
  • Namechange process bcftools
  • Rebased on latest dev

Comment thread modules/local/mivmir/meta.yml Outdated
@torbjorgen torbjorgen force-pushed the variant-scoring-by-mivmir-gicam branch from 8f4b477 to 9916853 Compare May 20, 2026 14:39
@torbjorgen

Copy link
Copy Markdown
Author
  • Improved docs by moving information to /docs instead of per module
  • Documented option to run model on subset annotations
  • Fixed BCFTOOLS_APPEND nameclash as genmod scored input file was named identically as bcftools output file, causing exception in bcftools command

Comment thread modules/local/mivmir/main.nf Outdated
"""
}

process MIVMIR_INTERNAL_UNIT_TEST {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Move this inside main process and have env as enabler flag.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

GITHUB_ACTIONS

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Prefer set env MIVMIR_INTERNAL_TEST in main test config.

@torbjorgen torbjorgen force-pushed the variant-scoring-by-mivmir-gicam branch from 9916853 to cdc427e Compare May 27, 2026 09:42
Signed-off-by: Tor Björgen <tor.bjorgen@scilifelab.se>
@torbjorgen torbjorgen force-pushed the variant-scoring-by-mivmir-gicam branch from cdc427e to 7fa6051 Compare May 27, 2026 09:44
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.

Add MIVMIR, GICAM models for SNV ranking

3 participants