mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Start Meryl count
This commit is contained in:
parent
e13d634764
commit
67481c6d54
6 changed files with 130 additions and 0 deletions
45
modules/meryl/count/main.nf
Normal file
45
modules/meryl/count/main.nf
Normal file
|
@ -0,0 +1,45 @@
|
|||
process MERYL_COUNT {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::meryl=1.3" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/meryl:1.3--h87f3376_1':
|
||||
'quay.io/biocontainers/meryl:1.3--h87f3376_1' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.meryl"), emit: meryl
|
||||
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
|
||||
meryl count \\
|
||||
threads=$task.cpus \\
|
||||
$args \\
|
||||
$reads \\
|
||||
output read.\${READ%.f*}.meryl
|
||||
done
|
||||
meryl union-sum \\
|
||||
threads=$task.cpus \\
|
||||
$args2 \\
|
||||
output ${prefix}.meryl
|
||||
|
||||
# clean up
|
||||
rm -rf read.*.meryl
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
meryl: \$( meryl --version |& sed 's/meryl //' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
51
modules/meryl/count/meta.yml
Normal file
51
modules/meryl/count/meta.yml
Normal file
|
@ -0,0 +1,51 @@
|
|||
name: "meryl_count"
|
||||
## TODO nf-core: Add a description of the module and list keywords
|
||||
description: write your description here
|
||||
keywords:
|
||||
- sort
|
||||
tools:
|
||||
- "meryl":
|
||||
## TODO nf-core: Add a description and other details for the software below
|
||||
description: ""
|
||||
homepage: "{}"
|
||||
documentation: "{}"
|
||||
tool_dev_url: "{}"
|
||||
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:
|
||||
type: file
|
||||
description: BAM/CRAM/SAM file
|
||||
pattern: "*.{bam,cram,sam}"
|
||||
|
||||
## 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}"
|
||||
|
||||
authors:
|
||||
- "@mahesh-panchal"
|
|
@ -1214,6 +1214,10 @@ meningotype:
|
|||
- modules/meningotype/**
|
||||
- tests/modules/meningotype/**
|
||||
|
||||
meryl/count:
|
||||
- modules/meryl/count/**
|
||||
- tests/modules/meryl/count/**
|
||||
|
||||
metabat2/jgisummarizebamcontigdepths:
|
||||
- modules/metabat2/jgisummarizebamcontigdepths/**
|
||||
- tests/modules/metabat2/jgisummarizebamcontigdepths/**
|
||||
|
|
15
tests/modules/meryl/count/main.nf
Normal file
15
tests/modules/meryl/count/main.nf
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf'
|
||||
|
||||
workflow test_meryl_count_single_end {
|
||||
|
||||
input = [
|
||||
[ id:'test' ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
|
||||
]
|
||||
|
||||
MERYL_COUNT ( input )
|
||||
}
|
7
tests/modules/meryl/count/nextflow.config
Normal file
7
tests/modules/meryl/count/nextflow.config
Normal file
|
@ -0,0 +1,7 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
ext.args = 'k=21'
|
||||
ext.args2 = 'k=21'
|
||||
|
||||
}
|
8
tests/modules/meryl/count/test.yml
Normal file
8
tests/modules/meryl/count/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
- name: meryl count test_meryl_count_single_end
|
||||
command: nextflow run tests/modules/meryl/count -entry test_meryl_count_single_end -c tests/config/nextflow.config
|
||||
tags:
|
||||
- meryl/count
|
||||
- meryl
|
||||
files:
|
||||
- path: output/meryl/versions.yml
|
||||
md5sum: 5fe537d873925ccbcc4edf0983e9eda0
|
Loading…
Reference in a new issue