Start Meryl count

This commit is contained in:
Mahesh Binzer-Panchal 2022-05-06 15:04:04 +00:00
parent e13d634764
commit 67481c6d54
6 changed files with 130 additions and 0 deletions

View 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
"""
}

View 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"

View file

@ -1214,6 +1214,10 @@ meningotype:
- modules/meningotype/** - modules/meningotype/**
- tests/modules/meningotype/** - tests/modules/meningotype/**
meryl/count:
- modules/meryl/count/**
- tests/modules/meryl/count/**
metabat2/jgisummarizebamcontigdepths: metabat2/jgisummarizebamcontigdepths:
- modules/metabat2/jgisummarizebamcontigdepths/** - modules/metabat2/jgisummarizebamcontigdepths/**
- tests/modules/metabat2/jgisummarizebamcontigdepths/** - tests/modules/metabat2/jgisummarizebamcontigdepths/**

View 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 )
}

View file

@ -0,0 +1,7 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
ext.args = 'k=21'
ext.args2 = 'k=21'
}

View 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