diff --git a/CHANGELOG.md b/CHANGELOG.md index 0371c206..a5c881c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add nf-test to local module: `FUSIONREPORT_DOWNLOAD` [#560](https://github.com/nf-core/rnafusion/pull/560) - Add nf-test to local subworkflow: `QC_WORKFLOW` [#568](https://github.com/nf-core/rnafusion/pull/568) - Add nf-test to local subworkflow: `TRIM_WORKFLOW` [#572](https://github.com/nf-core/rnafusion/pull/572) -- Add nf-test to local module: `FUSIONREPORT_DETECT`. Improve `FUSIONREPORT_DOWNLOAD` module [#577](https://github.com/nf-core/rnafusion/pull/577) +- Add nf-test to local module: `FUSIONREPORT_DETECT`. Improve `FUSIONREPORT_DOWNLOAD` module [#572](https://github.com/nf-core/rnafusion/pull/577) +- Add nf-test to local subworkflow: `ARRIBA_WORKFLOW` [#578](https://github.com/nf-core/rnafusion/pull/578) ### Changed diff --git a/subworkflows/local/arriba_workflow.nf b/subworkflows/local/arriba_workflow.nf deleted file mode 100644 index ccc88823..00000000 --- a/subworkflows/local/arriba_workflow.nf +++ /dev/null @@ -1,64 +0,0 @@ -include { ARRIBA_ARRIBA } from '../../modules/nf-core/arriba/arriba/main' -include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_FOR_ARRIBA} from '../../modules/nf-core/samtools/index/main' -include { SAMTOOLS_SORT as SAMTOOLS_SORT_FOR_ARRIBA} from '../../modules/nf-core/samtools/sort/main' -include { SAMTOOLS_VIEW as SAMTOOLS_VIEW_FOR_ARRIBA} from '../../modules/nf-core/samtools/view/main' -include { STAR_ALIGN as STAR_FOR_ARRIBA } from '../../modules/nf-core/star/align/main' - -workflow ARRIBA_WORKFLOW { - take: - reads - ch_gtf - ch_fasta - ch_starindex_ref - ch_arriba_ref_blacklist - ch_arriba_ref_known_fusions - ch_arriba_ref_protein_domains - - main: - ch_versions = Channel.empty() - ch_dummy_file = file("$baseDir/assets/dummy_file_arriba.txt", checkIfExists: true) - - if ((params.arriba || params.all) && !params.fusioninspector_only) { - - STAR_FOR_ARRIBA( reads, ch_starindex_ref, ch_gtf, params.star_ignore_sjdbgtf, '', params.seq_center ?: '') - ch_versions = ch_versions.mix(STAR_FOR_ARRIBA.out.versions) - - if (params.arriba_fusions) { - ch_arriba_fusions = reads.combine( Channel.value( file( params.arriba_fusions, checkIfExists: true ) ) ) - .map { meta, reads, fusions -> [ meta, fusions ] } - ch_arriba_fusion_fail = ch_dummy_file - } else { - ARRIBA_ARRIBA ( STAR_FOR_ARRIBA.out.bam, ch_fasta, ch_gtf, ch_arriba_ref_blacklist, ch_arriba_ref_known_fusions, [[],[]], ch_arriba_ref_protein_domains ) - ch_versions = ch_versions.mix(ARRIBA_ARRIBA.out.versions) - - ch_arriba_fusions = ARRIBA_ARRIBA.out.fusions - ch_arriba_fusion_fail = ARRIBA_ARRIBA.out.fusions_fail.map{ meta, file -> return file} - } - - if (params.cram.contains('arriba') ){ - - SAMTOOLS_SORT_FOR_ARRIBA(STAR_FOR_ARRIBA.out.bam, ch_fasta) - ch_versions = ch_versions.mix(SAMTOOLS_SORT_FOR_ARRIBA.out.versions ) - - SAMTOOLS_VIEW_FOR_ARRIBA(SAMTOOLS_SORT_FOR_ARRIBA.out.bam.map { meta, bam -> [ meta, bam, [] ] }, ch_fasta, []) - ch_versions = ch_versions.mix(SAMTOOLS_VIEW_FOR_ARRIBA.out.versions ) - - SAMTOOLS_INDEX_FOR_ARRIBA(SAMTOOLS_VIEW_FOR_ARRIBA.out.cram) - ch_versions = ch_versions.mix(SAMTOOLS_INDEX_FOR_ARRIBA.out.versions ) - - } - - } - else { - ch_arriba_fusions = reads.combine(Channel.value( file(ch_dummy_file, checkIfExists:true ) ) ) - .map { meta, reads, fusions -> [ meta, fusions ] } - - ch_arriba_fusion_fail = ch_dummy_file - } - - emit: - fusions = ch_arriba_fusions - fusions_fail = ch_arriba_fusion_fail - versions = ch_versions - } - diff --git a/subworkflows/local/arriba_workflow/main.nf b/subworkflows/local/arriba_workflow/main.nf new file mode 100644 index 00000000..5f59916a --- /dev/null +++ b/subworkflows/local/arriba_workflow/main.nf @@ -0,0 +1,97 @@ +include { ARRIBA_ARRIBA } from '../../../modules/nf-core/arriba/arriba/main' +include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_FOR_ARRIBA } from '../../../modules/nf-core/samtools/index/main' +include { SAMTOOLS_SORT as SAMTOOLS_SORT_FOR_ARRIBA } from '../../../modules/nf-core/samtools/sort/main' +include { SAMTOOLS_VIEW as SAMTOOLS_VIEW_FOR_ARRIBA } from '../../../modules/nf-core/samtools/view/main' +include { STAR_ALIGN as STAR_FOR_ARRIBA } from '../../../modules/nf-core/star/align/main' + +workflow ARRIBA_WORKFLOW { + take: + reads // channel [ meta, [ fastqs ] ] + ch_gtf // channel [ meta, path_gtf ] + ch_fasta // channel [ meta, path_fasta ] + ch_starindex_ref // channel [ meta, path_index ] + ch_arriba_ref_blacklist // channel [ meta, path_blacklist ] + ch_arriba_ref_known_fusions // channel [ meta, path_known_fusions ] + ch_arriba_ref_cytobands // channel [ meta, path_cytobands ] + ch_arriba_ref_protein_domains // channel [ meta, path_proteins ] + arriba // boolean + all // boolean + fusioninspector_only // boolean + star_ignore_sjdbgtf // boolean + seq_center // string + arriba_fusions // path + cram // array + + main: + ch_versions = Channel.empty() + ch_cram_index = Channel.empty() + ch_dummy_file = file("$baseDir/assets/dummy_file_arriba.txt", checkIfExists: true) + + if (( arriba || all ) && !fusioninspector_only) { + + STAR_FOR_ARRIBA( + reads, + ch_starindex_ref, + ch_gtf, + star_ignore_sjdbgtf, + '', + seq_center + ) + + ch_versions = ch_versions.mix(STAR_FOR_ARRIBA.out.versions) + + if ( arriba_fusions ) { + + ch_arriba_fusions = reads.combine( Channel.value( file( arriba_fusions, checkIfExists: true ) ) ) + .map { meta, reads, fusions -> [ meta, fusions ] } + ch_arriba_fusion_fail = ch_dummy_file + + } else { + + ARRIBA_ARRIBA ( + STAR_FOR_ARRIBA.out.bam, + ch_fasta, + ch_gtf, + ch_arriba_ref_blacklist.map{ it[1] }, + ch_arriba_ref_known_fusions.map{ it[1] }, + ch_arriba_ref_cytobands.map{ it[1] }, + ch_arriba_ref_protein_domains.map{ it[1] } + ) + + ch_versions = ch_versions.mix(ARRIBA_ARRIBA.out.versions) + + ch_arriba_fusions = ARRIBA_ARRIBA.out.fusions + ch_arriba_fusion_fail = ARRIBA_ARRIBA.out.fusions_fail.map{ meta, file -> return file } + } + + if ( cram.contains('arriba') ) { + + SAMTOOLS_SORT_FOR_ARRIBA(STAR_FOR_ARRIBA.out.bam, ch_fasta) + ch_versions = ch_versions.mix(SAMTOOLS_SORT_FOR_ARRIBA.out.versions ) + + SAMTOOLS_VIEW_FOR_ARRIBA(SAMTOOLS_SORT_FOR_ARRIBA.out.bam.map { meta, bam -> [ meta, bam, [] ] }, ch_fasta, []) + ch_versions = ch_versions.mix(SAMTOOLS_VIEW_FOR_ARRIBA.out.versions ) + + SAMTOOLS_INDEX_FOR_ARRIBA(SAMTOOLS_VIEW_FOR_ARRIBA.out.cram) + ch_versions = ch_versions.mix(SAMTOOLS_INDEX_FOR_ARRIBA.out.versions ) + + // Join cram and index files + ch_cram_index = SAMTOOLS_VIEW_FOR_ARRIBA.out.cram.join(SAMTOOLS_INDEX_FOR_ARRIBA.out.crai) + } + + } else { + + ch_arriba_fusions = reads + .combine(Channel.value( file(ch_dummy_file, checkIfExists: true ) ) ) + .map { meta, reads, fusions -> [ meta, fusions ] } + + ch_arriba_fusion_fail = ch_dummy_file + } + + emit: + fusions = ch_arriba_fusions // channel [ meta, path_fusions ] + fusions_fail = ch_arriba_fusion_fail // channel [ path, fusions_failed ] + cram_index = ch_cram_index // channel [ meta, cram, crai ] + versions = ch_versions // channel [ versions ] + } + diff --git a/subworkflows/local/arriba_workflow/tests/main.nf.test b/subworkflows/local/arriba_workflow/tests/main.nf.test new file mode 100644 index 00000000..e49a3768 --- /dev/null +++ b/subworkflows/local/arriba_workflow/tests/main.nf.test @@ -0,0 +1,390 @@ +nextflow_workflow { + + name "Test Subworkflow ARRIBA_WORKFLOW" + script "../main.nf" + workflow "ARRIBA_WORKFLOW" + tag "subworkflow" + tag "arriba" + tag "arriba/arriba" + tag "samtools" + tag "samtools/index" + tag "samtools/sort" + tag "samtools/view" + tag "star" + tag "star/genomegenerate" + tag "star/align" + + + // Test #1 Indexing + test("ARRIBA_WORKFLOW - Homo sapiens - FASTQs chr4") { + + setup { + // Create genome index for STAR + run("STAR_GENOMEGENERATE") { + script "../../../../modules/nf-core/star/genomegenerate/main.nf" + process { + """ + // FASTA + input[0] = Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/ensembl/Homo_sapiens.GRCh38.102.chr4.1700000-54900000.fa", checkIfExists: true + ) + .map{ [[id: it.getName() ], it ]} + + // GTF + input[1] = Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/ensembl/Homo_sapiens.GRCh38.102.chr4.gtf", checkIfExists: true + ) + .map{ [[id: it.getName() ], it ]} + """ + } + } + } + + when { + workflow { + """ + // ch_reads + input[0] = Channel.of( + [ + [ id: "test_fastqs" ], + [ + file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/human/reads_1.fq.gz", checkIfExists: true), + file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/human/reads_2.fq.gz", checkIfExists: true) + ] + ] ) + + // ch_gtf + input[1] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/ensembl/Homo_sapiens.GRCh38.102.chr4.gtf", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_fasta + input[2] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/ensembl/Homo_sapiens.GRCh38.102.chr4.1700000-54900000.fa", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_starindex_ref + input[3] = STAR_GENOMEGENERATE.out.index + + // ch_arriba_ref_blacklist + input[4] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/arriba/blacklist_hg38_GRCh38_v2.4.0.tsv.gz", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_arriba_ref_known_fusions + input[5] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/arriba/known_fusions_hg38_GRCh38_v2.4.0.tsv.gz", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_arriba_ref_cytobands + input[6] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/arriba/cytobands_hg38_GRCh38_v2.4.0.tsv", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_arriba_ref_protein_domains + input[7] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/arriba/protein_domains_hg38_GRCh38_v2.4.0.gff3", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // arriba (boolean) + input[8] = true + + // all (boolean) + input[9] = true + + // fusioninspector_only (boolean) + input[10] = false + + // star_ignore_sjdbgtf (boolean) + input[11] = false + + // seq_center (string) + input[12] = 'test_center' + + // arriba_fusions (path) + input[13] = null + + // cram (array) + input[14] = [ 'arriba' ] + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { with(workflow.out) { + assert snapshot( + file(fusions[0][1]), + file(fusions_fail[0]), + file(cram_index[0][1]).name, + file(cram_index[0][2]).name, + versions.collect{ file(it) } + ).match() + } + } + ) + } + } + + + // Test #2 With arriba_fusions file + test("ARRIBA_WORKFLOW - Homo sapiens - FASTQs chr4 - External fusion file") { + + setup { + // Create genome index for STAR + run("STAR_GENOMEGENERATE") { + script "../../../../modules/nf-core/star/genomegenerate/main.nf" + process { + """ + // FASTA + input[0] = Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/ensembl/Homo_sapiens.GRCh38.102.chr4.1700000-54900000.fa", checkIfExists: true + ) + .map{ [[id: it.getName() ], it ]} + + // GTF + input[1] = Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/ensembl/Homo_sapiens.GRCh38.102.chr4.gtf", checkIfExists: true + ) + .map{ [[id: it.getName() ], it ]} + """ + } + } + } + + when { + workflow { + """ + // ch_reads + input[0] = Channel.of( + [ + [ id: "test_fastqs" ], + [ + file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/human/reads_1.fq.gz", checkIfExists: true), + file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/human/reads_2.fq.gz", checkIfExists: true) + ] + ] ) + + // ch_gtf + input[1] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/ensembl/Homo_sapiens.GRCh38.102.chr4.gtf", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_fasta + input[2] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/ensembl/Homo_sapiens.GRCh38.102.chr4.1700000-54900000.fa", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_starindex_ref + input[3] = STAR_GENOMEGENERATE.out.index + + // ch_arriba_ref_blacklist + input[4] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/arriba/blacklist_hg38_GRCh38_v2.4.0.tsv.gz", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_arriba_ref_known_fusions + input[5] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/arriba/known_fusions_hg38_GRCh38_v2.4.0.tsv.gz", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_arriba_ref_cytobands + input[6] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/arriba/cytobands_hg38_GRCh38_v2.4.0.tsv", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_arriba_ref_protein_domains + input[7] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/arriba/protein_domains_hg38_GRCh38_v2.4.0.gff3", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // arriba (boolean) + input[8] = true + + // all (boolean) + input[9] = true + + // fusioninspector_only (boolean) + input[10] = false + + // star_ignore_sjdbgtf (boolean) + input[11] = false + + // seq_center (string) + input[12] = 'test_center' + + // arriba_fusions (string path) + input[13] = "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/arriba/test_fastqs.arriba.fusions.tsv" + + // cram (array) + input[14] = [ 'arriba' ] + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { with(workflow.out) { + assert snapshot( + fusions[0].size() == 2, + fusions_fail.size() == 1, + file(cram_index[0][1]).name, + file(cram_index[0][2]).name, + versions.collect{ file(it) } + ).match() + } + } + ) + } + } + + // TEST #3 WITHOUT INDEXING + test("ARRIBA_WORKFLOW - Homo sapiens - FASTQs chr4 - cram = []") { + + setup { + // Create genome index for STAR + run("STAR_GENOMEGENERATE") { + script "../../../../modules/nf-core/star/genomegenerate/main.nf" + process { + """ + // FASTA + input[0] = Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/ensembl/Homo_sapiens.GRCh38.102.chr4.1700000-54900000.fa", checkIfExists: true + ) + .map{ [[id: it.getName() ], it ]} + + // GTF + input[1] = Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/ensembl/Homo_sapiens.GRCh38.102.chr4.gtf", checkIfExists: true + ) + .map{ [[id: it.getName() ], it ]} + """ + } + } + } + + when { + workflow { + """ + // ch_reads + input[0] = Channel.of( + [ + [ id: "test_fastqs" ], + [ + file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/human/reads_1.fq.gz", checkIfExists: true), + file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/human/reads_2.fq.gz", checkIfExists: true) + ] + ] ) + + // ch_gtf + input[1] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/ensembl/Homo_sapiens.GRCh38.102.chr4.gtf", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_fasta + input[2] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/ensembl/Homo_sapiens.GRCh38.102.chr4.1700000-54900000.fa", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_starindex_ref + input[3] = STAR_GENOMEGENERATE.out.index + + // ch_arriba_ref_blacklist + input[4] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/arriba/blacklist_hg38_GRCh38_v2.4.0.tsv.gz", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_arriba_ref_known_fusions + input[5] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/arriba/known_fusions_hg38_GRCh38_v2.4.0.tsv.gz", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_arriba_ref_cytobands + input[6] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/arriba/cytobands_hg38_GRCh38_v2.4.0.tsv", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // ch_arriba_ref_protein_domains + input[7] = + Channel.fromPath( + "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/rnafusion/testdata/reference/arriba/protein_domains_hg38_GRCh38_v2.4.0.gff3", checkIfExists: true + ) + .map{ [ [ id: it.name ], it ] } + + // arriba (boolean) + input[8] = true + + // all (boolean) + input[9] = true + + // fusioninspector_only (boolean) + input[10] = false + + // star_ignore_sjdbgtf (boolean) + input[11] = false + + // seq_center (string) + input[12] = 'test_center' + + // arriba_fusions (path) + input[13] = null + + // cram (array) + input[14] = [ ] + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { with(workflow.out) { + assert snapshot( + file(fusions[0][1]), + file(fusions_fail[0]), + cram_index.size() == 0, + versions.collect{ file(it) } + ).match() + } + } + ) + } + } + +} diff --git a/subworkflows/local/arriba_workflow/tests/main.nf.test.snap b/subworkflows/local/arriba_workflow/tests/main.nf.test.snap new file mode 100644 index 00000000..2057827a --- /dev/null +++ b/subworkflows/local/arriba_workflow/tests/main.nf.test.snap @@ -0,0 +1,57 @@ +{ + "ARRIBA_WORKFLOW - Homo sapiens - FASTQs chr4 - External fusion file": { + "content": [ + true, + true, + "test_fastqs_star_for_arriba_sorted.cram", + "test_fastqs_star_for_arriba_sorted.cram.crai", + [ + "versions.yml:md5,439bbb92ff0a83f1e278fc396e9d8ce9", + "versions.yml:md5,85458747b55f37c1a5afd39ee7a3a4aa", + "versions.yml:md5,bfc5d96804f2991c7f7c705f1ddf81ec", + "versions.yml:md5,f4f64d3f1fd867d5afa51e03f7cf2824" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-11T15:53:59.18258718" + }, + "ARRIBA_WORKFLOW - Homo sapiens - FASTQs chr4": { + "content": [ + "test_fastqs.arriba.fusions.tsv:md5,8f39789c4428e81eb9a8d0e54c34c43d", + "test_fastqs.arriba.fusions.discarded.tsv:md5,b804c1ed5b01d34163f5c0b2f6810f98", + "test_fastqs_star_for_arriba_sorted.cram", + "test_fastqs_star_for_arriba_sorted.cram.crai", + [ + "versions.yml:md5,24030f38976402fad0861e6ec99ee6b6", + "versions.yml:md5,439bbb92ff0a83f1e278fc396e9d8ce9", + "versions.yml:md5,85458747b55f37c1a5afd39ee7a3a4aa", + "versions.yml:md5,bfc5d96804f2991c7f7c705f1ddf81ec", + "versions.yml:md5,f4f64d3f1fd867d5afa51e03f7cf2824" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-11T15:43:48.053656601" + }, + "ARRIBA_WORKFLOW - Homo sapiens - FASTQs chr4 - cram = []": { + "content": [ + "test_fastqs.arriba.fusions.tsv:md5,8f39789c4428e81eb9a8d0e54c34c43d", + "test_fastqs.arriba.fusions.discarded.tsv:md5,b804c1ed5b01d34163f5c0b2f6810f98", + true, + [ + "versions.yml:md5,24030f38976402fad0861e6ec99ee6b6", + "versions.yml:md5,439bbb92ff0a83f1e278fc396e9d8ce9" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-11T16:07:37.079418154" + } +} \ No newline at end of file diff --git a/tests/test_build.nf.test.snap b/tests/test_build.nf.test.snap index 16b6c007..28c64818 100644 --- a/tests/test_build.nf.test.snap +++ b/tests/test_build.nf.test.snap @@ -42,6 +42,6 @@ "nf-test": "0.9.0", "nextflow": "24.10.2" }, - "timestamp": "2024-12-09T13:33:28.517098377" + "timestamp": "2024-12-09T18:20:09.914393513" } } \ No newline at end of file diff --git a/tests/test_cosmic.nf.test.snap b/tests/test_cosmic.nf.test.snap new file mode 100644 index 00000000..e69de29b diff --git a/workflows/rnafusion.nf b/workflows/rnafusion.nf index bafea68c..0c8a6e5f 100644 --- a/workflows/rnafusion.nf +++ b/workflows/rnafusion.nf @@ -85,6 +85,11 @@ workflow RNAFUSION { // // SUBWORKFLOW: Run STAR alignment and Arriba // + + // TODO: add params.seq_platform and pass it as argument to arriba_workflow + // TODO: improve how params.arriba_fusions would avoid running arriba module. Maybe inputed from samplesheet? + // TODO: same as above, but with ch_arriba_fusion_fail. It's currently replaces by a dummy file + ARRIBA_WORKFLOW ( ch_reads_all, ch_gtf, @@ -92,7 +97,15 @@ workflow RNAFUSION { ch_starindex_ensembl_ref, ch_arriba_ref_blacklist, ch_arriba_ref_known_fusions, - ch_arriba_ref_protein_domains + ch_arriba_ref_cytobands, + ch_arriba_ref_protein_domains, + params.arriba, // boolean + params.all, // boolean + params.fusioninspector_only, // boolean + params.star_ignore_sjdbgtf, // boolean + params.seq_center ?: '', // string + params.arriba_fusions, // path + params.cram // array ) ch_versions = ch_versions.mix(ARRIBA_WORKFLOW.out.versions)