mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Merge branch 'master' into meryl_unionsum
This commit is contained in:
commit
ce97c87b5d
6 changed files with 135 additions and 0 deletions
37
modules/meryl/count/main.nf
Normal file
37
modules/meryl/count/main.nf
Normal file
|
@ -0,0 +1,37 @@
|
|||
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("*.meryldb"), emit: meryl_db
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
for READ in $reads; do
|
||||
meryl count \\
|
||||
threads=$task.cpus \\
|
||||
$args \\
|
||||
$reads \\
|
||||
output read.\${READ%.f*}.meryldb
|
||||
done
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
meryl: \$( meryl --version |& sed 's/meryl //' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
43
modules/meryl/count/meta.yml
Normal file
43
modules/meryl/count/meta.yml
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: "meryl_count"
|
||||
description: A genomic k-mer counter (and sequence utility) with nice features.
|
||||
keywords:
|
||||
- k-mer
|
||||
- count
|
||||
tools:
|
||||
- "meryl":
|
||||
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']"
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- reads:
|
||||
type: file
|
||||
description: |
|
||||
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
|
||||
respectively.
|
||||
|
||||
output:
|
||||
- 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"
|
||||
- meryl_db:
|
||||
type: directory
|
||||
description: A Meryl k-mer database
|
||||
pattern: "*.meryldb"
|
||||
|
||||
authors:
|
||||
- "@mahesh-panchal"
|
|
@ -1214,6 +1214,10 @@ meningotype:
|
|||
- modules/meningotype/**
|
||||
- tests/modules/meningotype/**
|
||||
|
||||
meryl/count:
|
||||
- modules/meryl/count/**
|
||||
- tests/modules/meryl/count/**
|
||||
|
||||
meryl/unionsum:
|
||||
- modules/meryl/unionsum/**
|
||||
- tests/modules/meryl/unionsum/**
|
||||
|
|
28
tests/modules/meryl/count/main.nf
Normal file
28
tests/modules/meryl/count/main.nf
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/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' , single_end: true ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
|
||||
]
|
||||
|
||||
MERYL_COUNT ( input )
|
||||
}
|
||||
|
||||
workflow test_meryl_count_paired_end {
|
||||
|
||||
input = [
|
||||
[ id:'test' , single_end: false ], // meta map
|
||||
[
|
||||
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)
|
||||
]
|
||||
]
|
||||
|
||||
MERYL_COUNT ( input )
|
||||
}
|
6
tests/modules/meryl/count/nextflow.config
Normal file
6
tests/modules/meryl/count/nextflow.config
Normal file
|
@ -0,0 +1,6 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
ext.args = 'k=21'
|
||||
|
||||
}
|
17
tests/modules/meryl/count/test.yml
Normal file
17
tests/modules/meryl/count/test.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
- 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
|
||||
|
||||
- name: meryl count test_meryl_count_paired_end
|
||||
command: nextflow run tests/modules/meryl/count -entry test_meryl_count_paired_end -c tests/config/nextflow.config
|
||||
tags:
|
||||
- meryl/count
|
||||
- meryl
|
||||
files:
|
||||
- path: output/meryl/versions.yml
|
||||
md5sum: 4961f13cfb60ba8764ed666e70dbf12c
|
Loading…
Reference in a new issue