Skip to content

Feature/variant calling#60

Merged
Jorisvansteenbrugge merged 20 commits into
developfrom
feature/variant_calling
Jun 9, 2026
Merged

Feature/variant calling#60
Jorisvansteenbrugge merged 20 commits into
developfrom
feature/variant_calling

Conversation

@Jorisvansteenbrugge

@Jorisvansteenbrugge Jorisvansteenbrugge commented May 26, 2026

Copy link
Copy Markdown
Contributor

Add RNA-seq variant calling subworkflow

This PR adds a new subworkflow for variant calling on RNA-seq data, following GATK best practices for RNA-seq short variant discovery.

What's included

  • New subworkflow BAM_VARIANT_CALLING that takes a deduplicated BAM and produces a filtered VCF
  • Pipeline steps:
    • SplitNCigarReads — splits reads spanning splice junctions
    • HaplotypeCaller — variant calling with --dont-use-soft-clipped-bases
    • MergeVcfs — gathers scattered VCFs per sample
    • VariantFiltration — applies GATK-recommended RNA-seq filters (FS, QD, SnpCluster)
  • Scatter-gather parallelization: exon intervals are split into N chunks (configurable via --gatk_interval_scatter_count, default 25) so SplitNCigarReads and HaplotypeCaller run in parallel, drastically reducing wall time
  • nf-test coverage including a full run test and stub test for CI
  • Bugfixes:
    • The publishDir directive for STAR_ALIGN now correctly excludes bam and fastq files.

Notes for reviewers

  • BQSR is intentionally omitted for this initial version. The plan is to first validate the pipeline output without recalibration, and add BaseRecalibrator + ApplyBQSR in a follow-up PR once we've assessed whether it meaningfully improves results for our data
  • Variant calling is restricted to exon regions derived from the input GTF (via GTF2BEDBedToIntervalList)
  • Default filter thresholds follow GATK RNA-seq recommendations and are exposed as params for customization

Testing

nf-test test subworkflows/local/bam_variant_calling/

@ellendejong ellendejong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice to see this extension to the pipeline. 👍🏼

Comment thread conf/hpc.config Outdated
Comment thread subworkflows/local/bam_variant_calling/main.nf Outdated
Comment thread subworkflows/local/bam_variant_calling/main.nf Outdated
Comment thread subworkflows/local/bam_variant_calling/main.nf Outdated
Comment thread subworkflows/local/bam_variant_calling/main.nf Outdated
Comment thread subworkflows/local/bam_variant_calling/main.nf Outdated
Comment thread subworkflows/local/bam_variant_calling/main.nf Outdated
Comment thread conf/modules.config
Comment thread conf/modules.config
Comment thread nextflow.config

@ellendejong ellendejong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

And some feedback regarding GTF2BED.

Comment thread modules/local/gtf2bed/main.nf Outdated
@Jorisvansteenbrugge Jorisvansteenbrugge merged commit 9b3c9e8 into develop Jun 9, 2026
1 check passed
@Jorisvansteenbrugge Jorisvansteenbrugge deleted the feature/variant_calling branch June 9, 2026 11:46
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