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
83a266ea70
6 changed files with 112 additions and 0 deletions
34
modules/meryl/histogram/main.nf
Normal file
34
modules/meryl/histogram/main.nf
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
process MERYL_HISTOGRAM {
|
||||||
|
tag "$meta.id"
|
||||||
|
label 'process_low'
|
||||||
|
|
||||||
|
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(meryl_db)
|
||||||
|
|
||||||
|
output:
|
||||||
|
tuple val(meta), path("*.hist"), emit: hist
|
||||||
|
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}"
|
||||||
|
"""
|
||||||
|
meryl histogram \\
|
||||||
|
threads=$task.cpus \\
|
||||||
|
$args \\
|
||||||
|
$meryl_db > ${prefix}.hist
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
meryl: \$( meryl --version |& sed 's/meryl //' )
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
41
modules/meryl/histogram/meta.yml
Normal file
41
modules/meryl/histogram/meta.yml
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
name: "meryl_histogram"
|
||||||
|
description: A genomic k-mer counter (and sequence utility) with nice features.
|
||||||
|
keywords:
|
||||||
|
- k-mer
|
||||||
|
- histogram
|
||||||
|
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 ]
|
||||||
|
- meryl_dbs:
|
||||||
|
type: directory
|
||||||
|
description: Meryl k-mer database
|
||||||
|
|
||||||
|
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"
|
||||||
|
- hist:
|
||||||
|
type: file
|
||||||
|
description: Histogram of k-mers
|
||||||
|
pattern: "*.hist"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- "@mahesh-panchal"
|
|
@ -1218,6 +1218,10 @@ meryl/count:
|
||||||
- modules/meryl/count/**
|
- modules/meryl/count/**
|
||||||
- tests/modules/meryl/count/**
|
- tests/modules/meryl/count/**
|
||||||
|
|
||||||
|
meryl/histogram:
|
||||||
|
- modules/meryl/histogram/**
|
||||||
|
- tests/modules/meryl/histogram/**
|
||||||
|
|
||||||
meryl/unionsum:
|
meryl/unionsum:
|
||||||
- modules/meryl/unionsum/**
|
- modules/meryl/unionsum/**
|
||||||
- tests/modules/meryl/unionsum/**
|
- tests/modules/meryl/unionsum/**
|
||||||
|
|
17
tests/modules/meryl/histogram/main.nf
Normal file
17
tests/modules/meryl/histogram/main.nf
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf'
|
||||||
|
include { MERYL_HISTOGRAM } from '../../../../modules/meryl/histogram/main.nf'
|
||||||
|
|
||||||
|
workflow test_meryl_histogram {
|
||||||
|
|
||||||
|
input = [
|
||||||
|
[ id:'test' ], // meta map
|
||||||
|
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
|
||||||
|
]
|
||||||
|
|
||||||
|
MERYL_COUNT ( input )
|
||||||
|
MERYL_HISTOGRAM ( MERYL_COUNT.out.meryl_db )
|
||||||
|
}
|
6
tests/modules/meryl/histogram/nextflow.config
Normal file
6
tests/modules/meryl/histogram/nextflow.config
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
ext.args = 'k=21'
|
||||||
|
|
||||||
|
}
|
10
tests/modules/meryl/histogram/test.yml
Normal file
10
tests/modules/meryl/histogram/test.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
- name: meryl histogram test_meryl_histogram
|
||||||
|
command: nextflow run tests/modules/meryl/histogram -entry test_meryl_histogram -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- meryl/histogram
|
||||||
|
- meryl
|
||||||
|
files:
|
||||||
|
- path: output/meryl/test.hist
|
||||||
|
md5sum: 4bfdc8b287ee0cfd9922bbfa8cd64650
|
||||||
|
- path: output/meryl/versions.yml
|
||||||
|
md5sum: 050038f1b1df79977a393cce1b4b2ddb
|
Loading…
Reference in a new issue