Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b3bbb79
handle no fusion cases
rannick Jul 15, 2025
034876f
update fusioninspector
rannick Jul 16, 2025
94eacdb
update logical gate and snap fusioninsp
rannick Jul 16, 2025
5a0ee3a
update tests
rannick Jul 16, 2025
8388616
Merge branch 'dev' into no_fusions
rannick Jul 16, 2025
44b7823
Merge branch 'dev' into no_fusions
rannick Jul 17, 2025
ae357ec
update arriba refs params
rannick Jul 17, 2025
de2541e
update changelog
rannick Jul 17, 2025
43a8ebd
update schema
rannick Jul 17, 2025
ebb0183
Merge branch 'dev' into no_fusions
rannick Jul 17, 2025
f9fa7c2
Merge branch 'dev' into no_fusions
rannick Jul 25, 2025
2196478
change logic
rannick Jul 28, 2025
be81566
Merge branch 'no_fusions' of https://github.com/nf-core/rnafusion int…
rannick Jul 28, 2025
a3843ee
udpate logic
rannick Jul 28, 2025
52f37b1
Merge branch 'dev' into no_fusions
rannick Jul 29, 2025
4a25a22
Merge branch 'dev' into no_fusions
rannick Aug 7, 2025
71fc45f
fix issues and add characters to fusioninspectore stub run so the dow…
rannick Aug 8, 2025
ed7d88d
update snape
rannick Aug 8, 2025
8205a98
intermetiate snap update
rannick Aug 25, 2025
d6e80c9
dev merge
rannick Aug 25, 2025
766b0f8
update snap
rannick Aug 25, 2025
cf5802e
update snap
rannick Aug 26, 2025
605cbc7
update qc workflow test and snap
rannick Aug 28, 2025
21e21b1
fix merge conflicts and use branching instead of if statements
rannick Sep 1, 2025
a347208
reshuffling
rannick Sep 1, 2025
59fcd54
Update subworkflows/local/fusioninspector_workflow/main.nf
rannick Sep 2, 2025
08c7dec
Update subworkflows/local/fusioninspector_workflow/main.nf
rannick Sep 2, 2025
36221f8
update
rannick Sep 2, 2025
d2a4764
remove zombie line
rannick Sep 2, 2025
e765480
update snap
rannick Sep 2, 2025
9dddc25
udpate snap bam
rannick Sep 2, 2025
e7c12b0
change operator
rannick Sep 3, 2025
aa2b30c
Merge branch 'dev' into no_fusions
rannick Sep 3, 2025
9931490
update snaps
rannick Sep 3, 2025
d8dd843
Merge branch 'dev' into no_fusions
rannick Sep 8, 2025
73113eb
fix fusioninspector workflow
rannick Sep 9, 2025
1141d24
Merge branch 'no_fusions' of https://github.com/nf-core/rnafusion int…
rannick Sep 9, 2025
bd3fddc
update build snap
rannick Sep 9, 2025
82608dd
qc test fixes
rannick Sep 9, 2025
2c710b6
Merge branch 'dev' into no_fusions
rannick Sep 9, 2025
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix missing memory unit for fusioncatcher [#674](https://github.com/nf-core/rnafusion/pull/674)
- Fix fusioncatcher download link [#693](https://github.com/nf-core/rnafusion/pull/693)
- Fix fusionreport singularity container [#713](https://github.com/nf-core/rnafusion/pull/713)
- Fix behavior when no fusion is present (log a warning and avoid running depending processes)[#714](https://github.com/nf-core/rnafusion/pull/714)
- Fix CTAT-SPLICING output when no cancer introns were found [#722](https://github.com/nf-core/rnafusion/pull/722)
- Update VCF_COLLECT script to adapt to transcript_version not being an entry in fusioninspector gtf anymore [#726](https://github.com/nf-core/rnafusion/pull/726)
- Fix rRNA detection and make it more customizable with nf-core modules [#736](https://github.com/nf-core/rnafusion/pull/736)
Expand Down
1 change: 0 additions & 1 deletion modules/local/vcf_collect/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ process VCF_COLLECT {

script:
def prefix = task.ext.prefix ?: "${meta.id}"
// TODO use BGZIP to compress the VCF file instead of GZIP
"""
vcf_collect.py --fusioninspector $fusioninspector_tsv --fusionreport $fusionreport_report --fusioninspector_gtf $fusioninspector_gtf_tsv --fusionreport_csv $fusionreport_csv --hgnc $hgnc_ref --sample ${prefix} --out ${prefix}_fusion_data.vcf

Expand Down
24 changes: 18 additions & 6 deletions subworkflows/local/fusioninspector_workflow/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,30 @@ workflow FUSIONINSPECTOR_WORKFLOW {
FUSIONINSPECTOR( ch_reads_fusion, ch_starfusion_ref)
ch_versions = ch_versions.mix(FUSIONINSPECTOR.out.versions)

if(!skip_vcf) {
AGAT_CONVERTSPGFF2TSV(FUSIONINSPECTOR.out.out_gtf)
def tsv_nonempty = FUSIONINSPECTOR.out.tsv.filter { _meta, file -> file.exists() && file.size() > 0 }
def tsv_abridged_nonempty = FUSIONINSPECTOR.out.abridged_tsv.filter { _meta, file -> file.exists() && file.size() > 0 }
def gtf_nonempty = FUSIONINSPECTOR.out.out_gtf.filter { _meta, file -> file.exists() && file.size() > 0 }
if (!tsv_nonempty) {
log.warn("FUSIONINSPECTOR confirmed no fusions, skipping VCF and visualisation steps.")
}
if (
!skip_vcf
) {
AGAT_CONVERTSPGFF2TSV(gtf_nonempty)
ch_versions = ch_versions.mix(AGAT_CONVERTSPGFF2TSV.out.versions)

fusion_data = FUSIONINSPECTOR.out.abridged_tsv.join(AGAT_CONVERTSPGFF2TSV.out.tsv).join(fusionreport_out).join(fusionreport_csv)
fusion_data = tsv_abridged_nonempty
.join(AGAT_CONVERTSPGFF2TSV.out.tsv)
.join(fusionreport_out)
.join(fusionreport_csv)

VCF_COLLECT(fusion_data, ch_hgnc_ref, ch_hgnc_date)
ch_versions = ch_versions.mix(VCF_COLLECT.out.versions)
}

if (!skip_vis) {
ch_bam_sorted_indexed_fusions = bam_sorted_indexed.join(FUSIONINSPECTOR.out.tsv)
if (
!skip_vis
){
ch_bam_sorted_indexed_fusions = bam_sorted_indexed.join(tsv_nonempty)
ARRIBA_VISUALISATION(
ch_bam_sorted_indexed_fusions,
ch_gtf,
Expand Down
35 changes: 16 additions & 19 deletions subworkflows/local/fusioninspector_workflow/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ nextflow_workflow {
when {
params {
no_cosmic = true
whitelist = []
whitelist = ""
outdir = "test"
genomes_base = "test"
fusionreport_download_args = '--no-cosmic'
fusionreport_detect_args = {params.no_cosmic} ? "--no-cosmic" : ""
fusionreport_detect_args = "--no-cosmic"
fusionreport_detect_args2 = "--export csv"
}
workflow {
Expand All @@ -94,31 +94,29 @@ nextflow_workflow {
input[2] = Channel.of([ [id:'test_sample'], file("https://github.com/FusionInspector/FusionInspector/raw/master/test/fusion_targets.A.txt")])
input[3] = FUSIONREPORT_DETECT.out.report
input[4] = FUSIONREPORT_DETECT.out.csv
input[5] = Channel.of([
[id:'test_sample'],
[],
[]
input[5] = Channel.of([[ id:'test', single_end:false ], // meta map
file("https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam", checkIfExists: true),
file("https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam.bai", checkIfExists: true)
])
input[6] = Channel.of(
[ [ id:'test_gtf' ],
file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/modules/data/genomics/homo_sapiens/genome/minigenome.gtf')])
input[7] = Channel.of(file("https://github.com/nf-core/test-datasets/raw/refs/heads/rnafusion/testdata/reference/arriba/protein_domains_hg38_GRCh38_v2.5.0.gff3"))
input[8] = Channel.of(file("https://github.com/nf-core/test-datasets/raw/refs/heads/rnafusion/testdata/reference/arriba/cytobands_hg38_GRCh38_v2.5.0.tsv"))
input[7] = Channel.fromPath("https://github.com/nf-core/test-datasets/raw/refs/heads/rnafusion/testdata/reference/arriba/protein_domains_hg38_GRCh38_v2.5.0.gff3")
input[8] = Channel.fromPath("https://github.com/nf-core/test-datasets/raw/refs/heads/rnafusion/testdata/reference/arriba/cytobands_hg38_GRCh38_v2.5.0.tsv")
input[9] = Channel.of([[ id:'hgnc' ], file("https://github.com/nf-core/test-datasets/raw/refs/heads/rnafusion/testdata/reference/hgnc/hgnc_complete_set.txt")] )
input[10] = Channel.of([[ id:'hgnc_timestamp' ], file("https://github.com/nf-core/test-datasets/raw/refs/heads/rnafusion/testdata/reference/hgnc/HGNC-DB-timestamp.txt")] )
input[11] = STARFUSION_BUILD.out.reference
input[12] = false
input[13] = true
input[14] = 1
input[15] = []
input[15] = null
"""
}
}

then {
assertAll(
{ assert workflow.success },
{ assert snapshot(file(workflow.out.ch_arriba_visualisation[0][1]).length()) },
{ assert snapshot(workflow.out.versions).match() }
)
}
Expand Down Expand Up @@ -183,11 +181,11 @@ nextflow_workflow {
when {
params {
no_cosmic = true
whitelist = []
whitelist = ""
outdir = "test"
genomes_base = "test"
fusionreport_download_args = '--no-cosmic'
fusionreport_detect_args = {params.no_cosmic} ? "--no-cosmic" : ""
fusionreport_detect_args = "--no-cosmic"
fusionreport_detect_args2 = "--export csv"
}
workflow {
Expand All @@ -203,23 +201,22 @@ nextflow_workflow {
input[2] = Channel.of([ [id:'test_sample'], file("https://github.com/FusionInspector/FusionInspector/raw/master/test/fusion_targets.A.txt")])
input[3] = FUSIONREPORT_DETECT.out.report
input[4] = FUSIONREPORT_DETECT.out.csv
input[5] = Channel.of([
[id:'test_sample'],
[],
[]
input[5] = Channel.of([[ id:'test', single_end:false ], // meta map
file("https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam", checkIfExists: true),
file("https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam.bai", checkIfExists: true)
])
input[6] = Channel.of(
[ [ id:'test_gtf' ],
file('https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/modules/data/genomics/homo_sapiens/genome/minigenome.gtf')])
input[7] = Channel.of(file("https://github.com/nf-core/test-datasets/raw/refs/heads/rnafusion/testdata/reference/arriba/protein_domains_hg38_GRCh38_v2.5.0.gff3"))
input[8] = Channel.of(file("https://github.com/nf-core/test-datasets/raw/refs/heads/rnafusion/testdata/reference/arriba/cytobands_hg38_GRCh38_v2.5.0.tsv"))
input[7] = Channel.fromPath("https://github.com/nf-core/test-datasets/raw/refs/heads/rnafusion/testdata/reference/arriba/protein_domains_hg38_GRCh38_v2.5.0.gff3")
input[8] = Channel.fromPath("https://github.com/nf-core/test-datasets/raw/refs/heads/rnafusion/testdata/reference/arriba/cytobands_hg38_GRCh38_v2.5.0.tsv")
input[9] = Channel.of([[ id:'hgnc' ], file("https://github.com/nf-core/test-datasets/raw/refs/heads/rnafusion/testdata/reference/hgnc/hgnc_complete_set.txt")] )
input[10] = Channel.of([[ id:'hgnc_timestamp' ], file("https://github.com/nf-core/test-datasets/raw/refs/heads/rnafusion/testdata/reference/hgnc/HGNC-DB-timestamp.txt")] )
input[11] = STARFUSION_BUILD.out.reference
input[12] = false
input[13] = true
input[14] = 1
input[15] = params.whitelist
input[15] = null
"""
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,35 @@
"content": [
{
"0": [
[
{
"id": "test_sample"
},
"test_sample_combined_fusions_arriba_visualisation.pdf:md5,d41d8cd98f00b204e9800998ecf8427e"
]

],
"1": [
"versions.yml:md5,01dce7699931b293311f2e5436b88a3a",
"versions.yml:md5,3be8e23309ed0bacebcad3d2fb30642a"
],
"ch_arriba_visualisation": [
[
{
"id": "test_sample"
},
"test_sample_combined_fusions_arriba_visualisation.pdf:md5,d41d8cd98f00b204e9800998ecf8427e"
]

],
"versions": [
"versions.yml:md5,01dce7699931b293311f2e5436b88a3a",
"versions.yml:md5,3be8e23309ed0bacebcad3d2fb30642a"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.2"
"nextflow": "25.04.6"
},
"timestamp": "2025-08-26T20:11:13.798144726"
"timestamp": "2025-09-08T17:38:59.895142"
},
"FUSIONINSPECTOR_WORKFLOW - human": {
"content": [
[
"versions.yml:md5,01dce7699931b293311f2e5436b88a3a",
"versions.yml:md5,3be8e23309ed0bacebcad3d2fb30642a"
]
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.2"
"nextflow": "25.04.6"
},
"timestamp": "2025-08-28T21:54:05.453749443"
"timestamp": "2025-09-08T17:14:05.797063"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@ process {
ext.args = []
}

withName: 'FUSIONREPORT_DOWNLOAD' {
ext.args = params.fusionreport_download_args
}

withName: 'FUSIONREPORT_DETECT' {
ext.args = params.fusionreport_detect_args
ext.args2 = params.fusionreport_detect_args2
}

withName: 'FUSIONINSPECTOR' {
ext.args = '--annotate --examine_coding_effect'
Expand Down
5 changes: 2 additions & 3 deletions subworkflows/local/qc_workflow/test/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ nextflow_workflow {
input[1] = Channel.of(
[
[id: 'chr22_dict'],
file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/modules/data/genomics/homo_sapiens/genome/genome.dict", checkIfExists: true)
file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/modules/data/genomics/homo_sapiens/genome/genome.dict", checkIfExist: true)
]
)
"""
Expand All @@ -71,11 +71,10 @@ nextflow_workflow {
}

when {
// Params to activate modules ext.when condition
params {
skip_qc = false
fusioninspector_only = false
tools = "starfusion"
tools = "all"
outdir = "test"

}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_build.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,6 @@
"nf-test": "0.9.2",
"nextflow": "25.04.6"
},
"timestamp": "2025-09-05T12:58:07.878931"
"timestamp": "2025-09-09T11:45:13.886497"
}
}
38 changes: 4 additions & 34 deletions tests/test_stub.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -561,20 +561,14 @@
},
"stub test fusioninspector": {
"content": [
34,
31,
{
"AGAT_CONVERTGFF2BED": {
"agat": "v1.5.1"
},
"AGAT_CONVERTSPGFF2TSV": {
"agat": "v1.4.1"
},
"ARRIBA_ARRIBA": {
"arriba": "2.5.0"
},
"ARRIBA_VISUALISATION": {
"arriba": "2.5.0"
},
"BIOAWK": {
"bioawk": 1.0
},
Expand Down Expand Up @@ -648,23 +642,16 @@
"UCSC_GTFTOGENEPRED": {
"ucsc": 447
},
"VCF_COLLECT": {
"python": "3.11.0",
"vcf_collect": 0.1
},
"Workflow": {
"nf-core/rnafusion": "v4.0.0dev"
}
},
[
"agat",
"agat/Homo_sapiens.GRCh38.46.gtf.bed",
"agat/test.tsv",
"arriba",
"arriba/test.arriba.fusions.discarded.tsv",
"arriba/test.arriba.fusions.tsv",
"arriba_visualisation",
"arriba_visualisation/test_combined_fusions_arriba_visualisation.pdf",
"bioawk",
"bioawk/Homo_sapiens.GRCh38.46.gtf_rrna.gtf.gz",
"fastqc",
Expand Down Expand Up @@ -840,9 +827,7 @@
"star/test.toTranscriptome.out.bam",
"star/test.unmapped_1.fastq.gz",
"star/test.unmapped_2.fastq.gz",
"star/testXd.out.bam",
"vcf",
"vcf/test_fusion_data.vcf"
"star/testXd.out.bam"
]
],
"meta": {
Expand Down Expand Up @@ -1708,20 +1693,14 @@
},
"stub test all": {
"content": [
45,
42,
{
"AGAT_CONVERTGFF2BED": {
"agat": "v1.5.1"
},
"AGAT_CONVERTSPGFF2TSV": {
"agat": "v1.4.1"
},
"ARRIBA_ARRIBA": {
"arriba": "2.5.0"
},
"ARRIBA_VISUALISATION": {
"arriba": "2.5.0"
},
"BIOAWK": {
"bioawk": 1.0
},
Expand Down Expand Up @@ -1828,23 +1807,16 @@
"UCSC_GTFTOGENEPRED": {
"ucsc": 447
},
"VCF_COLLECT": {
"python": "3.11.0",
"vcf_collect": 0.1
},
"Workflow": {
"nf-core/rnafusion": "v4.0.0dev"
}
},
[
"agat",
"agat/Homo_sapiens.GRCh38.46.gtf.bed",
"agat/test.tsv",
"arriba",
"arriba/test.arriba.fusions.discarded.tsv",
"arriba/test.arriba.fusions.tsv",
"arriba_visualisation",
"arriba_visualisation/test_combined_fusions_arriba_visualisation.pdf",
"bioawk",
"bioawk/Homo_sapiens.GRCh38.46.gtf_rrna.gtf.gz",
"ctatsplicing",
Expand Down Expand Up @@ -2082,9 +2054,7 @@
"stringtie/test.ballgown",
"stringtie/test.coverage.gtf",
"stringtie/test.gene.abundance.txt",
"stringtie/test.transcripts.gtf",
"vcf",
"vcf/test_fusion_data.vcf"
"stringtie/test.transcripts.gtf"
]
],
"meta": {
Expand Down
Loading
Loading