mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-15 06:03:10 +00:00
1780cf9bcf
* Update main.nf * Update meta.yml * Re-add logos as not staged in a way that works with MultiQC config files * Add ANGSD doCounts * Prettier * Update main.nf * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Try loosening test due to conda * Remove md5 for binary file Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com>
45 lines
1.5 KiB
Text
45 lines
1.5 KiB
Text
process ANGSD_DOCOUNTS {
|
|
tag "$meta.id"
|
|
label 'process_low'
|
|
|
|
conda (params.enable_conda ? "bioconda::angsd=0.939" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity/angsd:0.939--h468462d_0':
|
|
'quay.io/biocontainers/angsd:0.939--h468462d_0' }"
|
|
|
|
input:
|
|
tuple val(meta), path(bam), path(bai), path(minqfile)
|
|
|
|
output:
|
|
tuple val(meta), path("*.depthSample"), optional: true, emit: depth_sample
|
|
tuple val(meta), path("*.depthGlobal"), optional: true, emit: depth_global
|
|
tuple val(meta), path("*.qs") , optional: true, emit: qs
|
|
tuple val(meta), path("*.pos.gz") , optional: true, emit: pos
|
|
tuple val(meta), path("*.counts.gz") , optional: true, emit: counts
|
|
tuple val(meta), path("*.icnts.gz") , optional: true, emit: icounts
|
|
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}"
|
|
def minq = minqfile ? "-minQfile ${minqfile}" : ""
|
|
"""
|
|
readlink -f *.bam > bamlist.txt
|
|
|
|
angsd \\
|
|
-nThreads ${task.cpus} \\
|
|
-doCounts 1 \\
|
|
$args \\
|
|
-bam bamlist.txt \\
|
|
-out ${prefix} \\
|
|
$minq
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
angsd: \$(echo \$(angsd 2>&1) | grep version | head -n 1 | sed 's/.*version: //g;s/ .*//g')
|
|
END_VERSIONS
|
|
"""
|
|
}
|