diff --git a/CHANGELOG.md b/CHANGELOG.md index a7e358ea..71393afc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added a new module `CTATSPLICING_STARTOCANCERINTRONS` and a new parameter `--ctatsplicing`. This options creates reports on cancer splicing abberations and requires one or both of `--arriba` and `--starfusion` to be given. [#587](https://github.com/nf-core/rnafusion/pull/587) - Add parameter `--references_only` when no data should be analysed, but only the references should be built [#505](https://github.com/nf-core/rnafusion/pull/505) - Add nf-test to local subworkflow: `STARFUSION_WORKFLOW`. [#597](https://github.com/nf-core/rnafusion/pull/597) +- Add nf-test to local module: `FUSIONINSPECTOR`. [#601](https://github.com/nf-core/rnafusion/pull/601) ### Changed @@ -40,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Integrate reference building in the main workflow [#505](https://github.com/nf-core/rnafusion/pull/505) - Move from ensembl to gencode base [#505](https://github.com/nf-core/rnafusion/pull/505) - Update from ensembl 102 to gencode 46 default references [#505](https://github.com/nf-core/rnafusion/pull/505) +- Update`FUSIONINSPECTOR` to v2.10.0. [#601](https://github.com/nf-core/rnafusion/pull/601) - Remove local module `STARFUSION_DOWNLOAD` [#598](https://github.com/nf-core/rnafusion/pull/598) ### Fixed diff --git a/conf/modules.config b/conf/modules.config index 31a1d208..69611e8a 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -114,7 +114,7 @@ process { ] } - withName: 'FUSIONINSPECTOR' { + withName: '.*FUSIONINSPECTOR_WORKFLOW:.*:FUSIONINSPECTOR' { ext.when = { !params.skip_vis } ext.args = { ${params.fusioninspector_limitSjdbInsertNsj} != 1000000 ? "--STAR_xtra_params \"--limitSjdbInsertNsj ${params.fusioninspector_limitSjdbInsertNsj}\"" : '' } ext.args2 = '--annotate --examine_coding_effect' diff --git a/modules/local/fusioninspector/environment.yml b/modules/local/fusioninspector/environment.yml index ef7f9316..26605058 100644 --- a/modules/local/fusioninspector/environment.yml +++ b/modules/local/fusioninspector/environment.yml @@ -2,7 +2,11 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::dfam=3.7 - - bioconda::hmmer=3.4 - - bioconda::minimap2=2.28 - - bioconda::star-fusion=1.14.0 + - bioconda::fusion-inspector=2.10.0 + - bioconda::igv-reports=1.14.1 + - bioconda::perl-json-xs=4.03 + - bioconda::pysam=0.22.1 + - conda-forge::perl-carp-assert=0.21 + - pip + - pip: + - intervaltree==3.1.0 diff --git a/modules/local/fusioninspector/main.nf b/modules/local/fusioninspector/main.nf index ade7c174..cd45b673 100644 --- a/modules/local/fusioninspector/main.nf +++ b/modules/local/fusioninspector/main.nf @@ -4,8 +4,8 @@ process FUSIONINSPECTOR { 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/be/bed86145102fdf7e381e1a506a4723676f98b4bbe1db5085d02213cef18525c9/data' : - 'community.wave.seqera.io/library/dfam_hmmer_minimap2_star-fusion:aa3a8e3951498552'}" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/13/139b94a1f10c6e23a8c27eaed1e5a689db978a513d0ee155e74d35f0970814fe/data' : + 'community.wave.seqera.io/library/fusion-inspector_igv-reports_perl-json-xs_pysam_pruned:c6147971d107ab11'}" input: tuple val(meta), path(reads), path(fusion_list) @@ -15,7 +15,7 @@ process FUSIONINSPECTOR { tuple val(meta), path("*FusionInspector.fusions.tsv") , emit: tsv tuple val(meta), path("*.coding_effect") , optional:true, emit: tsv_coding_effect tuple val(meta), path("*.gtf") , optional:true, emit: out_gtf - path "*" , emit: output + tuple val(meta), path("*FusionInspector.log") , emit: log path "versions.yml" , emit: versions when: diff --git a/modules/local/fusioninspector/tests/main.nf.test b/modules/local/fusioninspector/tests/main.nf.test new file mode 100644 index 00000000..0189f867 --- /dev/null +++ b/modules/local/fusioninspector/tests/main.nf.test @@ -0,0 +1,100 @@ +nextflow_process { + + name "Test Process FUSIONINSPECTOR" + script "../main.nf" + process "FUSIONINSPECTOR" + tag "modules" + tag "modules_local" + tag "fusioninspector" + + test("FUSIONINSPECTOR") { + config './nextflow.config' + + setup { + run("STARFUSION_BUILD") { + script "../../starfusion/build/main.nf" + process { + """ + input[0] = [ + [ id:'minigenome fasta' ], + file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/minigenome.fa") + ] + input[1] = [ + [ id:'minigenome gtf' ], + file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/minigenome.gtf") + ] + + input [2] = file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/master/CTAT_HumanFusionLib.mini.dat.gz") + input [3] = "human" + """ + } + } + } + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/v0.0.1/rnaseq_1.fastq.gz"), + file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/v0.0.1/rnaseq_2.fastq.gz") + ], // reads + [ + file("https://github.com/FusionInspector/FusionInspector/raw/master/test/fusion_targets.A.txt") + ] + ] + input[1] = STARFUSION_BUILD.out.reference.map { it[1] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.tsv[0][1]).name, + process.out.tsv_coding_effect, // TODO: These files do not seem to be produced. Consult Annick. + process.out.out_gtf, // TODO: These files do not seem to be produced. Consult Annick. + file(process.out.log[0][1]).name, + process.out.versions + ).match() } + ) + } + + } + + test("FUSIONINSPECTOR - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/v0.0.1/rnaseq_1.fastq.gz"), + file("https://github.com/STAR-Fusion/STAR-Fusion-Tutorial/raw/v0.0.1/rnaseq_2.fastq.gz") + ], // reads + [ + file("https://github.com/FusionInspector/FusionInspector/raw/master/test/fusion_targets.A.txt") + ] + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out).match() } + ) + } + + } + + +} diff --git a/modules/local/fusioninspector/tests/main.nf.test.snap b/modules/local/fusioninspector/tests/main.nf.test.snap new file mode 100644 index 00000000..08ced813 --- /dev/null +++ b/modules/local/fusioninspector/tests/main.nf.test.snap @@ -0,0 +1,111 @@ +{ + "FUSIONINSPECTOR - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.FusionInspector.fusions.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.FusionInspector.fusions.tsv.annotated.coding_effect:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.FusionInspector.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,ad8d0da5929dfa70794bccf8765ddb23" + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.FusionInspector.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "out_gtf": [ + [ + { + "id": "test", + "single_end": false + }, + "test.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tsv": [ + [ + { + "id": "test", + "single_end": false + }, + "test.FusionInspector.fusions.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tsv_coding_effect": [ + [ + { + "id": "test", + "single_end": false + }, + "test.FusionInspector.fusions.tsv.annotated.coding_effect:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,ad8d0da5929dfa70794bccf8765ddb23" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2024-12-26T23:13:02.858688488" + }, + "FUSIONINSPECTOR": { + "content": [ + "test.FusionInspector.fusions.tsv", + [ + + ], + [ + + ], + "FusionInspector.log", + [ + "versions.yml:md5,ad8d0da5929dfa70794bccf8765ddb23" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2024-12-27T16:38:17.787825557" + } +} \ No newline at end of file diff --git a/modules/local/fusioninspector/tests/nextflow.config b/modules/local/fusioninspector/tests/nextflow.config new file mode 100644 index 00000000..ca61431b --- /dev/null +++ b/modules/local/fusioninspector/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: 'FUSIONINSPECTOR' { + ext.args = '--annotate --examine_coding_effect' + } +}