mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-09-21 07:42:05 +00:00
atomize
This commit is contained in:
parent
67481c6d54
commit
4591ea2205
4 changed files with 18 additions and 36 deletions
|
@ -11,15 +11,14 @@ process MERYL_COUNT {
|
||||||
tuple val(meta), path(reads)
|
tuple val(meta), path(reads)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.meryl"), emit: meryl
|
tuple val(meta), path("*.meryldb"), emit: meryl_db
|
||||||
path "versions.yml" , emit: versions
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
when:
|
when:
|
||||||
task.ext.when == null || task.ext.when
|
task.ext.when == null || task.ext.when
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
def args2 = task.ext.args2 ?: ''
|
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
"""
|
"""
|
||||||
for READ in $reads; do
|
for READ in $reads; do
|
||||||
|
@ -27,15 +26,8 @@ process MERYL_COUNT {
|
||||||
threads=$task.cpus \\
|
threads=$task.cpus \\
|
||||||
$args \\
|
$args \\
|
||||||
$reads \\
|
$reads \\
|
||||||
output read.\${READ%.f*}.meryl
|
output read.\${READ%.f*}.meryldb
|
||||||
done
|
done
|
||||||
meryl union-sum \\
|
|
||||||
threads=$task.cpus \\
|
|
||||||
$args2 \\
|
|
||||||
output ${prefix}.meryl
|
|
||||||
|
|
||||||
# clean up
|
|
||||||
rm -rf read.*.meryl
|
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -1,51 +1,42 @@
|
||||||
name: "meryl_count"
|
name: "meryl_count"
|
||||||
## TODO nf-core: Add a description of the module and list keywords
|
description: A genomic k-mer counter (and sequence utility) with nice features.
|
||||||
description: write your description here
|
|
||||||
keywords:
|
keywords:
|
||||||
- sort
|
- k-mer
|
||||||
|
- count
|
||||||
tools:
|
tools:
|
||||||
- "meryl":
|
- "meryl":
|
||||||
## TODO nf-core: Add a description and other details for the software below
|
description: "A genomic k-mer counter (and sequence utility) with nice features. "
|
||||||
description: ""
|
homepage: "https://github.com/marbl/meryl"
|
||||||
homepage: "{}"
|
documentation: "https://meryl.readthedocs.io/en/latest/quick-start.html"
|
||||||
documentation: "{}"
|
tool_dev_url: "https://github.com/marbl/meryl"
|
||||||
tool_dev_url: "{}"
|
|
||||||
doi: ""
|
doi: ""
|
||||||
licence: "['GPL']"
|
licence: "['GPL']"
|
||||||
|
|
||||||
## TODO nf-core: Add a description of all of the variables used as input
|
|
||||||
input:
|
input:
|
||||||
# Only when we have meta
|
|
||||||
- meta:
|
- meta:
|
||||||
type: map
|
type: map
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
e.g. [ id:'test', single_end:false ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
#
|
- reads:
|
||||||
## TODO nf-core: Delete / customise this example input
|
|
||||||
- bam:
|
|
||||||
type: file
|
type: file
|
||||||
description: BAM/CRAM/SAM file
|
description: |
|
||||||
pattern: "*.{bam,cram,sam}"
|
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:
|
output:
|
||||||
#Only when we have meta
|
|
||||||
- meta:
|
- meta:
|
||||||
type: map
|
type: map
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
e.g. [ id:'test', single_end:false ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
#
|
|
||||||
- versions:
|
- versions:
|
||||||
type: file
|
type: file
|
||||||
description: File containing software versions
|
description: File containing software versions
|
||||||
pattern: "versions.yml"
|
pattern: "versions.yml"
|
||||||
## TODO nf-core: Delete / customise this example output
|
- meryl_db:
|
||||||
- bam:
|
type: directory
|
||||||
type: file
|
description: A Meryl k-mer database
|
||||||
description: Sorted BAM/CRAM/SAM file
|
|
||||||
pattern: "*.{bam,cram,sam}"
|
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- "@mahesh-panchal"
|
- "@mahesh-panchal"
|
||||||
|
|
|
@ -4,7 +4,7 @@ nextflow.enable.dsl = 2
|
||||||
|
|
||||||
include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf'
|
include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf'
|
||||||
|
|
||||||
workflow test_meryl_count_single_end {
|
workflow test_meryl_count {
|
||||||
|
|
||||||
input = [
|
input = [
|
||||||
[ id:'test' ], // meta map
|
[ id:'test' ], // meta map
|
||||||
|
|
|
@ -2,6 +2,5 @@ process {
|
||||||
|
|
||||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
ext.args = 'k=21'
|
ext.args = 'k=21'
|
||||||
ext.args2 = 'k=21'
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue