From ca5e78e1495ff10a7fdebcf69d64b2a2310d2d73 Mon Sep 17 00:00:00 2001 From: mazzalab Date: Thu, 24 Oct 2024 08:21:42 +0200 Subject: [PATCH] fixed trailing whitespaces --- conf/base.config | 2 +- modules/local/gzrt/main.nf | 6 +- nf-test.config | 2 +- .../local/scatter_wipe_gather/main.nf | 8 +- tests/main.nf.test | 88 +++++++++---------- 5 files changed, 53 insertions(+), 53 deletions(-) diff --git a/conf/base.config b/conf/base.config index 21ad01b..fbf1a59 100644 --- a/conf/base.config +++ b/conf/base.config @@ -10,7 +10,7 @@ process { - // TODO nf-core: Check the defaults for all processes + // Defaults for all processes cpus = { 1 * task.attempt } memory = { 6.GB * task.attempt } time = { 4.h * task.attempt } diff --git a/modules/local/gzrt/main.nf b/modules/local/gzrt/main.nf index 321c2a4..593b7f6 100644 --- a/modules/local/gzrt/main.nf +++ b/modules/local/gzrt/main.nf @@ -12,12 +12,12 @@ process GZRT { when: task.ext.when == null || task.ext.when - + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def filename = "${fastqgz.baseName}" - + """ ver_line="" if [[ $fastqgz == *.fastq ]] || [[ $fastqgz == *.fq ]]; then @@ -36,7 +36,7 @@ process GZRT { stub: def args = task.ext.args ?: '' - + """ ver_line="" if [[ $fastqgz == *.fastq ]] || [[ $fastqgz == *.fq ]]; then diff --git a/nf-test.config b/nf-test.config index df4d6b4..bf9bbb1 100644 --- a/nf-test.config +++ b/nf-test.config @@ -9,4 +9,4 @@ config { configFile "tests/nextflow.config" profile "docker" -} \ No newline at end of file +} diff --git a/subworkflows/local/scatter_wipe_gather/main.nf b/subworkflows/local/scatter_wipe_gather/main.nf index f09589b..cfb0a5c 100644 --- a/subworkflows/local/scatter_wipe_gather/main.nf +++ b/subworkflows/local/scatter_wipe_gather/main.nf @@ -24,11 +24,11 @@ workflow SCATTER_WIPE_GATHER { ch_fastq_gather = Channel.empty() ch_report_gather = Channel.empty() ch_fastq_gather = WIPER.out.fixed_fastq.map{ metaData, fastq -> tuple( (fastq.baseName =~ /(.+)_chunk/)[0][1], metaData, fastq ) } - .groupTuple() - .map{ basename, metadata, fastq -> tuple(basename, metadata.first(), fastq) } + .groupTuple() + .map{ basename, metadata, fastq -> tuple(basename, metadata.first(), fastq) } ch_report_gather = WIPER.out.report.map{ metaData, report -> tuple( (report.baseName =~ /(.+)_chunk/)[0][1], metaData, report ) } - .groupTuple() - .map{ basename, metadata, report -> tuple(basename, metadata.first(), report) } + .groupTuple() + .map{ basename, metadata, report -> tuple(basename, metadata.first(), report) } GATHER( ch_fastq_gather, ch_report_gather diff --git a/tests/main.nf.test b/tests/main.nf.test index 03962c6..9a3cb8a 100644 --- a/tests/main.nf.test +++ b/tests/main.nf.test @@ -1,44 +1,44 @@ -nextflow_pipeline { - - name "Test fastqrepair pipeline" - script "../main.nf" - - tag "pipeline" - tag "fastqrepair" - - test("Run fastqrepair on 30 paired-end reads with profile test") { - - when { - params { - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/fastqrepair/testdata/samplesheet_30reads.csv' - outdir = "$outputDir/30reads" - - publish_dir_all_tools = true - chunk_size = 40 // 40 lines per chunk - - max_cpus = 2 - max_memory = '1.GB' - max_time = '1.h' - } - } - - then { - assertAll( - { assert workflow.success }, - { assert snapshot( - // path("$outputDir/30reads/wiper").list(), - path("$outputDir/30reads/gather/test_30reads_R1.fastq_recovered_merged_report.txt"), - path("$outputDir/30reads/gather/test_30reads_R2.fastq_recovered_merged_report.txt"), - ).match("30reads_paired_end") - }, - { assert new File("$outputDir/30reads/pipeline_info/nf-core_fastqrepair_versions.yml").exists() }, - { assert new File("$outputDir/30reads/pickup/test_30reads_R1_repaired.fastq.gz").exists() }, - { assert new File("$outputDir/30reads/pickup/test_30reads_R2_repaired.fastq.gz").exists() }, - { assert new File("$outputDir/30reads/gather/test_30reads_R1.fastq_recovered_merged_report.txt").readLines()[0].contains("FASTQWIPER SUMMARY:") }, - { assert new File("$outputDir/30reads/gather/test_30reads_R1.fastq_recovered_merged_report.txt").readLines()[2].contains("68/149 (45.64%)") } - - // { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("single_end_software_versions") } - ) - } - } -} \ No newline at end of file +nextflow_pipeline { + + name "Test fastqrepair pipeline" + script "../main.nf" + + tag "pipeline" + tag "fastqrepair" + + test("Run fastqrepair on 30 paired-end reads with profile test") { + + when { + params { + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/fastqrepair/testdata/samplesheet_30reads.csv' + outdir = "$outputDir/30reads" + + publish_dir_all_tools = true + chunk_size = 40 // 40 lines per chunk + + max_cpus = 2 + max_memory = '1.GB' + max_time = '1.h' + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot( + // path("$outputDir/30reads/wiper").list(), + path("$outputDir/30reads/gather/test_30reads_R1.fastq_recovered_merged_report.txt"), + path("$outputDir/30reads/gather/test_30reads_R2.fastq_recovered_merged_report.txt"), + ).match("30reads_paired_end") + }, + { assert new File("$outputDir/30reads/pipeline_info/nf-core_fastqrepair_versions.yml").exists() }, + { assert new File("$outputDir/30reads/pickup/test_30reads_R1_repaired.fastq.gz").exists() }, + { assert new File("$outputDir/30reads/pickup/test_30reads_R2_repaired.fastq.gz").exists() }, + { assert new File("$outputDir/30reads/gather/test_30reads_R1.fastq_recovered_merged_report.txt").readLines()[0].contains("FASTQWIPER SUMMARY:") }, + { assert new File("$outputDir/30reads/gather/test_30reads_R1.fastq_recovered_merged_report.txt").readLines()[2].contains("68/149 (45.64%)") } + + // { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("single_end_software_versions") } + ) + } + } +}