Skip to content

feat(chaintools): add coverage module (nextflow + wdl) - #32

Merged
alejandrogzi merged 1 commit into
masterfrom
feat/chaintools-coverage
Sep 1, 2026
Merged

feat(chaintools): add coverage module (nextflow + wdl)#32
alejandrogzi merged 1 commit into
masterfrom
feat/chaintools-coverage

Conversation

@alejandrogzi

Copy link
Copy Markdown
Member

Wraps chaintools coverage CLI:

chaintools coverage -h

Measure annotation feature coverage by aligned chain blocks

Usage: chaintools coverage [OPTIONS] --side <SIDE> --intervals <PATH> --feature <FEATURE>

Options:
  -c, --chains <PATH>...   Input chain files. If not provided, chain data is read from standard input.
  -f, --file <PATH>        Path to a file listing one input chain path per line
      --side <SIDE>        Chain side to measure in forward genomic coordinates [possible values: reference, query]
      --intervals <PATH>   BED, GTF, or GFF annotation whose feature bases define the denominator
      --feature <FEATURE>  Annotation feature to measure [possible values: cds, exon, intron, utr]

Nextflow modules/nextflow/chaintools/coverage/main.nf:

  • process CHAINTOOLS_COVERAGE (tag $meta.id, label process_low, container ghcr.io/alejandrogzi/chaintools:latest)
  • inputs: tuple val(meta), path(chains) (single or List), path intervals, val side, val feature
  • cmd: chaintools coverage --chains $chains --side $side --intervals $intervals --feature $feature --threads ${task.cpus} > ${prefix}.coverage.txt
  • outputs: tuple val(meta), path("*.coverage.txt"), versions.yml
  • follows stats/compare pattern (--threads, redirection, stub)

WDL modules/wdl/chaintools/coverage/main.wdl:

  • task coverage with Array[File] chains, File intervals, String side, String feature, Int threads, extra_args, prefix
  • cmd: chaintools coverage --chains ~{sep=" " chains} --side ~{side} --intervals ~{intervals} --feature ~{feature} --threads ~{threads} > ~{out_report}
  • workflow run wrapper

No new dependency. Reuses existing container.

Fix from #31 already in master, this branch builds on top.

Wraps `chaintools coverage --side <reference|query> --intervals <BED|GTF|GFF> --feature <cds|exon|intron|utr> --chains <chain...>` which measures annotation feature bases covered by chain blocks in forward genomic coordinates.

Nextflow: process CHAINTOOLS_COVERAGE with inputs tuple val(meta), path(chains) + path intervals + val side + val feature, output *.coverage.txt (per-chrom + total). Follows existing chaintools modules (stats/compare) pattern with --threads and > prefix redirection.

WDL: task coverage with Array[File] chains, File intervals, String side/feature, threads/extra_args/prefix, same CLI.

No new dependency, uses ghcr.io/alejandrogzi/chaintools:latest.
@alejandrogzi
alejandrogzi merged commit 99f50b4 into master Sep 1, 2026
2 checks passed
@alejandrogzi
alejandrogzi deleted the feat/chaintools-coverage branch September 1, 2026 21:55
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.

1 participant