Skip to content

feat: civicpy/annotate module#11079

Draft
emmcauley wants to merge 3 commits intonf-core:masterfrom
fulcrumgenomics:em_civipy_annotate
Draft

feat: civicpy/annotate module#11079
emmcauley wants to merge 3 commits intonf-core:masterfrom
fulcrumgenomics:em_civipy_annotate

Conversation

@emmcauley
Copy link
Copy Markdown
Contributor

@emmcauley emmcauley commented Mar 27, 2026

PR checklist

Closes #11076.

This module adds CIVICpy, an analysis toolkit and SDK for extracting and analyzing knowledge from the CIViC knowledgebase. Tests are added.

⚠️ This PR is waiting on a new release of civicpy to fix the backports dependency.

Traceback (most recent call last):
  File "/usr/local/bin/civicpy", line 6, in <module>
    from civicpy.cli import cli
  File "/usr/local/lib/python3.12/site-packages/civicpy/cli.py", line 4, in <module>
    from civicpy import LOCAL_CACHE_PATH, civic
  File "/usr/local/lib/python3.12/site-packages/civicpy/civic.py", line 13, in <module>
    from backports.datetime_fromisoformat import MonkeyPatch
ModuleNotFoundError: No module named 'backports.datetime_fromisoformat'

Trying to add backports into the wave container build fails even if they're both from pip.

Also logged an issue on the civicpy repo here.

  • 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 module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Broadcast software version numbers to topic: versions - See version_topics
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

@emmcauley emmcauley marked this pull request as ready for review March 27, 2026 18:46
@emmcauley emmcauley force-pushed the em_civipy_annotate branch 2 times, most recently from 932b1eb to ef3d2d1 Compare March 27, 2026 19:12
@emmcauley emmcauley force-pushed the em_civipy_annotate branch from ef3d2d1 to 249aa89 Compare March 27, 2026 22:26
Comment on lines +7 to +8
? 'https://depot.galaxyproject.org/singularity/civicpy:5.2.0--pyhdfd78af_0'
: 'docker.io/griffithlab/civicpy:v5.2.0' }"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

these are non-standard because I ran into issues building the wave container for docker + singularity

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.

We have a quay.io repository for custom docker containers. It is a recommendation to upload them there so that we stay independent of third parties that might delete the images. See the docs for more info. You can request the upload via #request-core in the nf-core slack. I think its fine to store it there until they resolve the issue on their side :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've requested this in Slack; feel free to add more context if it's lacking! The tests won't pass until we get the custom Docker container but in the meantime, I think I've addressed your other feedback. thanks for the review!

@emmcauley emmcauley marked this pull request as draft April 7, 2026 13:56
@emmcauley emmcauley added the new module Adding a new module label Apr 10, 2026
Copy link
Copy Markdown
Contributor

@famosab famosab left a comment

Choose a reason for hiding this comment

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

Nice! I am also interested in having civic added to nf-core so I already added some feedback to help with the module development :)

Comment thread modules/nf-core/civicpy/annotate/tests/main.nf.test Outdated
Comment thread modules/nf-core/civicpy/annotate/tests/nextflow.config Outdated
Comment on lines +7 to +8
? 'https://depot.galaxyproject.org/singularity/civicpy:5.2.0--pyhdfd78af_0'
: 'docker.io/griffithlab/civicpy:v5.2.0' }"
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.

We have a quay.io repository for custom docker containers. It is a recommendation to upload them there so that we stay independent of third parties that might delete the images. See the docs for more info. You can request the upload via #request-core in the nf-core slack. I think its fine to store it there until they resolve the issue on their side :)

Comment thread modules/nf-core/civicpy/annotate/main.nf Outdated
Comment thread modules/nf-core/civicpy/annotate/main.nf Outdated
Comment thread modules/nf-core/civicpy/annotate/main.nf Outdated
Comment thread modules/nf-core/civicpy/annotate/main.nf
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "civicpy_annotate"

description: A python client and analysis toolkit for the Clinical Interpretations of Variants in Cancer (CIViC) knowledgebase
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.

Can you be more specific for annotate here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

revised


civicpy annotate-vcf \\
--input-vcf ${vcf} \\
--output-vcf ${prefix}.vcf \\
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.

We usually want the vcf files to be bgzipped if possible

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've added htslib + bgzip

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.

Conda probably has the same issue as the biocontainer / wave container?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yep! Hopefully should be fixed in the next release.

@emmcauley emmcauley force-pushed the em_civipy_annotate branch from a155533 to e4d82ef Compare April 14, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new module Adding a new module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new module: civicpy/anotate

2 participants