From 8c68e1dbf96cc1da23d2883496a2d3ca41db0b3a Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Fri, 8 Mar 2024 11:47:28 +0000 Subject: [PATCH] Some improvements but not working :( --- .../tests/main.nf.test | 56 ++++++++----------- 1 file changed, 23 insertions(+), 33 deletions(-) diff --git a/subworkflows/local/quantify_pseudo_alignment/tests/main.nf.test b/subworkflows/local/quantify_pseudo_alignment/tests/main.nf.test index e39aac852..bcd1129f2 100644 --- a/subworkflows/local/quantify_pseudo_alignment/tests/main.nf.test +++ b/subworkflows/local/quantify_pseudo_alignment/tests/main.nf.test @@ -3,7 +3,6 @@ nextflow_workflow { name "Test Workflow QUANTIFY_PSEUDO_ALIGNMENT" script "../main.nf" workflow "QUANTIFY_PSEUDO_ALIGNMENT" - config './nextflow.config' tag 'SALMON_QUANT' tag 'KALLISTO_QUANT' @@ -11,7 +10,7 @@ nextflow_workflow { tag 'TXIMETA_TXIMPORT' tag 'SUMMARIZEDEXPERIMENT_SUMMARIZEDEXPERIMENT' - test("salmon") { + // test("salmon") { setup { run("SALMON_INDEX") { @@ -19,7 +18,7 @@ nextflow_workflow { process { """ input[0] = Channel.of([file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/genome.fasta", checkIfExists: true)]) - input[1] = Channel.of([file(params.modules_testdata_base_path + "genomics/sarscov2/genome/transcriptome.fasta", checkIfExists: true)]) + input[1] = Channel.of([file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/transcriptome.fasta", checkIfExists: true)]) """ } } @@ -28,25 +27,20 @@ nextflow_workflow { when { workflow { """ - def fileContents = [ - 'sample,fastq_1,fastq_2,strandedness', - 'test,s3://ngi-igenomes/testdata/nf-core/pipelines/rnaseq/3.15/genomics/sarscov2/illumina/fastq/test_1.fastq.gz,s3://ngi-igenomes/testdata/nf-core/pipelines/rnaseq/3.15/genomics/sarscov2/illumina/fastq/test_2.fastq.gz,auto' + input[0] = [ + [ id: 'samplesheet' ], + file(params.pipelines_testdata_base_path + '/csv/samplesheet_micro.csv', checkIfExists: true) ] - def samplesheetFile = file("${workDir}/samplesheetFile.txt") - samplesheetFile.withWriter{ out -> - fileContents.each {out.println it} - } - input[0] = samplesheetFile input[1] = [ [ id: 'meta' ], [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ] input[2] = SALMON_INDEX.out.index - input[3] = Channel.of(file(params.modules_testdata_base_path + "genomics/sarscov2/genome/transcriptome.fasta", checkIfExists: true)) - input[4] = Channel.of(file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gtf", checkIfExists: true)) + input[3] = Channel.of(file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/transcriptome.fasta", checkIfExists: true)) + input[4] = Channel.of(file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/genome.fasta", checkIfExists: true)) input[5] = 'gene_id' input[6] = 'gene_name' input[7] = 'salmon' @@ -54,7 +48,7 @@ nextflow_workflow { input[9] = '' input[10] = null input[11] = null - """.stripIndent() + """ } } @@ -76,43 +70,39 @@ nextflow_workflow { """ input[0] = Channel.of([ [ id:'transcriptome' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/transcriptome.fasta', checkIfExists: true) + file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/transcriptome.fasta", checkIfExists: true) ]) """ } } } + when { workflow { """ - def fileContents = [ - 'sample,fastq_1,fastq_2,strandedness', - 'test,SRR6357070_1.fastq.gz,SRR6357070_2.fastq.gz,auto' + input[0] = [ + [ id: 'samplesheet' ], + file(params.pipelines_testdata_base_path + '/csv/samplesheet_micro.csv', checkIfExists: true) ] - def samplesheetFile = file("${workDir}/samplesheetFile.txt") - samplesheetFile.withWriter{ out -> - fileContents.each {out.println it} - } - input[0] = samplesheetFile input[1] = [ - [ id: 'meta' ], + [ id: 'test' ], [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ] input[2] = KALLISTO_INDEX.out.index - input[3] = Channel.of(file(params.modules_testdata_base_path + "genomics/sarscov2/genome/transcriptome.fasta", checkIfExists: true)) - input[4] = Channel.of(file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gtf", checkIfExists: true)) + input[3] = Channel.of(file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/transcriptome.fasta", checkIfExists: true)) + input[4] = Channel.of(file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/genome.gtf", checkIfExists: true)) input[5] = 'gene_id' input[6] = 'gene_name' input[7] = 'kallisto' input[8] = null input[9] = null - input[10] = null - input[11] = null - """.stripIndent() + input[10] = [] + input[11] = [] + """ } }