Skip to content

Add rtgtools/cnveval module for CNV evaluation#10795

Open
SevaNur wants to merge 3 commits intonf-core:masterfrom
SevaNur:rtgtools-cnveval
Open

Add rtgtools/cnveval module for CNV evaluation#10795
SevaNur wants to merge 3 commits intonf-core:masterfrom
SevaNur:rtgtools-cnveval

Conversation

@SevaNur
Copy link
Contributor

@SevaNur SevaNur commented Mar 12, 2026

PR checklist

Closes #266

  • 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
  • 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

Description

Add new module rtgtools/cnveval for evaluating called CNV regions against a baseline CNV set.

rtg cnveval intersects evaluation regions (BED) with truth and calls VCFs to obtain TP/FP/FN metrics for copy number variants. Input VCFrecords must contain INFO/END and INFO/SVTYPE with values DUP or DEL.

Outputs:

  • baseline.bed.gz — truth CNV regions with TP/FN status
  • calls.bed.gz — called CNV regions with TP/FP status
  • weighted_roc.tsv.gz — ROC data for rocplot
  • summary.txt — summary statistics

Uses existing test data from nf-core/test-datasets (simulated_sv.vcf.gz, simulated_sv2.vcf.gz).

@SevaNur SevaNur linked an issue Mar 12, 2026 that may be closed by this pull request
@SevaNur SevaNur self-assigned this Mar 12, 2026
@SevaNur SevaNur added enhancement New feature or request hackathon2026 labels Mar 12, 2026
Copy link
Member

@georgiakes georgiakes left a comment

Choose a reason for hiding this comment

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

Nice job! Looks good to me :)

Comment on lines +14 to +17
tuple val(meta), path("*.baseline.bed.gz") , emit: baseline_bed
tuple val(meta), path("*.calls.bed.gz") , emit: calls_bed
tuple val(meta), path("*.weighted_roc.tsv.gz") , emit: weighted_roc
tuple val(meta), path("*.summary.txt") , emit: summary
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
tuple val(meta), path("*.baseline.bed.gz") , emit: baseline_bed
tuple val(meta), path("*.calls.bed.gz") , emit: calls_bed
tuple val(meta), path("*.weighted_roc.tsv.gz") , emit: weighted_roc
tuple val(meta), path("*.summary.txt") , emit: summary
tuple val(meta), path("*.baseline.bed.gz") , emit: baseline_bed
tuple val(meta), path("*.calls.bed.gz") , emit: calls_bed
tuple val(meta), path("*.weighted_roc.tsv.gz"), emit: weighted_roc
tuple val(meta), path("*.summary.txt") , emit: summary

Comment on lines +37 to +40
cd ${prefix}/
mv done progress ..
for f in * ; do mv "\$f" "../${prefix}.\$f" ; done
cd ..
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know what the mv done progress .. part is doing here.
But you should be able to move without the two cd's

for f in * ; do mv "\$f" "../${prefix}.\$f" ; done
cd ..
"""

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request hackathon2026

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add rtgtools/cnveval

4 participants