From 858cd5dfb1367ae3058dc4acfdf24aafdbb978b7 Mon Sep 17 00:00:00 2001 From: maxulysse Date: Fri, 21 Jun 2024 11:41:29 +0200 Subject: [PATCH 1/4] add stub for local/deseq2_qc --- modules/local/deseq2_qc/main.nf | 27 ++++++ modules/local/deseq2_qc/tests/main.nf.test | 25 ++++- .../local/deseq2_qc/tests/main.nf.test.snap | 92 ++++++++++++++++++- 3 files changed, 137 insertions(+), 7 deletions(-) diff --git a/modules/local/deseq2_qc/main.nf b/modules/local/deseq2_qc/main.nf index 7be6836f6..7ff5877bb 100644 --- a/modules/local/deseq2_qc/main.nf +++ b/modules/local/deseq2_qc/main.nf @@ -57,4 +57,31 @@ process DESEQ2_QC { bioconductor-deseq2: \$(Rscript -e "library(DESeq2); cat(as.character(packageVersion('DESeq2')))") END_VERSIONS """ + + stub: + def args2 = task.ext.args2 ?: '' + def label_lower = args2.toLowerCase() + prefix = task.ext.prefix ?: "deseq2" + """ + mkdir size_factors + touch ${label_lower}.pca.vals_mqc.tsv + touch ${label_lower}.sample.dists_mqc.tsv + touch ${prefix}.plots.pdf + touch ${prefix}.dds.RData + touch ${prefix}.pca.vals.txt + touch ${prefix}.sample.dists.txt + touch R_sessionInfo.log + touch size_factors/${prefix}.size_factors.RData + + for i in `head $counts -n 1 | cut -f3-`; + do + touch size_factors/\${i}.size_factors.RData + done + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') + bioconductor-deseq2: \$(Rscript -e "library(DESeq2); cat(as.character(packageVersion('DESeq2')))") + END_VERSIONS + """ } diff --git a/modules/local/deseq2_qc/tests/main.nf.test b/modules/local/deseq2_qc/tests/main.nf.test index f9319edab..a9d35997d 100644 --- a/modules/local/deseq2_qc/tests/main.nf.test +++ b/modules/local/deseq2_qc/tests/main.nf.test @@ -26,11 +26,32 @@ nextflow_process { process.out.pca_multiqc, process.out.pca_txt, process.out.rdata, - process.out.size_factors + process.out.size_factors, + process.out.versions ).match() } ) } - } + test("parse count data correctly - stub") { + + options "-stub" + + when { + process { + """ + input[0] = file(params.pipelines_testdata_base_path + "deseq2qc/countFile.tsv", checkIfExists: true) + input[1] = file(params.pipelines_testdata_base_path + "deseq2qc/deseq2_pca_header.txt", checkIfExists: true) + input[2] = file(params.pipelines_testdata_base_path + "deseq2qc/deseq2_clustering_header.txt", checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } } diff --git a/modules/local/deseq2_qc/tests/main.nf.test.snap b/modules/local/deseq2_qc/tests/main.nf.test.snap index 865b8d5b8..1c6bc7105 100644 --- a/modules/local/deseq2_qc/tests/main.nf.test.snap +++ b/modules/local/deseq2_qc/tests/main.nf.test.snap @@ -1,8 +1,87 @@ { + "parse count data correctly - stub": { + "content": [ + { + "0": [ + "deseq2.plots.pdf:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "1": [ + "deseq2.dds.RData:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "2": [ + "deseq2.pca.vals.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "3": [ + + ], + "4": [ + "deseq2.sample.dists.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "5": [ + + ], + "6": [ + "R_sessionInfo.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "7": [ + [ + "RAP1_IAA_30M_REP1.size_factors.RData:md5,d41d8cd98f00b204e9800998ecf8427e", + "RAP1_UNINDUCED_REP1.size_factors.RData:md5,d41d8cd98f00b204e9800998ecf8427e", + "RAP1_UNINDUCED_REP2.size_factors.RData:md5,d41d8cd98f00b204e9800998ecf8427e", + "WT_REP1.size_factors.RData:md5,d41d8cd98f00b204e9800998ecf8427e", + "WT_REP2.size_factors.RData:md5,d41d8cd98f00b204e9800998ecf8427e", + "deseq2.size_factors.RData:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "8": [ + "versions.yml:md5,60f8e4f473397a4b5d1a3dc490c93ec5" + ], + "dists_multiqc": [ + + ], + "dists_txt": [ + "deseq2.sample.dists.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "log": [ + "R_sessionInfo.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "pca_multiqc": [ + + ], + "pca_txt": [ + "deseq2.pca.vals.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "pdf": [ + "deseq2.plots.pdf:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "rdata": [ + "deseq2.dds.RData:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "size_factors": [ + [ + "RAP1_IAA_30M_REP1.size_factors.RData:md5,d41d8cd98f00b204e9800998ecf8427e", + "RAP1_UNINDUCED_REP1.size_factors.RData:md5,d41d8cd98f00b204e9800998ecf8427e", + "RAP1_UNINDUCED_REP2.size_factors.RData:md5,d41d8cd98f00b204e9800998ecf8427e", + "WT_REP1.size_factors.RData:md5,d41d8cd98f00b204e9800998ecf8427e", + "WT_REP2.size_factors.RData:md5,d41d8cd98f00b204e9800998ecf8427e", + "deseq2.size_factors.RData:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,60f8e4f473397a4b5d1a3dc490c93ec5" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-21T11:38:08.92794" + }, "parse count data correctly": { "content": [ [ - + ], [ "deseq2.sample.dists.txt:md5,1616ce40eb58ee75640efed219c6bbec" @@ -11,7 +90,7 @@ "R_sessionInfo.log:md5,fb0da0d7ad6994ed66a8e68348b19676" ], [ - + ], [ "deseq2.pca.vals.txt:md5,4cda8e32ec39326c1350e77b4b607aad" @@ -28,12 +107,15 @@ "WT_REP2.txt:md5,2ce093f2c2e92c1bde1cd3da91ac884c", "deseq2.size_factors.RData:md5,51c6643a0f8a9edabbff8df0165451f2" ] + ], + [ + "versions.yml:md5,60f8e4f473397a4b5d1a3dc490c93ec5" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-07T12:34:51.582179" + "timestamp": "2024-06-21T11:21:20.349616" } -} \ No newline at end of file +} From 451483ba1463f88e7e3eba96e3d82d4faf228c6e Mon Sep 17 00:00:00 2001 From: maxulysse Date: Fri, 21 Jun 2024 12:12:20 +0200 Subject: [PATCH 2/4] add stubs for all + test for most --- modules/local/gtf2bed/main.nf | 10 ++++ modules/local/gtf2bed/tests/main.nf.test | 19 +++++++ modules/local/gtf2bed/tests/main.nf.test.snap | 23 +++++++++ modules/local/gtf_filter/main.nf | 10 ++++ modules/local/gtf_filter/tests/main.nf.test | 23 ++++++++- .../local/gtf_filter/tests/main.nf.test.snap | 29 +++++++++-- modules/local/multiqc_custom_biotype/main.nf | 12 +++++ .../multiqc_custom_biotype/tests/main.nf.test | 26 +++++++++- .../tests/main.nf.test.snap | 39 ++++++++++++++ .../main.nf | 12 +++++ .../tests/main.nf.test | 28 +++++++++- .../tests/main.nf.test.snap | 23 +++++++++ modules/local/rsem_merge_counts/main.nf | 13 +++++ .../rsem_merge_counts/tests/main.nf.test | 35 +++++++++++-- .../rsem_merge_counts/tests/main.nf.test.snap | 41 +++++++++++++++ .../star_genomegenerate_igenomes/main.nf | 51 ++++++++++++++++++- 16 files changed, 383 insertions(+), 11 deletions(-) diff --git a/modules/local/gtf2bed/main.nf b/modules/local/gtf2bed/main.nf index 464d7f819..a2523c9cf 100644 --- a/modules/local/gtf2bed/main.nf +++ b/modules/local/gtf2bed/main.nf @@ -28,4 +28,14 @@ process GTF2BED { perl: \$(echo \$(perl --version 2>&1) | sed 's/.*v\\(.*\\)) built.*/\\1/') END_VERSIONS """ + + stub: + """ + touch ${gtf.baseName}.bed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + perl: \$(echo \$(perl --version 2>&1) | sed 's/.*v\\(.*\\)) built.*/\\1/') + END_VERSIONS + """ } diff --git a/modules/local/gtf2bed/tests/main.nf.test b/modules/local/gtf2bed/tests/main.nf.test index 698714f8b..b640d2053 100644 --- a/modules/local/gtf2bed/tests/main.nf.test +++ b/modules/local/gtf2bed/tests/main.nf.test @@ -20,6 +20,25 @@ nextflow_process { { assert snapshot(process.out).match() } ) } + } + + test("sarscov2 - bam - stub") { + + options "-stub" + when { + process { + """ + input[0] = file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gtf", checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } } } diff --git a/modules/local/gtf2bed/tests/main.nf.test.snap b/modules/local/gtf2bed/tests/main.nf.test.snap index 277ebdc23..66ec3bf9e 100644 --- a/modules/local/gtf2bed/tests/main.nf.test.snap +++ b/modules/local/gtf2bed/tests/main.nf.test.snap @@ -1,4 +1,27 @@ { + "sarscov2 - bam - stub": { + "content": [ + { + "0": [ + "genome.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "1": [ + "versions.yml:md5,d04d815c224b980b6f3818d4b2fd4fe3" + ], + "bed": [ + "genome.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "versions": [ + "versions.yml:md5,d04d815c224b980b6f3818d4b2fd4fe3" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-21T11:46:28.123826" + }, "sarscov2 - bam": { "content": [ { diff --git a/modules/local/gtf_filter/main.nf b/modules/local/gtf_filter/main.nf index 39b215712..60eb9a9bd 100644 --- a/modules/local/gtf_filter/main.nf +++ b/modules/local/gtf_filter/main.nf @@ -29,4 +29,14 @@ process GTF_FILTER { python: \$(python --version | sed 's/Python //g') END_VERSIONS """ + + stub: + """ + touch ${fasta.baseName}.filtered.gtf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + python: \$(python --version | sed 's/Python //g') + END_VERSIONS + """ } diff --git a/modules/local/gtf_filter/tests/main.nf.test b/modules/local/gtf_filter/tests/main.nf.test index 31044be1a..324ee6bb9 100644 --- a/modules/local/gtf_filter/tests/main.nf.test +++ b/modules/local/gtf_filter/tests/main.nf.test @@ -4,7 +4,7 @@ nextflow_process { script "../main.nf" process "GTF_FILTER" - test("Should run without failures") { + test("sarscov2 - fasta - gtf") { when { process { @@ -21,7 +21,26 @@ nextflow_process { { assert snapshot(process.out).match() } ) } - } + test("sarscov2 - fasta - gtf - stub") { + + options "-stub" + + when { + process { + """ + input[0] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gtf', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } } diff --git a/modules/local/gtf_filter/tests/main.nf.test.snap b/modules/local/gtf_filter/tests/main.nf.test.snap index b763c249c..d22a4fa5b 100644 --- a/modules/local/gtf_filter/tests/main.nf.test.snap +++ b/modules/local/gtf_filter/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "Should run without failures": { + "sarscov2 - fasta - gtf": { "content": [ { "0": [ @@ -18,8 +18,31 @@ ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-06T15:52:37.977802" + "timestamp": "2024-06-21T11:47:56.314297" + }, + "sarscov2 - fasta - gtf - stub": { + "content": [ + { + "0": [ + "genome.filtered.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "1": [ + "versions.yml:md5,4adf55ec05d247fd6d253459bd80856f" + ], + "genome_gtf": [ + "genome.filtered.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "versions": [ + "versions.yml:md5,4adf55ec05d247fd6d253459bd80856f" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-21T11:48:19.085835" } } \ No newline at end of file diff --git a/modules/local/multiqc_custom_biotype/main.nf b/modules/local/multiqc_custom_biotype/main.nf index d102f67d9..a4b923c3e 100644 --- a/modules/local/multiqc_custom_biotype/main.nf +++ b/modules/local/multiqc_custom_biotype/main.nf @@ -33,4 +33,16 @@ process MULTIQC_CUSTOM_BIOTYPE { python: \$(python --version | sed 's/Python //g') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.biotype_counts_mqc.tsv + touch ${prefix}.biotype_counts_rrna_mqc.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + python: \$(python --version | sed 's/Python //g') + END_VERSIONS + """ } diff --git a/modules/local/multiqc_custom_biotype/tests/main.nf.test b/modules/local/multiqc_custom_biotype/tests/main.nf.test index 216f73336..bd6cde6bc 100644 --- a/modules/local/multiqc_custom_biotype/tests/main.nf.test +++ b/modules/local/multiqc_custom_biotype/tests/main.nf.test @@ -26,7 +26,31 @@ nextflow_process { { assert snapshot(process.out).match()} ) } - } + test("test sarscov2 count data - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of( + [ + [ id: 'test' ], + file(params.pipelines_testdata_base_path + 'multiqc_custom_biotype/test.featureCounts.txt', checkIfExists: true) + ] + ) + input[1] = file(params.pipelines_testdata_base_path + 'multiqc_custom_biotype/biotypes_header.txt', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success}, + { assert snapshot(process.out).match()} + ) + } + } } diff --git a/modules/local/multiqc_custom_biotype/tests/main.nf.test.snap b/modules/local/multiqc_custom_biotype/tests/main.nf.test.snap index ae559097b..ff9420015 100644 --- a/modules/local/multiqc_custom_biotype/tests/main.nf.test.snap +++ b/modules/local/multiqc_custom_biotype/tests/main.nf.test.snap @@ -37,5 +37,44 @@ "nextflow": "24.01.0" }, "timestamp": "2024-03-08T09:38:04.260609" + }, + "test sarscov2 count data - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test.biotype_counts_mqc.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.biotype_counts_rrna_mqc.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,575b3b4c8a8a6e508c8ceeca41331b6b" + ], + "tsv": [ + [ + { + "id": "test" + }, + [ + "test.biotype_counts_mqc.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.biotype_counts_rrna_mqc.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,575b3b4c8a8a6e508c8ceeca41331b6b" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-21T11:50:15.104113" } } \ No newline at end of file diff --git a/modules/local/preprocess_transcripts_fasta_gencode/main.nf b/modules/local/preprocess_transcripts_fasta_gencode/main.nf index 9d530b77d..2722e66c7 100644 --- a/modules/local/preprocess_transcripts_fasta_gencode/main.nf +++ b/modules/local/preprocess_transcripts_fasta_gencode/main.nf @@ -28,4 +28,16 @@ process PREPROCESS_TRANSCRIPTS_FASTA_GENCODE { sed: \$(echo \$(sed --version 2>&1) | sed 's/^.*GNU sed) //; s/ .*\$//') END_VERSIONS """ + + stub: + def gzipped = fasta.toString().endsWith('.gz') + def outfile = gzipped ? file(fasta.baseName).baseName : fasta.baseName + """ + touch ${outfile}.fixed.fa + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sed: \$(echo \$(sed --version 2>&1) | sed 's/^.*GNU sed) //; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/local/preprocess_transcripts_fasta_gencode/tests/main.nf.test b/modules/local/preprocess_transcripts_fasta_gencode/tests/main.nf.test index 9585f8ae7..b07b4c001 100644 --- a/modules/local/preprocess_transcripts_fasta_gencode/tests/main.nf.test +++ b/modules/local/preprocess_transcripts_fasta_gencode/tests/main.nf.test @@ -28,7 +28,33 @@ nextflow_process { { assert snapshot(process.out).match() } ) } - } + test("gencode fasta - stub") { + + options "-stub" + + when { + process { + """ + def fileContents = [ + '>chr22|removeme', + 'ACTCAAGATAATGATGAGTAAAGAATATATTTCTAACAACAAAAAGGAAATTTGATAGTA' + ] + def gencodeFasta = file("${workDir}/gencodeFasta.fasta") + gencodeFasta.withWriter{ out -> + fileContents.each {out.println it} + } + input[0] = gencodeFasta + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } } diff --git a/modules/local/preprocess_transcripts_fasta_gencode/tests/main.nf.test.snap b/modules/local/preprocess_transcripts_fasta_gencode/tests/main.nf.test.snap index 8c0580686..eaef85b1b 100644 --- a/modules/local/preprocess_transcripts_fasta_gencode/tests/main.nf.test.snap +++ b/modules/local/preprocess_transcripts_fasta_gencode/tests/main.nf.test.snap @@ -21,5 +21,28 @@ "nextflow": "23.10.1" }, "timestamp": "2024-03-06T16:16:36.494744" + }, + "gencode fasta - stub": { + "content": [ + { + "0": [ + "gencodeFasta.fixed.fa:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "1": [ + "versions.yml:md5,e2c7f636c472887a914b128d1444737e" + ], + "fasta": [ + "gencodeFasta.fixed.fa:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "versions": [ + "versions.yml:md5,e2c7f636c472887a914b128d1444737e" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-21T11:54:20.291494" } } \ No newline at end of file diff --git a/modules/local/rsem_merge_counts/main.nf b/modules/local/rsem_merge_counts/main.nf index b21ca4aa4..c220e31de 100644 --- a/modules/local/rsem_merge_counts/main.nf +++ b/modules/local/rsem_merge_counts/main.nf @@ -52,4 +52,17 @@ process RSEM_MERGE_COUNTS { sed: \$(echo \$(sed --version 2>&1) | sed 's/^.*GNU sed) //; s/ .*\$//') END_VERSIONS """ + + stub: + """ + touch rsem.merged.gene_counts.tsv + touch rsem.merged.gene_tpm.tsv + touch rsem.merged.transcript_counts.tsv + touch rsem.merged.transcript_tpm.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sed: \$(echo \$(sed --version 2>&1) | sed 's/^.*GNU sed) //; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/local/rsem_merge_counts/tests/main.nf.test b/modules/local/rsem_merge_counts/tests/main.nf.test index 9bb1caeb2..61008082a 100644 --- a/modules/local/rsem_merge_counts/tests/main.nf.test +++ b/modules/local/rsem_merge_counts/tests/main.nf.test @@ -24,10 +24,39 @@ nextflow_process { } then { - assert process.success - assert snapshot(process.out).match() + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) } - } + test("stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + file(params.pipelines_testdata_base_path + "rsem_merge_counts/genes/RAP1_IAA_30M_REP1.genes.results", checkIfExists: true), + file(params.pipelines_testdata_base_path + "rsem_merge_counts/genes/RAP1_UNINDUCED_REP1.genes.results", checkIfExists: true), + file(params.pipelines_testdata_base_path + "rsem_merge_counts/genes/RAP1_UNINDUCED_REP2.genes.results", checkIfExists: true) + ]).collect() + input[1] = Channel.of([ + file(params.pipelines_testdata_base_path + "rsem_merge_counts/isoforms/RAP1_IAA_30M_REP1.isoforms.results", checkIfExists: true), + file(params.pipelines_testdata_base_path + "rsem_merge_counts/isoforms/RAP1_UNINDUCED_REP1.isoforms.results", checkIfExists: true), + file(params.pipelines_testdata_base_path + "rsem_merge_counts/isoforms/RAP1_UNINDUCED_REP2.isoforms.results", checkIfExists: true) + ]).collect() + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } } diff --git a/modules/local/rsem_merge_counts/tests/main.nf.test.snap b/modules/local/rsem_merge_counts/tests/main.nf.test.snap index 800263c1a..1715d1279 100644 --- a/modules/local/rsem_merge_counts/tests/main.nf.test.snap +++ b/modules/local/rsem_merge_counts/tests/main.nf.test.snap @@ -1,4 +1,45 @@ { + "stub": { + "content": [ + { + "0": [ + "rsem.merged.gene_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "1": [ + "rsem.merged.gene_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "2": [ + "rsem.merged.transcript_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "3": [ + "rsem.merged.transcript_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "4": [ + "versions.yml:md5,48ca3e12c91829af8019462b3f6aa29c" + ], + "counts_gene": [ + "rsem.merged.gene_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "counts_transcript": [ + "rsem.merged.transcript_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "tpm_gene": [ + "rsem.merged.gene_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "tpm_transcript": [ + "rsem.merged.transcript_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "versions": [ + "versions.yml:md5,48ca3e12c91829af8019462b3f6aa29c" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-21T11:55:29.45389" + }, "Should run without failures": { "content": [ { diff --git a/modules/local/star_genomegenerate_igenomes/main.nf b/modules/local/star_genomegenerate_igenomes/main.nf index 7b5115a6c..e36e04179 100644 --- a/modules/local/star_genomegenerate_igenomes/main.nf +++ b/modules/local/star_genomegenerate_igenomes/main.nf @@ -66,4 +66,53 @@ process STAR_GENOMEGENERATE_IGENOMES { END_VERSIONS """ } -} + + stub: + if (gtf) { + """ + mkdir star + touch star/Genome + touch star/Log.out + touch star/SA + touch star/SAindex + touch star/chrLength.txt + touch star/chrName.txt + touch star/chrNameLength.txt + touch star/chrStart.txt + touch star/exonGeTrInfo.tab + touch star/exonInfo.tab + touch star/geneInfo.tab + touch star/genomeParameters.txt + touch star/sjdbInfo.txt + touch star/sjdbList.fromGTF.out.tab + touch star/sjdbList.out.tab + touch star/transcriptInfo.tab + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + star: \$(STAR --version | sed -e "s/STAR_//g") + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') + END_VERSIONS + """ + } else { + """ + mkdir star + touch star/Genome + touch star/Log.out + touch star/SA + touch star/SAindex + touch star/chrLength.txt + touch star/chrName.txt + touch star/chrNameLength.txt + touch star/chrStart.txt + touch star/genomeParameters.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + star: \$(STAR --version | sed -e "s/STAR_//g") + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') + END_VERSIONS + """ + }} From 7af2a7fd7553096f28ae3e454d596ac9f5c0c2a1 Mon Sep 17 00:00:00 2001 From: Maxime U Garcia Date: Tue, 2 Jul 2024 15:47:53 +0200 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfeded678..086cc2b85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -95,6 +95,7 @@ Thank you to everyone else that has contributed by reporting bugs, enhancements - [PR #1326](https://github.com/nf-core/rnaseq/pull/1326) - Move Conda dependencies for local modules to individual environment file - [PR #1328](https://github.com/nf-core/rnaseq/pull/1328) - Add pipeline level test for STAR-RSEM and HISAT2 - [PR #1329](https://github.com/nf-core/rnaseq/pull/1329) - Remove tags from all nf-test files +- [PR #1331](https://github.com/nf-core/rnaseq/pull/1331) - Adding stubs for local modules ### Parameters From 7e9077e14c5aaef42e46a1e58f09463f07c69c86 Mon Sep 17 00:00:00 2001 From: maxulysse Date: Tue, 2 Jul 2024 16:52:43 +0200 Subject: [PATCH 4/4] update snaps --- .../tests/main.nf.test.snap | 8 +-- .../local/align_star/tests/main.nf.test.snap | 64 +++++++++---------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/modules/local/multiqc_custom_biotype/tests/main.nf.test.snap b/modules/local/multiqc_custom_biotype/tests/main.nf.test.snap index ff9420015..2fc5e4ab6 100644 --- a/modules/local/multiqc_custom_biotype/tests/main.nf.test.snap +++ b/modules/local/multiqc_custom_biotype/tests/main.nf.test.snap @@ -9,7 +9,7 @@ }, [ "test.biotype_counts_mqc.tsv:md5,d996f27aeec64370cade26717aa22e1e", - "test.biotype_counts_rrna_mqc.tsv:md5,405217e65a76b104b00bb41f6bf10a92" + "test.biotype_counts_rrna_mqc.tsv:md5,31c68d05ffe90d1e3eb2cb2ef9a7b4d9" ] ] ], @@ -23,7 +23,7 @@ }, [ "test.biotype_counts_mqc.tsv:md5,d996f27aeec64370cade26717aa22e1e", - "test.biotype_counts_rrna_mqc.tsv:md5,405217e65a76b104b00bb41f6bf10a92" + "test.biotype_counts_rrna_mqc.tsv:md5,31c68d05ffe90d1e3eb2cb2ef9a7b4d9" ] ] ], @@ -34,9 +34,9 @@ ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-08T09:38:04.260609" + "timestamp": "2024-07-02T16:48:24.844934" }, "test sarscov2 count data - stub": { "content": [ diff --git a/subworkflows/local/align_star/tests/main.nf.test.snap b/subworkflows/local/align_star/tests/main.nf.test.snap index 8cb85e980..33f4d772a 100644 --- a/subworkflows/local/align_star/tests/main.nf.test.snap +++ b/subworkflows/local/align_star/tests/main.nf.test.snap @@ -25,15 +25,15 @@ "id": "test", "single_end": false }, - "test.stats:md5,99fb9569a1b39fe38d7bd7d71daa8364" + "test.stats:md5,202e2f234f93b347b6a72d0163773054" ] ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-07T12:00:35.123236" + "timestamp": "2024-07-02T16:51:25.527796" }, "with igenomes - flagstat": { "content": [ @@ -91,15 +91,15 @@ "id": "test", "single_end": false }, - "test.stats:md5,99fb9569a1b39fe38d7bd7d71daa8364" + "test.stats:md5,202e2f234f93b347b6a72d0163773054" ] ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-07T11:59:42.539089" + "timestamp": "2024-07-02T16:50:30.406405" }, "with igenomes - bam_sorted": { "content": [ @@ -122,19 +122,19 @@ "without igenomes - versions": { "content": [ [ + "versions.yml:md5,06693106908e6f8f38a2c30accf7067d", "versions.yml:md5,35c1cc21d26d9d8f00e6ec87e97fb634", - "versions.yml:md5,c156b12646d8a51a4d59c42f8d833305", - "versions.yml:md5,d18a2907f84607859a6723fa33485378", - "versions.yml:md5,e902002dd55f6cca09ea62c9aa42ef0d", - "versions.yml:md5,f6b7635a2693b70fe6836c8e45ebba98", - "versions.yml:md5,f985768ea0cc88e2b533cc08538f3771" + "versions.yml:md5,369619588c8c294b74dca9058a151b11", + "versions.yml:md5,78069d4515b04251f758ac52a49d9971", + "versions.yml:md5,b6a22ef369a375445a8f9313721b8092", + "versions.yml:md5,feaf798d368c662a7a1cea87a24a7434" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-07T11:59:42.575417" + "timestamp": "2024-07-02T16:50:30.464346" }, "without igenomes - bam_transcript": { "content": [ @@ -215,19 +215,19 @@ "with igenomes - versions": { "content": [ [ - "versions.yml:md5,c156b12646d8a51a4d59c42f8d833305", - "versions.yml:md5,d18a2907f84607859a6723fa33485378", + "versions.yml:md5,06693106908e6f8f38a2c30accf7067d", + "versions.yml:md5,369619588c8c294b74dca9058a151b11", + "versions.yml:md5,78069d4515b04251f758ac52a49d9971", + "versions.yml:md5,b6a22ef369a375445a8f9313721b8092", "versions.yml:md5,e3b043ba840d5bddde92f0bf1c91a5fc", - "versions.yml:md5,e902002dd55f6cca09ea62c9aa42ef0d", - "versions.yml:md5,f6b7635a2693b70fe6836c8e45ebba98", - "versions.yml:md5,f985768ea0cc88e2b533cc08538f3771" + "versions.yml:md5,feaf798d368c662a7a1cea87a24a7434" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-07T12:00:35.173761" + "timestamp": "2024-07-02T16:51:25.579874" }, "with igenomes - log_progress": { "content": [ @@ -295,15 +295,15 @@ "id": "test", "single_end": false }, - "test.bam.bai:md5,25b78d2e41dc31350004b7ab9e5c3618" + "test.bam.bai:md5,8bfbd4094a92ac0de8492d98a471d1b0" ] ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-08T17:02:42.995047" + "timestamp": "2024-07-02T16:50:30.294108" }, "without igenomes - orig_bam": { "content": [ @@ -341,15 +341,15 @@ "id": "test", "single_end": false }, - "test.bam:md5,f75b29383d9c16a466ae22dc676b3022" + "test.bam:md5,e6573d093da6ec95f99c1669eb86bbd6" ] ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-08T17:02:43.076908" + "timestamp": "2024-07-02T16:50:30.348908" }, "with igenomes - orig_bam": { "content": [ @@ -413,15 +413,15 @@ "id": "test", "single_end": false }, - "test.bam:md5,37c080a0d854fffee57360f2176670a8" + "test.bam:md5,fc154c31eb4d034ebdb6b1d17c6b45eb" ] ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-08T17:03:38.323083" + "timestamp": "2024-07-02T16:51:25.474137" }, "without igenomes - bam_sorted": { "content": [ @@ -449,15 +449,15 @@ "id": "test", "single_end": false }, - "test.bam.bai:md5,25b78d2e41dc31350004b7ab9e5c3618" + "test.bam.bai:md5,8bfbd4094a92ac0de8492d98a471d1b0" ] ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nextflow": "24.04.2" }, - "timestamp": "2024-03-08T17:03:38.264526" + "timestamp": "2024-07-02T16:51:25.407812" }, "with igenomes - log_final": { "content": [