From 4591ea2205d305d6bf27511571eb98ff7e4b9052 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 9 May 2022 07:58:58 +0000 Subject: [PATCH] atomize --- modules/meryl/count/main.nf | 14 ++------- modules/meryl/count/meta.yml | 37 +++++++++-------------- tests/modules/meryl/count/main.nf | 2 +- tests/modules/meryl/count/nextflow.config | 1 - 4 files changed, 18 insertions(+), 36 deletions(-) diff --git a/modules/meryl/count/main.nf b/modules/meryl/count/main.nf index 80491242..f7a2811d 100644 --- a/modules/meryl/count/main.nf +++ b/modules/meryl/count/main.nf @@ -11,15 +11,14 @@ process MERYL_COUNT { tuple val(meta), path(reads) output: - tuple val(meta), path("*.meryl"), emit: meryl - path "versions.yml" , emit: versions + tuple val(meta), path("*.meryldb"), emit: meryl_db + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ for READ in $reads; do @@ -27,15 +26,8 @@ process MERYL_COUNT { threads=$task.cpus \\ $args \\ $reads \\ - output read.\${READ%.f*}.meryl + output read.\${READ%.f*}.meryldb done - meryl union-sum \\ - threads=$task.cpus \\ - $args2 \\ - output ${prefix}.meryl - - # clean up - rm -rf read.*.meryl cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/meryl/count/meta.yml b/modules/meryl/count/meta.yml index 885267ec..dd59decd 100644 --- a/modules/meryl/count/meta.yml +++ b/modules/meryl/count/meta.yml @@ -1,51 +1,42 @@ name: "meryl_count" -## TODO nf-core: Add a description of the module and list keywords -description: write your description here +description: A genomic k-mer counter (and sequence utility) with nice features. keywords: - - sort + - k-mer + - count tools: - "meryl": - ## TODO nf-core: Add a description and other details for the software below - description: "" - homepage: "{}" - documentation: "{}" - tool_dev_url: "{}" + description: "A genomic k-mer counter (and sequence utility) with nice features. " + homepage: "https://github.com/marbl/meryl" + documentation: "https://meryl.readthedocs.io/en/latest/quick-start.html" + tool_dev_url: "https://github.com/marbl/meryl" doi: "" licence: "['GPL']" -## TODO nf-core: Add a description of all of the variables used as input input: - # Only when we have meta - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - # - ## TODO nf-core: Delete / customise this example input - - bam: + - reads: type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. -## TODO nf-core: Add a description of all of the variables used as output output: - #Only when we have meta - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - # - versions: type: file description: File containing software versions pattern: "versions.yml" - ## TODO nf-core: Delete / customise this example output - - bam: - type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + - meryl_db: + type: directory + description: A Meryl k-mer database authors: - "@mahesh-panchal" diff --git a/tests/modules/meryl/count/main.nf b/tests/modules/meryl/count/main.nf index 8706046a..7d65b7dd 100644 --- a/tests/modules/meryl/count/main.nf +++ b/tests/modules/meryl/count/main.nf @@ -4,7 +4,7 @@ nextflow.enable.dsl = 2 include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf' -workflow test_meryl_count_single_end { +workflow test_meryl_count { input = [ [ id:'test' ], // meta map diff --git a/tests/modules/meryl/count/nextflow.config b/tests/modules/meryl/count/nextflow.config index 99e1f846..6d899c50 100644 --- a/tests/modules/meryl/count/nextflow.config +++ b/tests/modules/meryl/count/nextflow.config @@ -2,6 +2,5 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } ext.args = 'k=21' - ext.args2 = 'k=21' }