diff --git a/modules/nf-core/ribotish/predict/environment.yml b/modules/nf-core/ribotish/predict/environment.yml index 65bb256c5398..b026ccaaf1ef 100644 --- a/modules/nf-core/ribotish/predict/environment.yml +++ b/modules/nf-core/ribotish/predict/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::ribotish=0.2.7 + - bioconda::ribotish=0.2.8 diff --git a/modules/nf-core/ribotish/predict/main.nf b/modules/nf-core/ribotish/predict/main.nf index eafe4568b71a..962de407a19e 100644 --- a/modules/nf-core/ribotish/predict/main.nf +++ b/modules/nf-core/ribotish/predict/main.nf @@ -4,8 +4,8 @@ process RIBOTISH_PREDICT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ribotish:0.2.7--pyhdfd78af_0': - 'quay.io/biocontainers/ribotish:0.2.7--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/ribotish:0.2.8--pyhdfd78af_0': + 'quay.io/biocontainers/ribotish:0.2.8--pyhdfd78af_0' }" input: tuple val(meta), path(bam_ribo), path(bai_ribo) @@ -14,12 +14,13 @@ process RIBOTISH_PREDICT { tuple val(meta4), path(candidate_orfs) tuple val(meta5), path(para_ribo) tuple val(meta6), path(para_ti) + tuple val(meta7), path(reference_gtf, stageAs: 'secondary.gtf') output: tuple val(meta), path("*_pred.txt") , emit: predictions tuple val(meta), path("*_all.txt") , emit: all tuple val(meta), path("*_transprofile.py") , emit: transprofile - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('ribotish'), eval("ribotish --version | sed 's/ribotish //'"), topic: versions, emit: versions_ribotish when: task.ext.when == null || task.ext.when @@ -27,6 +28,7 @@ process RIBOTISH_PREDICT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def reference_gtf_arg = reference_gtf ? "-a ${reference_gtf}" : '' ribo_bam_cmd = '' ti_bam_cmd = '' @@ -48,16 +50,12 @@ process RIBOTISH_PREDICT { $ti_bam_cmd \\ -f $fasta \\ -g $gtf \\ + $reference_gtf_arg \\ -o ${prefix}_pred.txt \\ --allresult ${prefix}_all.txt \\ --transprofile ${prefix}_transprofile.py \\ -p $task.cpus \\ $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ribotish: \$(ribotish --version | sed 's/ribotish //') - END_VERSIONS """ stub: @@ -66,10 +64,5 @@ process RIBOTISH_PREDICT { touch ${prefix}_pred.txt touch ${prefix}_all.txt touch ${prefix}_transprofile.py - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ribotish: \$(ribotish --version | sed 's/ribotish //') - END_VERSIONS """ } diff --git a/modules/nf-core/ribotish/predict/meta.yml b/modules/nf-core/ribotish/predict/meta.yml index a0cb0b93aeb4..97fecde0ac65 100644 --- a/modules/nf-core/ribotish/predict/meta.yml +++ b/modules/nf-core/ribotish/predict/meta.yml @@ -1,4 +1,3 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "ribotish_predict" description: Quality control of riboseq bam data keywords: @@ -13,9 +12,9 @@ tools: documentation: "https://github.com/zhpn1024/ribotish" tool_dev_url: "https://github.com/zhpn1024/ribotish" doi: "10.1038/s41467-017-01981-8" - licence: ["GPL v3"] + licence: + - "GPL v3" identifier: "" - input: - - meta: type: map @@ -85,7 +84,7 @@ input: Input P-site offset parameter files for riboseq bam files pattern: "*.py" ontologies: - - edam: http://edamontology.org/format_3996 # Python script + - edam: http://edamontology.org/format_3996 - - meta6: type: map description: | @@ -97,7 +96,20 @@ input: Input P-site offset parameter files for TI-seq bam files pattern: "*.py" ontologies: - - edam: http://edamontology.org/format_3996 # Python script + - edam: http://edamontology.org/format_3996 + - - meta7: + type: map + description: | + Groovy Map containing reference information for the secondary + annotation file + - reference_gtf: + type: file + description: | + Optional secondary GTF annotation passed to ribotish as + `-a ` (e.g. a MANE/RefSeq overlay applied on + top of the primary GTF). Pass `[]` to omit. + pattern: "*.gtf" + ontologies: [] output: predictions: - - meta: @@ -137,14 +149,28 @@ output: positions on transcript. pattern: "*.{py}" ontologies: - - edam: http://edamontology.org/format_3996 # Python script + - edam: http://edamontology.org/format_3996 + versions_ribotish: + - - ${task.process}: + type: string + description: The name of the process + - ribotish: + type: string + description: The name of the tool + - ribotish --version | sed 's/ribotish //': + type: eval + description: The expression to obtain the version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - ribotish: + type: string + description: The name of the tool + - ribotish --version | sed 's/ribotish //': + type: eval + description: The expression to obtain the version of the tool authors: - "@pinin4fjords" maintainers: diff --git a/modules/nf-core/ribotish/predict/tests/main.nf.test b/modules/nf-core/ribotish/predict/tests/main.nf.test index e20e29820735..a2924ce02aa3 100644 --- a/modules/nf-core/ribotish/predict/tests/main.nf.test +++ b/modules/nf-core/ribotish/predict/tests/main.nf.test @@ -43,6 +43,7 @@ nextflow_process { input[3] = Channel.of([[],[]]) input[4] = Channel.of([[],[]]) input[5] = Channel.of([[],[]]) + input[6] = Channel.of([[],[]]) """ } } @@ -52,8 +53,10 @@ nextflow_process { { assert process.success }, { assert path(process.out.predictions[0][1]).getText().contains("ENSG00000132640\tENST00000254977\tBTBD3\tprotein_coding\t20:11890767-11923666:+\tATG\t45\t1743\tExtended\t0\t0\tNone\t0.013377070461772932\tT\tNone\tNone\t0.02118962148347") }, { assert path(process.out.all[0][1]).getText().contains("ENSG00000132640\tENST00000254977\tBTBD3\tprotein_coding\t20:11890767-11923666:+\tATG\t45\t1743\tExtended\t0\t0\tNone\t0.013377070461772932\tT\tNone\tNone\t0.02118962148347") }, - { assert snapshot(process.out.transprofile).match("transprofile_single_end_single_ribo_bam") }, - { assert snapshot(process.out.versions).match("versions_single_end_single_ribo_bam") } + { assert snapshot( + process.out.transprofile, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } } @@ -79,6 +82,7 @@ nextflow_process { input[3] = Channel.of([[],[]]) input[4] = Channel.of([[],[]]) input[5] = Channel.of([[],[]]) + input[6] = Channel.of([[],[]]) """ } } @@ -86,10 +90,12 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.predictions).match("predictions_single_end_single_ribo_bam_stub") }, - { assert snapshot(process.out.all).match("all_single_end_single_ribo_bam_stub") }, - { assert snapshot(process.out.transprofile).match("transprofile_single_end_single_ribo_bam_stub") }, - { assert snapshot(process.out.versions).match("versions_single_end_single_ribo_bam_stub") } + { assert snapshot( + process.out.predictions, + process.out.all, + process.out.transprofile, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } } @@ -119,6 +125,7 @@ nextflow_process { input[3] = Channel.of([[],[]]) input[4] = Channel.of([[],[]]) input[5] = Channel.of([[],[]]) + input[6] = Channel.of([[],[]]) """ } } @@ -128,8 +135,10 @@ nextflow_process { { assert process.success }, { assert path(process.out.predictions[0][1]).getText().contains("ENSG00000284776\tENST00000618693\t\tprotein_coding\t20:18567478-18744216:+\tATG\t26\t695\tAnnotated\t0\t0\tNone\t0.0006123183014212") }, { assert path(process.out.all[0][1]).getText().contains("ENSG00000284776\tENST00000618693\t\tprotein_coding\t20:18567478-18744216:+\tATG\t26\t695\tAnnotated\t0\t0\tNone\t0.0006123183014212") }, - { assert snapshot(process.out.transprofile).match("transprofile_single_end_multi_ribo_bam") }, - { assert snapshot(process.out.versions).match("versions_single_end_multi_ribo_bam") } + { assert snapshot( + process.out.transprofile, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } } @@ -161,6 +170,7 @@ nextflow_process { input[3] = Channel.of([[],[]]) input[4] = Channel.of([[],[]]) input[5] = Channel.of([[],[]]) + input[6] = Channel.of([[],[]]) """ } } @@ -168,10 +178,12 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.predictions).match("predictions_single_end_multi_ribo_bam_stub") }, - { assert snapshot(process.out.all).match("all_single_end_multi_ribo_bam_stub") }, - { assert snapshot(process.out.transprofile).match("transprofile_single_end_multi_ribo_bam_stub") }, - { assert snapshot(process.out.versions).match("versions_single_end_multi_ribo_bam_stub") } + { assert snapshot( + process.out.predictions, + process.out.all, + process.out.transprofile, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } } diff --git a/modules/nf-core/ribotish/predict/tests/main.nf.test.snap b/modules/nf-core/ribotish/predict/tests/main.nf.test.snap index 7716ecd2526f..30d6c5e21793 100644 --- a/modules/nf-core/ribotish/predict/tests/main.nf.test.snap +++ b/modules/nf-core/ribotish/predict/tests/main.nf.test.snap @@ -1,17 +1,5 @@ { - "versions_single_end_multi_ribo_bam_stub": { - "content": [ - [ - "versions.yml:md5,48e727a11954fb4c3de5a0eb2576951c" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-04T11:28:24.897805" - }, - "transprofile_single_end_single_ribo_bam_stub": { + "sarscov2 [bam] - single_end - single ribo bam - stub": { "content": [ [ [ @@ -20,18 +8,9 @@ "single_end": true, "strandedness": "forward" }, - "test_transprofile.py:md5,d41d8cd98f00b204e9800998ecf8427e" + "test_pred.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-04T11:27:04.019058" - }, - "transprofile_single_end_multi_ribo_bam_stub": { - "content": [ + ], [ [ { @@ -39,18 +18,9 @@ "single_end": true, "strandedness": "forward" }, - "test_transprofile.py:md5,d41d8cd98f00b204e9800998ecf8427e" + "test_all.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-04T11:28:24.874123" - }, - "all_single_end_single_ribo_bam_stub": { - "content": [ + ], [ [ { @@ -58,41 +28,26 @@ "single_end": true, "strandedness": "forward" }, - "test_all.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + "test_transprofile.py:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-04T11:27:04.007006" - }, - "versions_single_end_single_ribo_bam_stub": { - "content": [ - [ - "versions.yml:md5,48e727a11954fb4c3de5a0eb2576951c" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-04T11:27:04.031448" - }, - "versions_single_end_multi_ribo_bam": { - "content": [ - [ - "versions.yml:md5,48e727a11954fb4c3de5a0eb2576951c" - ] + ], + { + "versions_ribotish": [ + [ + "RIBOTISH_PREDICT", + "ribotish", + "0.2.8" + ] + ] + } ], + "timestamp": "2026-05-19T10:03:51.7008198", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-04T09:47:34.863391" + "nf-test": "0.9.5", + "nextflow": "26.04.1" + } }, - "transprofile_single_end_single_ribo_bam": { + "sarscov2 [bam] - single_end - multi ribo bam - stub": { "content": [ [ [ @@ -101,18 +56,9 @@ "single_end": true, "strandedness": "forward" }, - "test_transprofile.py:md5,3e6aaa9ec9f3346ae8c838da2d415924" + "test_pred.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-14T12:20:15.166081" - }, - "all_single_end_multi_ribo_bam_stub": { - "content": [ + ], [ [ { @@ -122,28 +68,7 @@ }, "test_all.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-04T11:28:24.849804" - }, - "versions_single_end_single_ribo_bam": { - "content": [ - [ - "versions.yml:md5,48e727a11954fb4c3de5a0eb2576951c" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-04T09:46:34.409406" - }, - "transprofile_single_end_multi_ribo_bam": { - "content": [ + ], [ [ { @@ -151,17 +76,26 @@ "single_end": true, "strandedness": "forward" }, - "test_transprofile.py:md5,202a5b5983806e8d9f242c6157736357" + "test_transprofile.py:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + { + "versions_ribotish": [ + [ + "RIBOTISH_PREDICT", + "ribotish", + "0.2.8" + ] ] - ] + } ], + "timestamp": "2026-05-19T10:04:37.952263709", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-14T12:26:32.447969" + "nf-test": "0.9.5", + "nextflow": "26.04.1" + } }, - "predictions_single_end_multi_ribo_bam_stub": { + "sarscov2 [bam] - single_end - multi ribo bam": { "content": [ [ [ @@ -170,17 +104,26 @@ "single_end": true, "strandedness": "forward" }, - "test_pred.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + "test_transprofile.py:md5,202a5b5983806e8d9f242c6157736357" + ] + ], + { + "versions_ribotish": [ + [ + "RIBOTISH_PREDICT", + "ribotish", + "0.2.8" + ] ] - ] + } ], + "timestamp": "2026-05-19T10:04:30.097163994", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-04T11:28:24.825927" + "nf-test": "0.9.5", + "nextflow": "26.04.1" + } }, - "predictions_single_end_single_ribo_bam_stub": { + "sarscov2 [bam] - single_end - single ribo bam": { "content": [ [ [ @@ -189,14 +132,23 @@ "single_end": true, "strandedness": "forward" }, - "test_pred.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + "test_transprofile.py:md5,3e6aaa9ec9f3346ae8c838da2d415924" + ] + ], + { + "versions_ribotish": [ + [ + "RIBOTISH_PREDICT", + "ribotish", + "0.2.8" + ] ] - ] + } ], + "timestamp": "2026-05-19T10:03:43.377664597", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-04T11:27:03.99362" + "nf-test": "0.9.5", + "nextflow": "26.04.1" + } } } \ No newline at end of file