diff --git a/modules/nf-core/gstama/collapse/main.nf b/modules/nf-core/gstama/collapse/main.nf index beb982cb81d7..a3e5592f23d5 100644 --- a/modules/nf-core/gstama/collapse/main.nf +++ b/modules/nf-core/gstama/collapse/main.nf @@ -19,10 +19,9 @@ process GSTAMA_COLLAPSE { tuple val(meta), path("*_read.txt") , emit: read tuple val(meta), path("*_strand_check.txt") , emit: strand_check tuple val(meta), path("*_trans_report.txt") , emit: trans_report - path "versions.yml" , emit: versions - tuple val(meta), path("*_varcov.txt") , emit: varcov , optional: true tuple val(meta), path("*_variants.txt") , emit: variants, optional: true + tuple val("${task.process}"), val('gstama'), eval("tama_collapse.py -version | sed -n 's/tc_version_date_//p'"), emit: versions_gstama, topic: versions when: task.ext.when == null || task.ext.when @@ -32,14 +31,18 @@ process GSTAMA_COLLAPSE { def prefix = task.ext.prefix ?: "${meta.id}" """ tama_collapse.py \\ - -s $bam \\ - -f $fasta \\ + -s ${bam} \\ + -f ${fasta} \\ -p ${prefix} \\ - $args + ${args} + """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gstama: \$( tama_collapse.py -version | grep 'tc_version_date_'|sed 's/tc_version_date_//g' ) - END_VERSIONS + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + touch ${prefix}_{collapsed,trans_read}.bed + touch ${prefix}_{local_density_error,polya,read}.txt + touch ${prefix}_{strand_check,trans_report,varcov,variants}.txt """ } diff --git a/modules/nf-core/gstama/collapse/meta.yml b/modules/nf-core/gstama/collapse/meta.yml index 7c1c280c9150..ce21b6c5d10d 100644 --- a/modules/nf-core/gstama/collapse/meta.yml +++ b/modules/nf-core/gstama/collapse/meta.yml @@ -15,7 +15,8 @@ tools: documentation: https://github.com/GenomeRIK/tama/wiki tool_dev_url: https://github.com/sguizard/gs-tama doi: 10.1186/s12864-020-07123-7 - licence: ["GNU GPL3"] + licence: + - "GNU GPL3" identifier: "" input: - - meta: @@ -42,8 +43,8 @@ output: e.g. [ id:'test' ] - "*_collapsed.bed": type: file - description: a bed12 format file containing the final collapsed version of - your transcriptome + description: a bed12 format file containing the final collapsed version + of your transcriptome pattern: "*.bed" ontologies: [] bed_trans_reads: @@ -54,16 +55,16 @@ output: e.g. [ id:'test' ] - "*_trans_read.bed": type: file - description: This file uses bed12 format to show the transcript model for - each read based on the mapping prior to collapsing. This only contains the - reads which were accepted according to the defined thresholds. You can use - this file to see if there were any strange occurrences during collapsing. - It also contains the relationships between reads and collapsed transcript - models. The 1st subfield in the 4th column shows the final transcript ID - and the 2nd subfield in the 4th column shows the read ID. If you used no_cap - mode for collapsing there may be multiple lines for a single read. This - happens when a 5' degraded read can match to multiple 5' longer transcript - models. + description: This file uses bed12 format to show the transcript model + for each read based on the mapping prior to collapsing. This only + contains the reads which were accepted according to the defined + thresholds. You can use this file to see if there were any strange + occurrences during collapsing. It also contains the relationships + between reads and collapsed transcript models. The 1st subfield in the + 4th column shows the final transcript ID and the 2nd subfield in the + 4th column shows the read ID. If you used no_cap mode for collapsing + there may be multiple lines for a single read. This happens when a 5' + degraded read can match to multiple 5' longer transcript models. pattern: "*_trans_read.bed" ontologies: [] local_density_error: @@ -74,8 +75,8 @@ output: e.g. [ id:'test' ] - "*_local_density_error.txt": type: file - description: This file contains the log of filtering for local density error - around the splice junctions ("-lde") + description: This file contains the log of filtering for local density + error around the splice junctions ("-lde") pattern: "*_local_density_error.txt" ontologies: [] polya: @@ -86,7 +87,8 @@ output: e.g. [ id:'test' ] - "*_polya.txt": type: file - description: This file contains the reads with potential poly A truncation. + description: This file contains the reads with potential poly A + truncation. pattern: "*_polya.txt" ontologies: [] read: @@ -97,9 +99,9 @@ output: e.g. [ id:'test' ] - "*_read.txt": type: file - description: This file contains information for all mapped reads from the - input SAM/BAM file. It shows both accepted and discarded reads and should - match the number of mapped reads in your SAM/BAM file + description: This file contains information for all mapped reads from + the input SAM/BAM file. It shows both accepted and discarded reads and + should match the number of mapped reads in your SAM/BAM file pattern: "*_read.txt" ontologies: [] strand_check: @@ -110,8 +112,8 @@ output: e.g. [ id:'test' ] - "*_strand_check.txt": type: file - description: This file shows instances where the sam flag strand information - contrasted the GMAP strand information. + description: This file shows instances where the sam flag strand + information contrasted the GMAP strand information. pattern: "*_strand_check.txt" ontologies: [] trans_report: @@ -122,16 +124,10 @@ output: e.g. [ id:'test' ] - "*_trans_report.txt": type: file - description: This file contains collapsing information for each transcript. + description: This file contains collapsing information for each + transcript. pattern: "*_trans_report.txt" ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML varcov: - - meta: type: map @@ -140,8 +136,8 @@ output: e.g. [ id:'test' ] - "*_varcov.txt": type: file - description: This file contains the coverage information for each variant - detected. + description: This file contains the coverage information for each + variant detected. pattern: "*_varcov.txt" ontologies: [] variants: @@ -152,11 +148,33 @@ output: e.g. [ id:'test' ] - "*_variants.txt": type: file - description: This file contains the variants called. Variants are only called - if 5 or more reads show the variant at a specific locus. If you would like - to change the threshold, please make an issue about this in the Github repo. + description: This file contains the variants called. Variants are only + called if 5 or more reads show the variant at a specific locus. If you + would like to change the threshold, please make an issue about this in + the Github repo. pattern: "*_variants.txt" ontologies: [] + versions_gstama: + - - ${task.process}: + type: string + description: The name of the process + - gstama: + type: string + description: The name of the tool + - tama_collapse.py -version | sed -n 's/tc_version_date_//p': + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - gstama: + type: string + description: The name of the tool + - tama_collapse.py -version | sed -n 's/tc_version_date_//p': + type: eval + description: The expression to obtain the version of the tool authors: - "@sguizard" maintainers: diff --git a/modules/nf-core/gstama/collapse/tests/main.nf.test b/modules/nf-core/gstama/collapse/tests/main.nf.test index 0306f827ee32..9adc6fdbbcfa 100644 --- a/modules/nf-core/gstama/collapse/tests/main.nf.test +++ b/modules/nf-core/gstama/collapse/tests/main.nf.test @@ -17,11 +17,32 @@ nextflow_process { process { """ input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam', checkIfExists: true) - ] - input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome2.fasta', checkIfExists: true) + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam', checkIfExists: true) + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome2.fasta', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } + test("test-gstama-collapse -- stub") { + options "-stub" + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam', checkIfExists: true) + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome2.fasta', checkIfExists: true) """ } } @@ -29,19 +50,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.bed, - process.out.bed_trans_reads, - file(process.out.local_density_error[0][1]).readLines()[3..7], - file(process.out.polya[0][1]).readLines()[0], - file(process.out.read[0][1]).readLines()[3..7], - file(process.out.strand_check[0][1]).readLines()[0], - file(process.out.trans_report[0][1]).readLines()[3..7], - file(process.out.varcov[0][1]).readLines()[3..7], - file(process.out.variants[0][1]).readLines()[3..7], - process.out.versions - ).match() - } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } diff --git a/modules/nf-core/gstama/collapse/tests/main.nf.test.snap b/modules/nf-core/gstama/collapse/tests/main.nf.test.snap index 276e1a9f62c3..53773b2d1ebd 100644 --- a/modules/nf-core/gstama/collapse/tests/main.nf.test.snap +++ b/modules/nf-core/gstama/collapse/tests/main.nf.test.snap @@ -1,67 +1,182 @@ { - "test-gstama-collapse": { + "test-gstama-collapse -- stub": { "content": [ - [ - [ - { - "id": "test" - }, - "test_tc_collapsed.bed:md5,e5105198ed970a33ae0ecaa7bff421d9" + { + "bed": [ + [ + { + "id": "test" + }, + "test_tc_collapsed.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bed_trans_reads": [ + [ + { + "id": "test" + }, + "test_tc_trans_read.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "local_density_error": [ + [ + { + "id": "test" + }, + "test_tc_local_density_error.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "polya": [ + [ + { + "id": "test" + }, + "test_tc_polya.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "read": [ + [ + { + "id": "test" + }, + "test_tc_read.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "strand_check": [ + [ + { + "id": "test" + }, + "test_tc_strand_check.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "trans_report": [ + [ + { + "id": "test" + }, + "test_tc_trans_report.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "varcov": [ + [ + { + "id": "test" + }, + "test_tc_varcov.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "variants": [ + [ + { + "id": "test" + }, + "test_tc_variants.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_gstama": [ + [ + "GSTAMA_COLLAPSE", + "gstama", + "2021_11_03" + ] ] - ], - [ - [ - { - "id": "test" - }, - "test_tc_trans_read.bed:md5,0ca1a32f33ef05242d897d913802554b" + } + ], + "timestamp": "2026-05-11T22:55:53.631912293", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } + }, + "test-gstama-collapse": { + "content": [ + { + "bed": [ + [ + { + "id": "test" + }, + "test_tc_collapsed.bed:md5,e5105198ed970a33ae0ecaa7bff421d9" + ] + ], + "bed_trans_reads": [ + [ + { + "id": "test" + }, + "test_tc_trans_read.bed:md5,0ca1a32f33ef05242d897d913802554b" + ] + ], + "local_density_error": [ + [ + { + "id": "test" + }, + "test_tc_local_density_error.txt:md5,b917ac1f14eccd590b6881a686f324d5" + ] + ], + "polya": [ + [ + { + "id": "test" + }, + "test_tc_polya.txt:md5,628ea62b918fc4f31e109f724d714a66" + ] + ], + "read": [ + [ + { + "id": "test" + }, + "test_tc_read.txt:md5,d2685d7f24cd1611e0770a5ce25422fe" + ] + ], + "strand_check": [ + [ + { + "id": "test" + }, + "test_tc_strand_check.txt:md5,42cc52b2660b1e0b84e1c9ab37a965ec" + ] + ], + "trans_report": [ + [ + { + "id": "test" + }, + "test_tc_trans_report.txt:md5,33a86c15ca2acce36b2a5962f4c1adc4" + ] + ], + "varcov": [ + [ + { + "id": "test" + }, + "test_tc_varcov.txt:md5,587fd899ff658eb66b1770a35283bfcb" + ] + ], + "variants": [ + [ + { + "id": "test" + }, + "test_tc_variants.txt:md5,5b1165e9f33faba4f7207013fc27257e" + ] + ], + "versions_gstama": [ + [ + "GSTAMA_COLLAPSE", + "gstama", + "2021_11_03" + ] ] - ], - [ - "m64014_190506_005857/1180161/ccs\tlde_pass\tchr22:16600000-16800000\t61141\t63656\t+\t1\t0\tna\tna\tna\tna\t1S23=1X5=2X4=1I4=3I7=1X6=1X2=1X3=1X1=2X9=1X1=1X18=1X14=1X8=1X35=1X10=1X16=1X2=1X15=1X11=1X21=1X10=1X31=1X16=1X5=1X9=1X8=1X7=1X12=2X13=2X32=1X7=1X8=1X1=1X1=1X7=1X8=1X3=1X4=1X1=1X12=1X5=1X10=1X5=2X4=2X17=1X9=1X1=1X4=1X2=1X19=1X3=1X1=1X7=2X3=1X7=1X9=1X3=1X3=1X17=1X8=1X1=1X8=1X17=1X6=1X17=1I5=1X10=1X33=1I5=1X5=1X46=1X35=1X9=1X18=1X3=1X15=2X16=1X85=1X2=1X21=1X15=1X68=1X64=1X66=1X26=1X25=1X5=1X11=2X53=1X23=1X1=1X4=1X10=1X17=1X11=1X17=1X12=1I2=1X29=1X3=1X16=1X50=1X9=1X9=1X1=1X9=1X3=1X74=1X4=1X2=1X3=1X7=1X2=1X11=1X4=1X1=1X51=2X18=1X36=1X53=3X84=1X22=1X30=1I52=1X24=1X19=1X22=2X5=1D1X8=1X16=1X6=1X4=1X13=1X27=1X77=1X51=1X47=1X31=1X18=1X25=1X14=1X34=1X6=19S", - "m64014_190506_005857/3868236/ccs\tlde_pass\tchr22:16600000-16800000\t62643\t66258\t+\t1\t0\tna\tna\tna\tna\t34=1X1=1X9=1X9=1X8=1X39=4D38=1X7=1X3=1X10=1X16=1X1=1X14=1X13=1X11=1X10=2X4=1X13=1X36=1X10=1X42=1X17=1X36=1X37=1X16=1X30=1I24=1X14=1X12=1X67=1X1=1D1=1X2=1D9=1X23=1X18=1X27=1X77=1X7=4D31=1X26=1X29=1X27=1X20=1X1=1X40=4D27=1X8=1X12=2X4=1X2=1X3=1X4=2X28=1X9=1X54=1X55=1X6=1X5=1X21=1X12=1X1=1X2=1X16=1X10=1X6=1X79=1X38=1X34=1X5=1X17=1X11=1X5=1X9=1X12=1X42=1X1=1X25=2X25=1X39=1X1=1X19=1X20=1X3=1X9=1X6=2X3=1X18=1X17=1X18=1X12=1X5=1X53=1X11=1X18=1X2=3D16=1X11=1I20=1X12=1X13=1X10=1X3=1X31=1X12=1X7=2X17=1X18=1X9=4D23=1X13=1X1=1X32=1X37=1X17=3X5=1X58=1X15=1X24=1X44=1I46=2X40=1X4=2I1X2=1X32=1X11=1X16=1X40=1X99=1X1=1X14=1X20=1X40=1X2=1X3=1X3=1X44=1X28=1X35=1X72=1X7=1X21=1X16=1X22=1X25=4D24=1X16=1X23=1X6=1X1=1X5=1X10=3D11=1X5=1X21=1X10=1X9=1X2=2I22=1X29=1X19=1X27=1X37=1X20=1X61=1X8=1X16=1X26=1X6=2X21=1X10=1X26=1X77=1X5=1X3=2X5=25S", - "m64014_190506_005857/1050667/ccs\tlde_pass\tchr22:16600000-16800000\t168385\t199436\t+\t2\t0\t0>0\t0,0,0,0,0>0,0,0,0,0\t0>0\t__________>__________\t16=1X20=1X19=1X58=1X40=1X7=1X12=1X2=1X41=1X93=1X48=1X5=1X4=1X40=1X10=1X27=2X25=1X2=1X4=1X24=1X7=2X14=1X52=1X5=1X6=2X8=1X21=1X4=1X35=1X40=1X75=1X3=1X21=1X20=1X23=2X31=1X19=1X27=1X3=1X52=1X40=1X10=1X28=1X34=1X33=1X26=1X13=1X56=2X31=2X11=1X94=1X41=1X1=1X20=1X32=1X10=1X64=1X4=1X39=2X6=2X15=1X63=1X28=1X34=1X33=1X7=1X3=1X17=1X20=1X47=1X7=2X11=1X2=1X5=1X6=1X41=1X7=1X77=1X14=1X35=1X14=1X32=1X52=1I10=1X30=1X9=1X36=1X2=1X66=1X4=1X38=1X5=1X12=1X19=1X75=1X26=2D11=1X20=1X3=1X1=1X14=1X20=1X7=1X14=1X24=1X2=1X25=1X4=1X81=1X15=1X15=1X27=2X17=28149N22=9S", - "m64014_190506_005857/6294364/ccs\tlde_pass\tchr22:16600000-16800000\t168536\t199436\t+\t2\t0\t1>0\t0,0,1,0,0>0,0,0,0,0\t4.T.A_3M>0\t_____X____>__________\t6=1X7=1X2=1X8=1D3=1X14=1X23=1X2=1X4=1X35=1X11=1X40=1X6=1X41=1X2=1X59=1X23=1X3=2X16=1X8=1X7=1X33=1X38=8I1=2I28=1X5=1X3=1X2=1X9=1X19=1X1=1X4=1X35=1X9=1X29=5D20=2D16=1X8=1X3=1X20=1X24=1X45=2X4=1I27=1X19=2X26=1X2=1X94=1X4=1X5=1X12=1X15=1X7=1X6=1X19=1X20=1X9=1I3=2X25=1X5=1X7=1X42=1X17=1X29=1X11=1X79=1X14=1X10=1X30=1X1=1X43=1X2=1X6=1X30=1I45=1X1=1I32=1X11=1X6=1X12=1X3=1X63=1X63=1X41=1X20=1X16=1I5=1X32=1I9=1X5=1X1=1I6=2X11=1X2=1X11=4D38=2X22=1X46=1X1=1I40=1X24=1X29=1X25=1X23=2X17=1X3=1X7=1X31=1X3=1X4=1X36=1X10=1X31=1D17=1X8=1X4=1X38=1X1=2X1=2X9=1X2=1X95=1X22=9D33=1X1=1X14=1X20=1X22=1X8=1X44=1X4=1X41=1X55=2X12=1X30=1X3=28161N24=7S", - "m64014_190506_005857/9307762/ccs\tlde_pass\tchr22:16600000-16800000\t169225\t199436\t+\t2\t0\t0>3\t0,0,0,0,0>2,0,1,0,0\t0>2M_2.A.C_1M_2I\t__________>__X_II____\t3S4=1X23=3X26=1X3=1X19=1X27=1X14=1X30=1X10=1X40=1X10=1X1=1X26=1X5=1X28=1X60=1X7=1X5=1X6=1X50=1X32=1X11=1X41=1X52=1X41=1X1=1X20=1X32=1X10=1X17=1X51=1X40=1X6=1X16=1X43=1X19=1X37=1X8=1X11=1X4=1X33=1X7=1X34=1X4=1X2=1X47=1X7=2X11=1X2=1X5=1X6=1X26=1X14=1X9=1X23=1X12=1X27=1X10=1X28=1X8=1X8=1X3=1X47=1X16=1X16=1X28=1X31=1X4=1X3=1X36=1X2=1X36=1X29=1X4=1X37=2X1=2X2=1X12=1X19=1X75=1X26=2D11=1X8=1X15=1X1=1X14=1X18=1X1=1X7=1X14=1X22=1X30=1X4=1X15=1X9=1X71=2X25=1X17=1X17=1X17=1X28=4D21=1X8=1X16=1X140=1X43=1X51=1X14=1X11=1X17=2X15=1X24=1X25=1X7=1X2=1X8=1X5=1X4=1X15=1X11=1X18=1D42=1X19=1X5=1X7=1X15=9D5=4D18=1X3=1X4=1X17=1X7=1X1=1X17=1X7=1X11=1X4=1X4=1X14=1X11=1X8=1X2=1X4=1X11=1X13=1X10=1X8=1X17=27297N2=1X1=2I22=8S" - ], - "cluster_id\ttrans_id\tstrand\ta_percent\ta_count\tsequence", - [ - "m64014_190506_005857/13631523/ccs\tchimeric\tchimeric\tNA\tNA\tNA\tNA\tNA", - "m64014_190506_005857/13238379/ccs\tforward_strand\tdiscarded\t7.53\t6.24\t0;3600;8;2;40\t3893\t2807S12=1X2=1D2=2X5=1X7=2X5=2I2=5I1X6=1X6=1X17=2X6=1X7=1X2=1X6=1X1=1X9=2X7=1X3=1X6=2X7=1X1=1X3=3030N1=2X12=1X17=2X4=1I7=1X5=1X8=1X25=1X5=1X2=1D8=1X12=1X1=2X9=2X7=793S", - "m64014_190506_005857/5048548/ccs\tnot_primary\tnot_primary\tNA\tNA\tNA\tNA\tNA", - "m64014_190506_005857/2491688/ccs\tchimeric\tchimeric\tNA\tNA\tNA\tNA\tNA", - "m64014_190506_005857/10945888/ccs\tnot_primary\tnot_primary\tNA\tNA\tNA\tNA\tNA" - ], - "read_id\tscaff_name\tstart_pos\tcigar\tstrands", - [ - "G1.3\t1\t99.21\t99.21\t92.96\t92.96\t0\t0\t0\t0\tna", - "G1.4\t1\t99.31\t99.31\t93.56\t93.56\t0\t0\t0\t0\tna", - "G1.5\t1\t99.69\t99.69\t95.46\t95.46\t0,0\t0,0\t0,0\t0,0\t0>0", - "G1.6\t1\t99.74\t99.74\t93.58\t93.58\t0,0\t0,0\t0,0\t0,0\t4.T.A_3M>0", - "G1.7\t1\t99.62\t99.62\t93.7\t93.7\t0,0\t0,0\t0,0\t0,0\t0>2M_2.A.C_1M_2I" - ], - [ - "chr22:16600000-16800000_6225\tm64014_190506_005857/11141276/ccs,m64014_190506_005857/13501955/ccs,m64014_190506_005857/13633438/ccs,m64014_190506_005857/6228265/ccs,m64014_190506_005857/7211438/ccs,m64014_190506_005857/8258125/ccs,m64014_190506_005857/9045622/ccs,m64014_190506_005857/9896837/ccs", - "chr22:16600000-16800000_6234\tm64014_190506_005857/10945789/ccs,m64014_190506_005857/11403968/ccs,m64014_190506_005857/13043967/ccs,m64014_190506_005857/13633438/ccs,m64014_190506_005857/6228265/ccs,m64014_190506_005857/9045622/ccs,m64014_190506_005857/9896837/ccs", - "chr22:16600000-16800000_6244\tm64014_190506_005857/10945789/ccs,m64014_190506_005857/11141276/ccs,m64014_190506_005857/11403968/ccs,m64014_190506_005857/13043967/ccs,m64014_190506_005857/13501955/ccs,m64014_190506_005857/13633438/ccs,m64014_190506_005857/3735911/ccs,m64014_190506_005857/6228265/ccs,m64014_190506_005857/8258125/ccs,m64014_190506_005857/8586246/ccs,m64014_190506_005857/9045622/ccs,m64014_190506_005857/9896837/ccs", - "chr22:16600000-16800000_6255\tm64014_190506_005857/11403968/ccs,m64014_190506_005857/13043967/ccs,m64014_190506_005857/13633438/ccs,m64014_190506_005857/3735911/ccs,m64014_190506_005857/7538257/ccs,m64014_190506_005857/8586246/ccs,m64014_190506_005857/9896837/ccs", - "chr22:16600000-16800000_6256\tm64014_190506_005857/11403968/ccs,m64014_190506_005857/13043967/ccs,m64014_190506_005857/13501955/ccs,m64014_190506_005857/13633438/ccs,m64014_190506_005857/3735911/ccs,m64014_190506_005857/7538257/ccs,m64014_190506_005857/8586246/ccs,m64014_190506_005857/9896837/ccs" - ], - [ - "chr22:16600000-16800000\t6225\tM\tT\tC\t8\t8\tm64014_190506_005857/9045622/ccs,m64014_190506_005857/8258125/ccs,m64014_190506_005857/11141276/ccs,m64014_190506_005857/6228265/ccs,m64014_190506_005857/9896837/ccs,m64014_190506_005857/13633438/ccs,m64014_190506_005857/7211438/ccs,m64014_190506_005857/13501955/ccs", - "chr22:16600000-16800000\t6234\tM\tG\tA\t5\t7\tm64014_190506_005857/9896837/ccs,m64014_190506_005857/6228265/ccs,m64014_190506_005857/13633438/ccs,m64014_190506_005857/13043967/ccs,m64014_190506_005857/9045622/ccs", - "chr22:16600000-16800000\t6244\tM\tC\tG\t11\t12\tm64014_190506_005857/9045622/ccs,m64014_190506_005857/8586246/ccs,m64014_190506_005857/11141276/ccs,m64014_190506_005857/6228265/ccs,m64014_190506_005857/13043967/ccs,m64014_190506_005857/9896837/ccs,m64014_190506_005857/13633438/ccs,m64014_190506_005857/8258125/ccs,m64014_190506_005857/10945789/ccs,m64014_190506_005857/3735911/ccs,m64014_190506_005857/13501955/ccs", - "chr22:16600000-16800000\t6255\tM\tT\tC\t7\t7\tm64014_190506_005857/7538257/ccs,m64014_190506_005857/8586246/ccs,m64014_190506_005857/13633438/ccs,m64014_190506_005857/11403968/ccs,m64014_190506_005857/9896837/ccs,m64014_190506_005857/13043967/ccs,m64014_190506_005857/3735911/ccs", - "chr22:16600000-16800000\t6256\tM\tG\tA\t7\t8\tm64014_190506_005857/7538257/ccs,m64014_190506_005857/8586246/ccs,m64014_190506_005857/13633438/ccs,m64014_190506_005857/11403968/ccs,m64014_190506_005857/9896837/ccs,m64014_190506_005857/13043967/ccs,m64014_190506_005857/3735911/ccs" - ], - [ - "versions.yml:md5,e78d77df56e6434d307e702b7875d005" - ] + } ], + "timestamp": "2026-05-11T22:57:16.945475905", "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-26T10:53:08.268377" + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } } } \ No newline at end of file diff --git a/modules/nf-core/gstama/merge/main.nf b/modules/nf-core/gstama/merge/main.nf index 9ddf2b4520a1..563e2ce41fe7 100644 --- a/modules/nf-core/gstama/merge/main.nf +++ b/modules/nf-core/gstama/merge/main.nf @@ -16,7 +16,7 @@ process GSTAMA_MERGE { tuple val(meta), path("*_gene_report.txt") , emit: gene_report tuple val(meta), path("*_merge.txt") , emit: merge tuple val(meta), path("*_trans_report.txt"), emit: trans_report - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('gstama'), eval("tama_merge.py -version | sed '1!d'"), emit: versions_gstama, topic: versions when: task.ext.when == null || task.ext.when @@ -26,14 +26,16 @@ process GSTAMA_MERGE { def prefix = task.ext.prefix ?: "${meta.id}" """ tama_merge.py \\ - -f $filelist \\ + -f ${filelist} \\ -d merge_dup \\ -p ${prefix} \\ - $args + ${args} + """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gstama: \$( tama_merge.py -version | head -n1 ) - END_VERSIONS + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bed + touch ${prefix}_{gene_report,merge,trans_report}.txt """ } diff --git a/modules/nf-core/gstama/merge/meta.yml b/modules/nf-core/gstama/merge/meta.yml index ccd9b982c13d..694ad12a46ee 100644 --- a/modules/nf-core/gstama/merge/meta.yml +++ b/modules/nf-core/gstama/merge/meta.yml @@ -16,7 +16,8 @@ tools: documentation: https://github.com/GenomeRIK/tama/wiki tool_dev_url: https://github.com/sguizard/gs-tama doi: "10.1186/s12864-020-07123-7" - licence: ["GPL v3 License"] + licence: + - "GPL v3 License" identifier: "" input: - - meta: @@ -42,11 +43,12 @@ output: e.g. [ id:'test' ] - "*.bed": type: file - description: This is the main merged annotation file. Transcripts are coloured - according to the source support for each model. Sources are numbered based - on the order supplied in the input filelist file. For example the first - file named in the filelist file would have its transcripts coloured in red. - If a transcript has multiple sources the colour is shown as magenta. + description: This is the main merged annotation file. Transcripts are + coloured according to the source support for each model. Sources are + numbered based on the order supplied in the input filelist file. For + example the first file named in the filelist file would have its + transcripts coloured in red. If a transcript has multiple sources the + colour is shown as magenta. pattern: "*.bed" ontologies: [] gene_report: @@ -57,10 +59,10 @@ output: e.g. [ id:'test' ] - "*_gene_report.txt": type: file - description: This contains a report of the genes from the merged file. "num_clusters" - refers to the number of source transcripts that were used to make this gene - model. "num_final_trans" refers to the number of transcripts in the final - gene model. + description: This contains a report of the genes from the merged file. + "num_clusters" refers to the number of source transcripts that were + used to make this gene model. "num_final_trans" refers to the number + of transcripts in the final gene model. pattern: "*_gene_report.txt" ontologies: [] merge: @@ -71,13 +73,14 @@ output: e.g. [ id:'test' ] - "*_merge.txt": type: file - description: This contains a bed12 format file which shows the coordinates - of each input transcript matched to the merged transcript ID. I used the - "txt" extension even though it is a bed file just to avoid confusion with - the main bed file. You can use this file to map the final merged transcript - models to their pre-merged supporting transcripts. The 1st subfield in the - 4th column shows the final merged transcript ID while the 2nd subfield shows - the pre-merged transcript ID with source prefix. + description: This contains a bed12 format file which shows the + coordinates of each input transcript matched to the merged transcript + ID. I used the "txt" extension even though it is a bed file just to + avoid confusion with the main bed file. You can use this file to map + the final merged transcript models to their pre-merged supporting + transcripts. The 1st subfield in the 4th column shows the final merged + transcript ID while the 2nd subfield shows the pre-merged transcript + ID with source prefix. pattern: "*_merge.txt" ontologies: [] trans_report: @@ -88,16 +91,31 @@ output: e.g. [ id:'test' ] - "*_trans_report.txt": type: file - description: This contains the source information for each merged transcript. + description: This contains the source information for each merged + transcript. pattern: "*_trans_report.txt" ontologies: [] + versions_gstama: + - - ${task.process}: + type: string + description: The name of the process + - gstama: + type: string + description: The name of the tool + - tama_merge.py -version | sed '1!d': + 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 + - gstama: + type: string + description: The name of the tool + - tama_merge.py -version | sed '1!d': + type: eval + description: The expression to obtain the version of the tool authors: - "@sguizard" maintainers: diff --git a/modules/nf-core/gstama/merge/tests/main.nf.test b/modules/nf-core/gstama/merge/tests/main.nf.test index c485d3eaafa5..1741417cb142 100644 --- a/modules/nf-core/gstama/merge/tests/main.nf.test +++ b/modules/nf-core/gstama/merge/tests/main.nf.test @@ -4,7 +4,6 @@ nextflow_process { name "Test Process GSTAMA_MERGE" script "../main.nf" process "GSTAMA_MERGE" - config "./nextflow.config" tag "modules" tag "modules_nfcore" @@ -17,14 +16,38 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.bed', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.2.bed', checkIfExists: true) - ] + [ id:'test_all' ], + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.bed', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.2.bed', checkIfExists: true) + ] ] - input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/txt/filelist.txt', checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/txt/filelist.txt', checkIfExists: true) + """ + } + } + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } + + test("test-gstama-merge -- stub") { + options "-stub" + when { + process { + """ + input[0] = [ + [ id:'test_all' ], + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.bed', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.2.bed', checkIfExists: true) + ] + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/txt/filelist.txt', checkIfExists: true) """ } } @@ -32,14 +55,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.bed, - file(process.out.gene_report[0][1]).readLines()[3..7], - file(process.out.merge[0][1]).readLines()[3..7], - file(process.out.trans_report[0][1]).readLines()[3..7], - process.out.versions - ).match() - } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } diff --git a/modules/nf-core/gstama/merge/tests/main.nf.test.snap b/modules/nf-core/gstama/merge/tests/main.nf.test.snap index 0ac82c39e0f1..856f083edb67 100644 --- a/modules/nf-core/gstama/merge/tests/main.nf.test.snap +++ b/modules/nf-core/gstama/merge/tests/main.nf.test.snap @@ -1,44 +1,102 @@ { + "test-gstama-merge -- stub": { + "content": [ + { + "bed": [ + [ + { + "id": "test_all" + }, + "test_all.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "gene_report": [ + [ + { + "id": "test_all" + }, + "test_all_gene_report.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "merge": [ + [ + { + "id": "test_all" + }, + "test_all_merge.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "trans_report": [ + [ + { + "id": "test_all" + }, + "test_all_trans_report.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_gstama": [ + [ + "GSTAMA_MERGE", + "gstama", + "0.0.1" + ] + ] + } + ], + "timestamp": "2026-05-11T23:14:32.80541933", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } + }, "test-gstama-merge": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test_merged.bed:md5,60ec34e1ff9655d4ce2e83d3f4bbf448" + { + "bed": [ + [ + { + "id": "test_all" + }, + "test_all.bed:md5,60ec34e1ff9655d4ce2e83d3f4bbf448" + ] + ], + "gene_report": [ + [ + { + "id": "test_all" + }, + "test_all_gene_report.txt:md5,7029fd183dfd905a233403cfbe44722a" + ] + ], + "merge": [ + [ + { + "id": "test_all" + }, + "test_all_merge.txt:md5,4279e59ed5739ce4f2f811568962893f" + ] + ], + "trans_report": [ + [ + { + "id": "test_all" + }, + "test_all_trans_report.txt:md5,97d8346d9eb9da140941656c3a3325cd" + ] + ], + "versions_gstama": [ + [ + "GSTAMA_MERGE", + "gstama", + "0.0.1" + ] ] - ], - [ - "G3\t1\t1\tGM2\t22\t16154707\t16159526\tGM2_G2\tGM2:1", - "G4\t1\t1\tGM2\t22\t19520556\t19524409\tGM2_G3\tGM2:1", - "G5\t3\t3\tGM2\t22\t20675820\t20834631\tGM2_G4\tGM2:1", - "G6\t1\t1\tGM2\t22\t21927942\t21952850\tGM2_G5\tGM2:1", - "G7\t1\t1\tGM2\t22\t23226655\t23231517\tGM2_G6\tGM2:1" - ], - [ - "22\t11867751\t11883593\tG2.1;GM2_G1.1\t40\t+\t11867751\t11883593\t255,0,0\t5\t2147,85,29,73,1326\t0,6089,8352,8472,14516", - "22\t16154707\t16159526\tG3.1;GM2_G2.1\t40\t+\t16154707\t16159526\t255,0,0\t1\t4819\t0", - "22\t19520556\t19524409\tG4.1;GM2_G3.1\t40\t-\t19520556\t19524409\t255,0,0\t1\t3853\t0", - "22\t20675820\t20726523\tG5.1;GM2_G4.1\t40\t-\t20675820\t20726523\t255,0,0\t15\t22,399,84,90,160,121,126,105,110,71,73,71,130,121,36\t0,31879,33475,34087,34878,35520,36665,36872,37460,38637,38807,41887,42872,45477,50667", - "22\t20707690\t20834631\tG5.2;GM2_G4.2\t40\t-\t20707690\t20834631\t255,0,0\t53\t408,84,90,160,121,126,105,110,71,73,71,130,121,54,168,91,194,80,120,128,108,152,159,128,157,93,120,90,84,82,125,71,83,134,137,109,51,169,104,184,96,133,130,101,192,97,66,149,67,260,73,89,70\t0,1605,2217,3008,3650,4795,5002,5590,6767,6937,10017,11002,13607,18797,19539,20083,21622,21941,22201,25280,26045,26352,26704,34537,34917,36937,39892,42214,43602,43983,45212,45419,53613,57126,57409,57894,85502,88455,90893,91402,91980,94282,95500,96609,97283,99671,103276,105667,110792,111950,112848,116635,126871" - ], - [ - "G1.3\t1\tGM1\t0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\t0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\tGM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2\tGM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2;GM1_G1.2\tGM1_G1.2", - "G2.1\t1\tGM2\t0,0,0,0,0\t0,0,0,0,0\tGM2_G1.1;GM2_G1.1;GM2_G1.1;GM2_G1.1;GM2_G1.1\tGM2_G1.1;GM2_G1.1;GM2_G1.1;GM2_G1.1;GM2_G1.1\tGM2_G1.1", - "G3.1\t1\tGM2\t0\t0\tGM2_G2.1\tGM2_G2.1\tGM2_G2.1", - "G4.1\t1\tGM2\t0\t0\tGM2_G3.1\tGM2_G3.1\tGM2_G3.1", - "G5.1\t1\tGM2\t0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\t0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\tGM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1\tGM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1;GM2_G4.1\tGM2_G4.1" - ], - [ - "versions.yml:md5,ceaccf17d15e3fabb193d67b4a822d08" - ] + } ], + "timestamp": "2026-05-11T23:14:24.624282272", "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-26T10:46:55.890773" + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } } } \ No newline at end of file diff --git a/modules/nf-core/gstama/merge/tests/nextflow.config b/modules/nf-core/gstama/merge/tests/nextflow.config deleted file mode 100644 index 02d0a81e0d33..000000000000 --- a/modules/nf-core/gstama/merge/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: GSTAMA_MERGE { - ext.prefix = { "${meta.id}_merged" } - } -} diff --git a/modules/nf-core/gstama/polyacleanup/main.nf b/modules/nf-core/gstama/polyacleanup/main.nf index ba6341df68db..61b98b076544 100644 --- a/modules/nf-core/gstama/polyacleanup/main.nf +++ b/modules/nf-core/gstama/polyacleanup/main.nf @@ -11,10 +11,10 @@ process GSTAMA_POLYACLEANUP { tuple val(meta), path(fasta) output: - tuple val(meta), path("*_tama.fa.gz") , emit: fasta - tuple val(meta), path("*_tama_polya_flnc_report.txt.gz"), emit: report - tuple val(meta), path("*_tama_tails.fa.gz") , emit: tails - path "versions.yml" , emit: versions + tuple val(meta), path("*.fa.gz") , emit: fasta + tuple val(meta), path("*_polya_flnc_report.txt.gz"), emit: report + tuple val(meta), path("*_tails.fa.gz") , emit: tails + tuple val("${task.process}"), val('gstama'), eval("tama_collapse.py -version | sed -n 's/tc_version_date_//p'"), emit: versions_gstama, topic: versions when: task.ext.when == null || task.ext.when @@ -31,10 +31,13 @@ process GSTAMA_POLYACLEANUP { gzip ${prefix}.fa gzip ${prefix}_polya_flnc_report.txt gzip ${prefix}_tails.fa + """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gstama: \$( tama_collapse.py -version | grep 'tc_version_date_'|sed 's/tc_version_date_//g' ) - END_VERSIONS + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + echo "" | gzip > ${prefix}.fa.gz + echo "" | gzip > ${prefix}_polya_flnc_report.txt.gz + echo "" | gzip > ${prefix}_tails.fa.gz """ } diff --git a/modules/nf-core/gstama/polyacleanup/meta.yml b/modules/nf-core/gstama/polyacleanup/meta.yml index f7287619931c..598c4be6029d 100644 --- a/modules/nf-core/gstama/polyacleanup/meta.yml +++ b/modules/nf-core/gstama/polyacleanup/meta.yml @@ -1,6 +1,6 @@ name: gstama_polyacleanup -description: Helper script, remove remaining polyA sequences from Full Length Non - Chimeric reads (Pacbio isoseq3) +description: Helper script, remove remaining polyA sequences from Full Length + Non Chimeric reads (Pacbio isoseq3) keywords: - gstama - gstama/polyacleanup @@ -16,7 +16,8 @@ tools: documentation: https://github.com/GenomeRIK/tama/wiki tool_dev_url: https://github.com/sguizard/gs-tama doi: "10.1186/s12864-020-07123-7" - licence: ["GPL v3 License"] + licence: + - "GPL v3 License" identifier: "" input: - - meta: @@ -36,45 +37,59 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*_tama.fa.gz": + - "*.fa.gz": type: file - description: The Full Length Non Chimeric reads cleaned from remaining polyA - tails. The sequences are in FASTA format compressed with gzip. - pattern: "*_tama.fa.gz" + description: The Full Length Non Chimeric reads cleaned from remaining + polyA tails. The sequences are in FASTA format compressed with gzip. + pattern: "*.fa.gz" ontologies: - - edam: http://edamontology.org/format_3989 # GZIP format + - edam: http://edamontology.org/format_3989 # GZIP report: - - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*_tama_polya_flnc_report.txt.gz": + - "*_polya_flnc_report.txt.gz": type: file - description: A text file describing the number of polyA tails removed and - their length. Compressed with gzip. - pattern: "*_tama_polya_flnc_report.txt.gz" + description: A text file describing the number of polyA tails removed + and their length. Compressed with gzip. + pattern: "*_polya_flnc_report.txt.gz" ontologies: - - edam: http://edamontology.org/format_3989 # GZIP format + - edam: http://edamontology.org/format_3989 # GZIP tails: - - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*_tama_tails.fa.gz": + - "*_tails.fa.gz": type: file description: A gzip compressed FASTA file of trimmed polyA tails. - pattern: "*_tama_tails.fa.gz" + pattern: "*_tails.fa.gz" ontologies: - - edam: http://edamontology.org/format_3989 # GZIP format + - edam: http://edamontology.org/format_3989 # GZIP + versions_gstama: + - - ${task.process}: + type: string + description: The name of the process + - gstama: + type: string + description: The name of the tool + - tama_collapse.py -version | sed -n 's/tc_version_date_//p': + 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 + - gstama: + type: string + description: The name of the tool + - tama_collapse.py -version | sed -n 's/tc_version_date_//p': + type: eval + description: The expression to obtain the version of the tool authors: - "@sguizard" maintainers: diff --git a/modules/nf-core/gstama/polyacleanup/tests/main.nf.test b/modules/nf-core/gstama/polyacleanup/tests/main.nf.test index c447f001dc01..6296b104343c 100644 --- a/modules/nf-core/gstama/polyacleanup/tests/main.nf.test +++ b/modules/nf-core/gstama/polyacleanup/tests/main.nf.test @@ -4,7 +4,6 @@ nextflow_process { name "Test Process GSTAMA_POLYACLEANUP" script "../main.nf" process "GSTAMA_POLYACLEANUP" - config "./nextflow.config" tag "modules" tag "modules_nfcore" @@ -17,10 +16,30 @@ nextflow_process { process { """ input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/transcriptome.fasta', checkIfExists: true) - ] + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/transcriptome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } + test("test-gstama-polyacleanup -- stub") { + options "-stub" + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/transcriptome.fasta', checkIfExists: true) + ] """ } } @@ -28,13 +47,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - path(process.out.report[0][1]).linesGzip[0..2], - path(process.out.fasta[0][1]).linesGzip[3..7], - path(process.out.tails[0][1]).linesGzip[3..7], - process.out.versions - ).match() - } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } diff --git a/modules/nf-core/gstama/polyacleanup/tests/main.nf.test.snap b/modules/nf-core/gstama/polyacleanup/tests/main.nf.test.snap index a9cc2aefef18..e2227103f00d 100644 --- a/modules/nf-core/gstama/polyacleanup/tests/main.nf.test.snap +++ b/modules/nf-core/gstama/polyacleanup/tests/main.nf.test.snap @@ -1,33 +1,92 @@ { "test-gstama-polyacleanup": { "content": [ - [ - "polya_num\tpolya_num_count", - "0\t11", - "1\t1" - ], - [ - "GGAAGCACTTTTTTCCTGTATAGCAAAATGAGTTCAAGATATTCTTTGCCTAATTTCAGCTCTAGCTAGAACCAGTCAATATGGAAATAAACAATGAGGGTATCTAACCTACTGAACACTGAACCATCAGCCTAACTCTATGCAATATAGTCATACTAAAATATTTCTCATAAAAAAGTTCTTAACAGTTCGTTCACTATATCTTTCACGCAGTTATTTTATAGAATAAGCAAAGTAGGGCATGTGAAACACTTTAGCTTAGCTTCTAGCATCCAGTAGCGGTGCTCAAAAATGTTAGATCATTTATGTAACAATCTGCTAGGTTATAACATTCAGTGAGCCTTGGTACTTTTCATTGAACAGCTGGTATAGAGGCTAGGGATAGGGAGCTGCAGTTCATTTTCCATGCCCCTACCCGAGTTCTCTTGGCTAAATGTGATACGCATTTAAGGCCCAGAACCTGCTGTTTAAAAGGTTGTGGTAAACTATTTTGTATACCAAAGACTTCTCTGTAATAAAGTATGTAAGTACACATGAACATTTTATATGCACGCACATTTTAAATCATCTGCACATTGAGATTCTACACTTTTCTCAAGGGCACATCTCTATTCCGTTTCTTTGTAAATTTGACTTCTACCTAACAATATGCAATTGCTGGGATTTTTTTCCCTAACAGTATGAAAGTTGTCTTTAAATAGTAAAAGCACCACAATCTATTAACACCACATGTTATCTTTAAACTGAAATATTTTAGTGATGTCTTGGACATCAAAATAATTTCTTAAGGTGGACTCTTGAGTATGTGGGTCCAGCCCAGGTCTGCAGTTTGTGCAGACATAGAAAAAAGAGGAACTTTAAATATTCAGAAAAAGTTAACAGGCTAGCTTTAAAATACTGCTGGAAATTAAATTTCTTCAGAGTTGGCAAGCATGGGCTATTGATCAAAATATGAATTAAACGGATTTACATCATTAAGAAAAAAACAAATCCATGTTATTGTGCTGTGAAATTTCCATGATGCCTTTCAAATAGGCTGCTCACAAATTTTTTTATAATTCTAAATCACTCGCTTTTTGATGGAAAAAAGAATACAGATGGACTGTGTTTTACCTATGTGAAAGTCACCAATCCATTTAAAATAAAATCCAAGAGGGCATATACAGTCTAATCAAGTCATCATTTTCCTGATTAATAAGAACTACACTTTACACAAAATACTTTATCAGCAGCTGTTTTCATCAAAAAATCAGTAGTCAGTTTCACAGTTGAAAAAGTTACACATTAAAATATTTTACAATTCATTATATATTCACCAGGTTCCCATTTTCTAAGGGGCTTTTAATATAAAGCAGAATAGAACACTGTCTCTACTAAAAATACAAAAATTAGCTGGGAGTGGTGGCATGCTCCTATAGTCCTAGCTACTCAGGAGGCTGAGGTGGGAGGATGGCTTGAACCCAGGAGGTCAAGGCTGCAGTGAGCCGAAATTGCACCACTGCATTCCAGGCCGGGCAAAAGAGCCAGACCCTGTCTCAAAAAAAAAAGTTTACATTGTATTTCCTACTCTTAGTTACACTAAGCTAGACAGCAGATGACTAGAGGGTGTGATATATTTACTGAGTGACTCGAAATCCATTTTAAACTTGGAAATGTAAAAACTAACTTCTTTCCACTCATTTTCAGGGTCATTACTGAGAGATAATAAATGACAGAATAAGGAAATAATCACTGTAAATACTTAGGGACCTGAATAAGAGAAAGGAAGGGAAAGTAAAGGGATCTAACATTTATTGGGCACCTTCTGTGTTCCAAGGATTGTGATAGGTTCTTTGCATATCTCATGTAATTTAATTCTCACAATGGCCTTACGAAGCAGGTATTATTCCCATTTTACAGACAAAGAAAATGAGTCTTGAGAGCCTGCATAACGTGTCTAACACTACACAGATGAGAGGCAGTGGAACTTGGTTCCAAATCCTAATCTGCTTGATTCCAAGGACCATGATCTGTATATACACTGGGCTTCTAAACAACTCTGCCCCACTGCAGTGAAAAGAGTCTCAAACACAGACTAGAGTCACACAACTTTTGTGTTTCATCCTTCTTCTCCTGTTTGACAATGTCAGTTAAGTTAATGAGCTTTTCCATTGCCTCGACTTGCCTATTCAGGTGCTTCAAATACATCCCACATGCACGACAATAGGACTCCAAAAGCAGGCCAAACCTCTGGCTAAGTGTTTTATTGTGCATCTCAGATCTAAAAGAATCATGCAAAATTAGAAAAATATATATATAGTCTTAAATCAGTATACAAATAATCTTTGCTAAACAATTTAAACACTCATTTTTGAAATCCAATAAATGTTACAATCATACTAATAATAACATTATTCAAAACCTGTAATTTAGAAGCAAAACCACCATGAGTTTCAGGTAGTTCCTGAATATGTGATTAAATAAACATCTAGTTTTTAGGTTTATTTCAACTAGTTTTCATTGACTAATCTCAGTACAAGATATAAAAGCATGAAAAAAGGAAATTGAGCACAAAAATAATCAAATGAAGAGGGAGGGAACAAAGCGCTCAGTGAATGCTGTTTGACTCTTCTGACACACGTCTACGCTTCTTGTTTTCAACTTAACTTCTGGGTTCCATTTTTAAATTTTAACACTTAAAATATCATATTAGATATAAATCTGTTTCTAAATTTATGAAAAGTTATATGGTTTATGACCTGTAACTTTTGAGTACTGCATATATCACATTCTACAAAACATTTTTTATTCTTAATTAGCTTGTTTTTCAGTAAGAACCACGGGAGTTTGACATTATTGTTCTGAATCTCAAGGTAAAACATTTTTTTTCTTTTTTTGGGGATATTTTAATCCATACACACAGTGAAACCTACAGCAATATTCATCTGGACCTAGAAAATTTTACTTAAGTAGAACAAAAATCTTTAAAAATATTTAAGCTCTCATTCATGACTGAAATTTAGTTTTGAATTTATTACTTTTTAAATTTCAAAGAGCAAAAGTTGAGAAGCTCATCACTGGTACAAAATAGTTTTAGTATGGAAAACTCTTCCAGCCAAACATAAACAAAAGTATATAAGTAATACATATTTATAAATCTATTAAGAAAGCAAGTAATATGTACCTTAAGAATTTAATGGGAAAATAATTAGACTTACTTTAAATGCCAAAAGAAAAAGTGCCCAATCCTTTGATTAGTCAATGCTTTCTTCAGTAAAAATCTCACAAGCAAGTTATCCAAATATTGTTCATATTTTAGGACCTAGGTGATTCAAAAAAAACAAATCAGGTTCAGTTTCTGCATGGCCGATCTAAAGAAAATTTTTTCAGAAAGAAAGTGGATATTACTG", - ">ENST00000472972", - "AACCTACTGAACACTGAACCATCAGCCTAACTCTATGCAATATAGTCATACTAAAATATTTCTCATAAAAAAGTTCTTAACAGTTCGTTCACTATATCTTTCACGCAGTTATTTTATAGAATAAGCAAAGTAGGGCATGTGAAACACTTTAGCTTAGCTTCTAGCATCCAGTAGCGGTGCTCAAAAATGTTAGATCATTTATGTAACAATCTGCTAGGTTATAACATTCAGTGAGCCTTGGTACTTTTCATTGAACAGCTGGTATAGAGGCTAGGGATAGGGAGCTGCAGTTCATTTTCCATGCCCC", - ">ENST00000359963 CDS=261-1934", - "TTTCTTTAAATAAAAACATGAAGGAACATAAAATTTCTTTTCATGCGCTTAGTTCCTTTCCAGTTCTCGACTTTTTTTGTTTTTTTTTTTTGAGAGACGGAGTCTTGCTCTGTTGCCCAGGCTGGTGTGCAGTGGCGTGATCTTGGCTCACTGCAACCTCCGCCTCCCAGGTTCAAGCGATTTTCCTGCCTCAGCCTCCTGAATAGCTGGGACTACAGGTGCGCGCCACCACGCCCAGCTATTTTTTGTATTTTTAGTAGAGACGGGGTTTCACCATATTGACCAGGCTGGTCTCGAACTCCTGACCTCATGATCCTCCCGCCTCAGCCTCCCAAAGTGCTGGGATTACAGGCGAGAGCCACTGTGCCCAGCCAGTTCTTGACCTTTTCATTTTGTGTTTCTATCAGATGCTCTTCCTTTCCTATGATAAGAGCAGGATTCAATTCTATTAAGATTTTTAAACTGAGTACCTATGTGGGCTTTGGGCGTGCAAAACACAGTGCAGCAATCTCTTCCCAACTATTTGAGCATTCCCTGCATGATATTCTGACATATATGGACTTATGTCTAGATGTCACTTTAGGAGTCTGAAAACATCAGTTGCAGCTTACAAGAGTGGTCAGTCCTTCCTGTTGTGGTTATTTGAAAAAAAAGAAGGGACTATCATCTTAAAGCACAGAGAGAGAGAGAGAGCAGGAGAAAGAGCTGCTGTGGTGGCAGGCAGAAATGTAACTTAAAAAGAAAAAAATCCTTGCCTGGCAAAGTGGCTCATGCCTATAATTCCTGCACTTTGGGAGGCTGAGACAGGAAGATCGCTTGAGTCCAGGAGTTCAAGACTAGCCTGGACAACATAGTGAGACCCTATCTCTACAAAAATAAAAATTAAAAAAAATTAGCCAGGCATGGGCCGGGCATGGTGGCTCAAGCCTTTAATCCCAGCACTTTGGGAGCCCAAGGTGGGTGGATCAGCTGAGGTCAGGAGTTCAAGACCAGCCTGGCCAACGTGGAGAAACCCCATCTCTACTAAAAATACAAAACAGTAGCCGGATGTGATGGCACATGCCTGTAATCCCAGCTATTTGAGAGGCTGAGGCAGGAGAATTGCTTGAACCTGGGAGGCAGAGGTTGTGGTGAGCTGAGATGACACTATTGTACCCCAGCCTGGGCAACAAGAGCAAAACTCTGCCTCAAAAAAAAAAAAAAAAAAAAAAATTAGCCAGGCGTGGTGATGCATACCTGTAGTCCCAGCTACTCAGGAGGCTGAGTGGGGGGATCACTTAAGCCCAGGAGATCGAGGTTGCAGTGAGCTGTGATTGTGCCACTGCACTCCAGCCTAAGAGACAGAGCAAGACCCTGTCTCAACAAAACAAAACAAAACCAGCAAACATCCTTGGCATAGATAACAGAAGATAAGAACACATACTTTAGGACTATACTAAGGTTGCTGTGTAGGTGAGGAGAAAGCTGAGGGTAGGGGGAAGGGCTAGGATTGGACAACCTTGGGCATTAAAGAAGGGGTTTGAGCAGAGCTGAGTGGGTTTGGCACCTAATACGCAAAGCTTTTTCCACTTTTTTAACTTCCAAGTTACTCTAGGAAAAATCAGAACCTATGGGACAGAATCTAGGAGATGAGAAGGTACAATCTTTTAGAATCATAAAAATAAAAAAGCTTTAGGCATATGCAGAGAGAATGAGACTCAAGAAACCATTGTCTTATAGCACGCATATTAGCCGCAACACAGCAAAACAAAATTTTATTTATTTATTTATTTATTTTGAGACAGAGTCTTGCTCTGTCACCCAGGCATAGTGACTGGTGTGGCCCAGGCACCAGTGCAGCAGTGCAGTCTCAGCTCACTGCAACCTCTGCCTCCTGGGCTCAAATGATTCTCCTGCCTCAGCCTCCTGAGTAGCTGGGACTACAGGTGTCCACCACCATGCCTGGCTAATTTTTGTATTTTTAGTAGAGACGGGGTTTCGCCATGTTGGTCAGGGTGGTCTCAAACTTTGGACCTCAGGTGATCCACCTGCCTCGGCCTCCCCAAATGCTGAGATTACAG" - ], - [ - "", - ">tail_ENST00000472972", - "", - ">tail_ENST00000359963 CDS=261-1934", - "" - ], - [ - "versions.yml:md5,dff6214a93a250748705dbd8ec455fec" - ] + { + "fasta": [ + [ + { + "id": "test" + }, + [ + "test.fa.gz:md5,f0a2c3ca8f19d2197c6b5b273093ebf0", + "test_tails.fa.gz:md5,20a02db3d29cc45b39880e1ad5ee243b" + ] + ] + ], + "report": [ + [ + { + "id": "test" + }, + "test_polya_flnc_report.txt.gz:md5,83ba9d11a59ff516f45dd45c78613206" + ] + ], + "tails": [ + [ + { + "id": "test" + }, + "test_tails.fa.gz:md5,20a02db3d29cc45b39880e1ad5ee243b" + ] + ], + "versions_gstama": [ + [ + "GSTAMA_POLYACLEANUP", + "gstama", + "2021_11_03" + ] + ] + } ], + "timestamp": "2026-05-11T23:18:48.341014322", "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-26T10:44:18.309783" + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } + }, + "test-gstama-polyacleanup -- stub": { + "content": [ + { + "fasta": [ + [ + { + "id": "test" + }, + [ + "test.fa.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_tails.fa.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "report": [ + [ + { + "id": "test" + }, + "test_polya_flnc_report.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "tails": [ + [ + { + "id": "test" + }, + "test_tails.fa.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions_gstama": [ + [ + "GSTAMA_POLYACLEANUP", + "gstama", + "2021_11_03" + ] + ] + } + ], + "timestamp": "2026-05-11T23:18:56.653882224", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } } } \ No newline at end of file diff --git a/modules/nf-core/gstama/polyacleanup/tests/nextflow.config b/modules/nf-core/gstama/polyacleanup/tests/nextflow.config deleted file mode 100644 index 0ffcbb55a356..000000000000 --- a/modules/nf-core/gstama/polyacleanup/tests/nextflow.config +++ /dev/null @@ -1,3 +0,0 @@ -process { - ext.prefix = { "${meta.id}_tama" } -}