Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ template:
name: rnadnavar
org: nf-core
outdir: .
version: "1.0"
version: "1.0.0"
133 changes: 34 additions & 99 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,27 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.0dev - [2026-06-23]
## 1.0.0 - [2026-06-23]

Initial release of nf-core/rnadnavar.

### `Added`

- RNA and DNA integrated analysis pipeline for somatic mutation detection
- Support for multiple variant callers (Mutect2, Strelka2, SAGE)
- Comprehensive preprocessing with GATK4 best practices
- VEP annotation and filtering capabilities
- Consensus variant calling approach
- RNA-specific filtering and realignment steps
- MultiQC reporting and quality control
- Support for both BWA-MEM and STAR alignment
- Added support for optional Mutect2 force-calling inputs (`mutect2_alleles` and `mutect2_alleles_tbi`)
- Added `conf/empty.config` to support strict-syntax-safe config loading
- Added full pipeline nf-test (`test_full.nf.test`) and test snapshots
- Added VCF simple test data for annotation testing
- Added GitHub Actions for automated testing with nf-test
- Added support for multiple template versions (3.2.0, 3.2.1, 3.3.1)
- Restored rnadnavar logo in pipeline output with color support

### `Fixed`

Expand All @@ -23,6 +38,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed non-deterministic nf-test outputs and updated snapshots accordingly
- Fixed `includeConfig` handling in `nextflow.config` for newer Nextflow strict syntax
- Fixed VEP cache initialisation and updated unzip-dependent wiring
- Fixed help text and documentation URLs
- Fixed pipeline-specific parameter descriptions in schema
- Fixed workflow path references and documentation links
- Fixed consensus module caller value to avoid warnings
- Fixed VEP cache handling and empty RNA edits processing
- Fixed issue with run_consensus.R plotting
- **Major Fix**: Resolved ConcurrentModificationException error from Java processes
- Fixed local module implementations and configurations
- Fixed subworkflow naming and structure issues
- Fixed SAGE variant caller integration and configuration
- Fixed nf-core subworkflow integrations

### `Changed`

Expand All @@ -33,111 +59,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated local GATK and Picard integrations, including restored patches for `picard/filtersamreads` and `gatk4/splitncigarreads`
- Replaced deprecated tabix usage with current htslib-based handling where appropriate
- Updated nf-test plugin configuration and test snapshots

### `Removed`

- Removed obsolete tabix modules and deprecated module usage paths
- Removed leftover config and workflow parameters no longer used after the template/module refresh (for example `hook_url`)

---

## v1.0dev - [2025-08-12]

### `Added`

- Added full pipeline nf-test (`test_full.nf.test`)
- Added test snapshots
- Restored rnadnavar logo in pipeline output with color support

### `Fixed`

- Fixed help text and documentation URLs
- Fixed pipeline-specific parameter descriptions in schema
- Fixed workflow path references and documentation links
- Fixed consensus module caller value to avoid warnings
- Fixed VEP cache handling and empty RNA edits processing
- Fixed issue with run_consensus.R plotting

### `Changed`

- Cleaned up code formatting and style across configuration files
- Updated test configurations and `.nftignore` files
- Improved subworkflow organization and consistency (typos, remove unused code blocks, spacing, comments, readability)
- Improved subworkflow organization and consistency
- Massive speed up to run_consensus.R
- Migrated consensus module from custom Docker container to Seqera Wave containers
- Updated all nf-core modules to latest versions
- Updated template to nf-core/tools version 3.3.1
- Updated GitHub workflows and CI/CD configurations
- Updated Nextflow minimum version requirement from >=23.04.0 to >=24.04.2

### `Removed`

- Removed obsolete tabix modules and deprecated module usage paths
- Removed leftover config and workflow parameters no longer used after the template/module refresh (for example `hook_url`)
- Cleaned up unused VCFlib and VT variant processing modules
- Removed obsolete module configurations and test files

---

## v1.0dev - [2025-08-01]

### `Added`

- Added VCF simple test data for annotation testing
- Added comprehensive nf-test framework integration
- Added GitHub Actions for automated testing with nf-test
- Added support for multiple template versions (3.2.0, 3.2.1, 3.3.1)

### `Fixed`

- **Major Fix**: Resolved ConcurrentModificationException error from Java processes
- Fixed local module implementations and configurations
- Fixed subworkflow naming and structure issues
- Fixed indentation and formatting issues across multiple files
- Fixed redundancies in workflow logic
- Fixed SAGE variant caller integration and configuration
- Fixed local utilities and helper functions
- Fixed nf-core subworkflow integrations

### `Changed`

- **Massive Module Update**: Updated all nf-core modules to latest versions including:
- bcftools/sort and bcftools/stats
- BWA, BWA-MEM2, and DRAGMAP aligners
- GATK4 modules (applybqsr, baserecalibrator)
- FastQC, FastP, and other QC tools
- VEP annotation modules
- All associated test files and metadata
- Updated VEP cache version parameter from string '110' to integer 110
- Cleaned up main workflow structure and organization
- Cleaned up local subworkflows and removed redundant code
- Cleaned up configuration files and parameter definitions
- Updated template to nf-core/tools version 3.3.1
- Reorganized and cleaned up local modules
- Updated GitHub workflows and CI/CD configurations
- Added new configuration parameters: `help_full`, `show_hidden`, `trace_report_suffix`, `modules_testdata_base_path`
- Improved parameter organization and formatting in nextflow.config

### `Dependencies`

- Updated all nf-core modules to their latest stable versions
- Updated container images and Conda environments for all processes
- **Updated Nextflow minimum version requirement from >=23.04.0 to >=24.04.2**
- Updated nf-core template to version 3.3.1

### `Deprecated`

- Removed redundant workflow components
- Cleaned up deprecated configuration parameters
- Removed obsolete test configurations

---

## Initial Release

Initial release of nf-core/rnadnavar, created with the [nf-core](https://nf-co.re/) template.

### `Added`

- RNA and DNA integrated analysis pipeline for somatic mutation detection
- Support for multiple variant callers (Mutect2, Strelka2, SAGE)
- Comprehensive preprocessing with GATK4 best practices
- VEP annotation and filtering capabilities
- Consensus variant calling approach
- RNA-specific filtering and realignment steps
- MultiQC reporting and quality control
- Support for both BWA-MEM and STAR alignment
6 changes: 2 additions & 4 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ custom_logo_url: https://github.com/nf-core/rnadnavar/
custom_logo_title: "nf-core/rnadnavar"

report_comment: >
This report has been generated by the <a href="https://github.com/nf-core/rnadnavar/releases/tag/1.0" target="_blank">nf-core/rnadnavar</a>
analysis pipeline. For information about how to interpret these results, please see the
<a href="https://nf-co.re/rnadnavar/1.0/docs/output" target="_blank">documentation</a>.
This report has been generated by the <a href="https://github.com/nf-core/rnadnavar/releases/tag/1.0.0" target="_blank">nf-core/rnadnavar</a> analysis pipeline. For information about how to interpret these results, please see the <a href="https://nf-co.re/rnadnavar/1.0.0/docs/output" target="_blank">documentation</a>.
report_section_order:
"nf-core-rnadnavar-methods-description":
order: -1000
Expand Down Expand Up @@ -59,7 +57,7 @@ extra_fn_clean_exts:
pattern: "^.*.(md|recal).mosdepth.(global|region).dist"
module: mosdepth

sample_names_replace_regex: True
sample_names_replace_regex: true
sample_names_replace:
"\\.[0-9]{4}$": ".md" # should match ".0001" but only at the end of strings for module Markduplicates/EstimateLibraryComplexity
module: picard
Expand Down
36 changes: 18 additions & 18 deletions bin/filter_rna_mutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ def argparser():
parser = argparse.ArgumentParser(description="")
parser.add_argument("--maf", help="Input MAF file")
parser.add_argument("--maf_realign", help="Input MAF file after a second pass")
parser.add_argument("--pon2", help="Path to optional second binary pon")
parser.add_argument("--pon", help="Path to binary pon")
parser.add_argument("--secondary-pon", dest="secondary_pon", help="Path to optional secondary RNA PoN binary generated for RNA-specific filtering (see DOI: 10.1016/j.cels.2018.03.002)")
parser.add_argument("--reference-pon", dest="reference_pon", help="Path to primary RNA PoN binary generated for RNA-specific filtering (see DOI: 10.1016/j.cels.2018.03.002)")
parser.add_argument("--whitelist", help="BED file with variants to keep (CHROM POS REF ALT)")
parser.add_argument("--output", help="output file name")
parser.add_argument("--out_suffix", help="Suffix for intermediate output", default="withRNAfilters")
parser.add_argument("--ref", help="FASTA - e.g. HG38")
parser.add_argument("--refname", help="e.g. hg38", default="hg38")
parser.add_argument("--ref2", help="FASTA - e.g. hg19 (hs37d5)")
parser.add_argument("--refname2", help="e.g. HG19", default="hg19")
parser.add_argument("--reference-fasta", dest="reference_fasta", help="Primary reference FASTA - e.g. hg38")
parser.add_argument("--reference-name", dest="reference_name", help="Primary reference name - e.g. hg38", default="hg38")
parser.add_argument("--secondary-reference-fasta", dest="secondary_reference_fasta", help="Secondary reference FASTA - e.g. hg19 (hs37d5)")
parser.add_argument("--secondary-reference-name", dest="secondary_reference_name", help="Secondary reference name - e.g. hg19", default="hg19")
parser.add_argument("--rnaedits", help="BED file(s) with known RNA editing events separated by space", nargs="+", default=[])
parser.add_argument("--thr", default=-2.8)
parser.add_argument("--chain", help="Chain file")
Expand Down Expand Up @@ -115,16 +115,16 @@ def extract_coords(df):
return coords


def run_capy(M, pon, ref, thr, chroms, suffix="_hg38", refname2="hg19"):
def run_capy(M, pon, reference_fasta, thr, chroms, suffix="_hg38", secondary_reference_name="hg19"):
"""
Runs CApy with RNA PoN generated with tokenizer (https://github.com/getzlab/aggregate_tokens_files_TOOL)
"""
print("- Running CApy" + suffix)
chrom = "Chromosome"
start = "Start_Position"
if refname2:
chrom += "_" + refname2
start += "_" + refname2
if secondary_reference_name:
chrom += "_" + secondary_reference_name
start += "_" + secondary_reference_name
# Remove alt contigs
M = M[M[chrom].isin(chroms)]
# Perform string replacements and type casting
Expand All @@ -138,7 +138,7 @@ def run_capy(M, pon, ref, thr, chroms, suffix="_hg38", refname2="hg19"):
M = M.astype({"chr": "int32", "pos": "int32"})
M.reset_index(inplace=True, drop=True)
# Get PoN scores
pon_scores = mut.filter_mutations_against_token_PoN(M=M, ponfile=pon, ref=ref)
pon_scores = mut.filter_mutations_against_token_PoN(M=M, ponfile=pon, ref=reference_fasta)
assert len(pon_scores) == M.shape[0], "PoN scores are not same length as nrow"
# Create a DataFrame with the necessary columns including PoN scores and threshold
pon_scores_df = pd.DataFrame({
Expand Down Expand Up @@ -239,14 +239,14 @@ def main():
if calls.empty:
results[idx] = calls
continue
if "Chromosome"+args.refname2 in calls.columns:
calls.drop(["Chromosome"+args.refname2, "Start_Position"+args.refname2], axis=1, inplace=True)
if "Chromosome"+args.secondary_reference_name in calls.columns:
calls.drop(["Chromosome"+args.secondary_reference_name, "Start_Position"+args.secondary_reference_name], axis=1, inplace=True)
# RNA panel of normals
if args.pon2 is not None and args.chain is not None and args.ref2 is not None:
calls = add_coords2_with_liftover(calls, chain_file=args.chain,ref1=args.refname,ref2=args.refname2)
calls = run_capy(M=calls, pon=args.pon2, ref=args.ref2, thr=args.thr, suffix='_'+args.refname2, chroms=chroms, refname2=args.refname2)
if args.pon:
calls = run_capy(M=calls, pon=args.pon, ref=args.ref, thr=args.thr, suffix='_'+args.refname, chroms=chroms, refname2=False)
if args.secondary_pon is not None and args.chain is not None and args.secondary_reference_fasta is not None:
calls = add_coords2_with_liftover(calls, chain_file=args.chain,ref1=args.reference_name,ref2=args.secondary_reference_name)
calls = run_capy(M=calls, pon=args.secondary_pon, reference_fasta=args.secondary_reference_fasta, thr=args.thr, suffix='_'+args.secondary_reference_name, chroms=chroms, secondary_reference_name=args.secondary_reference_name)
if args.reference_pon:
calls = run_capy(M=calls, pon=args.reference_pon, reference_fasta=args.reference_fasta, thr=args.thr, suffix='_'+args.reference_name, chroms=chroms, secondary_reference_name=False)
# Annotate known RNA editing
if args.rnaedits:
rnadbs = check_rnaediting(args.rnaedits)
Expand Down
2 changes: 1 addition & 1 deletion conf/modules/alignment/bam_align.config
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ process { // bam_align
// HISAT2 for realignment
withName: '.*:FASTQ_ALIGN_HISAT2:HISAT2_ALIGN' {
ext.prefix = {"${meta.sample}"}
ext.args = {meta.status < 2 ? "--met-stderr --new-summary --no-spliced-alignment" : "--met-stderr --new-summary " }
ext.args = {meta.status < 2 ? "--temp-directory \${PWD} --met-stderr --new-summary --no-spliced-alignment" : "--temp-directory \${PWD} --met-stderr --new-summary " }
publishDir = [
[
path: { "${params.outdir}/report/hisat2/${meta.patient}/${meta.id}" },
Expand Down
7 changes: 7 additions & 0 deletions conf/modules/consensus/vcf_consensus.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@

process { // consensus

withName: "GUNZIP_VCF2MAF" {
// No need to publish decompress VCF, this is just an intermediary step
publishDir = [
enabled: false
]
}

withName: "VCF2MAF" {
ext.args = { [
"--inhibit-vep",
Expand Down
14 changes: 7 additions & 7 deletions conf/modules/filtering/maf_filtering.config
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ process { // maf filtering

withName: 'RNA_FILTERING' {
ext.prefix = {"${meta.id}.rna_filt"}
ext.args = { [params.rnaedits? "--rnaedits ${params.rnaedits}" : "",
params.rna_pon? "--pon ${params.rna_pon}" : "",
params.chain? "--chain ${params.chain}" : "",
params.fasta2? "--ref2 ${params.fasta2}" : "",
params.rna_pon2? "--pon2 ${params.rna_pon2}" : "",
params.refname2? "--refname2 ${params.refname2}" : "",
params.refname? "--refname ${params.refname}" : ""
ext.args = { [params.rnaedits? "--rnaedits ${params.rnaedits}" : "",
params.reference_pon? "--reference-pon ${params.reference_pon}" : "",
params.chain? "--chain ${params.chain}" : "",
params.secondary_reference_fasta? "--secondary-reference-fasta ${params.secondary_reference_fasta}" : "",
params.secondary_pon? "--secondary-pon ${params.secondary_pon}" : "",
params.secondary_reference_name? "--secondary-reference-name ${params.secondary_reference_name}" : "",
params.reference_name? "--reference-name ${params.reference_name}" : ""
].join(' ').trim() }

publishDir = [
Expand Down
6 changes: 3 additions & 3 deletions conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ params {
germline_resource = "https://raw.githubusercontent.com/nf-core/test-datasets/rnadnavar/reference/chr7_hg38/af-only-gnomad.hg38.chr7.mini2.vcf.gz"
no_intervals = true
gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/rnadnavar/reference/chr7_hg38/gencode.v36.annotation.chr7.mini.gtf'
sage_highconfidence = 'https://github.com/nf-core/test-datasets/raw/rnadnavar/resources/hmftools/variants/HighConfidence.38.bed.gz'
sage_actionablepanel = 'https://github.com/nf-core/test-datasets/raw/rnadnavar/resources/hmftools/variants/ActionableCodingPanel.38.bed.gz'
sage_knownhotspots = 'https://github.com/nf-core/test-datasets/raw/rnadnavar/resources/hmftools/variants/KnownHotspots.somatic.38.vcf.gz'
sage_high_confidence = 'https://github.com/nf-core/test-datasets/raw/rnadnavar/resources/hmftools/variants/HighConfidence.38.bed.gz'
sage_actionable_panel = 'https://github.com/nf-core/test-datasets/raw/rnadnavar/resources/hmftools/variants/ActionableCodingPanel.38.bed.gz'
sage_known_hotspots = 'https://github.com/nf-core/test-datasets/raw/rnadnavar/resources/hmftools/variants/KnownHotspots.somatic.38.vcf.gz'
sage_ensembl_dir = 'https://github.com/nf-core/test-datasets/raw/rnadnavar/resources/hmftools/common/sage_ensembl.zip'
vep_cache = 'https://github.com/nf-core/test-datasets/raw/rnadnavar/resources/vep/vep_hs.zip'
vep_cache_version = 999
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@
"git_sha": "1c43a7e22f04cf19c9f9d3de7e7e5a3addd9382a",
"installed_by": ["modules"]
},
"vcf2maf": {
"branch": "master",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
"installed_by": ["modules"]
},
"vcftools": {
"branch": "master",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
Expand Down
2 changes: 1 addition & 1 deletion modules/local/consensus/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process RUN_CONSENSUS {

conda "${moduleDir}/environment.yml"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/ed/ed5e97c2fc53fb46675998f4f5472807f217043994cd4f490b0eb8887c31ceed/data'
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/00/0003a3962c416b4c458909d28e343758adf347e614507137b70ac5e4a3c094bb/data'
: 'community.wave.seqera.io/library/bioconductor-complexheatmap_bioconductor-rtracklayer_r-data.table_r-dplyr_pruned:b2d4632cc9bf5c6e'}"

input:
Expand Down
2 changes: 1 addition & 1 deletion modules/local/maf_rna_filtering/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ process RNA_FILTERING {
"""
filter_rna_mutations.py \\
--maf $maf \\
--ref $fasta \\
--reference-fasta $fasta \\
--output ${prefix}.maf \\
$maf_realign_opt \\
$args
Expand Down
Loading
Loading