mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
45985ff6f0
* Updated module to fit nf-core2.2dev0 templates * Updated module to fit nf-core2.2dev0 templates * Linked test files to nf-core/test-dataset branch:raredisease raw files * Change order of input: vcf and tbi with meta, ped without * Change order of input: vcf and tbi with meta, ped without/adapt test * Change order of input: vcf and tbi with meta, ped without/adapt test, bugfix * Indent and rename files * Update modules/peddy/main.nf Removed newline Co-authored-by: FriederikeHanssen <Friederike.hanssen@qbic.uni-tuebingen.de> * Update modules/peddy/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/peddy/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/peddy/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/peddy/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/peddy/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/peddy/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/peddy/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update pytest_modules.yml * Update main.nf * Apply suggestions from code review Co-authored-by: FriederikeHanssen <Friederike.hanssen@qbic.uni-tuebingen.de> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
47 lines
1.6 KiB
Text
47 lines
1.6 KiB
Text
// Import generic module functions
|
|
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
|
|
|
params.options = [:]
|
|
options = initOptions(params.options)
|
|
|
|
process PEDDY {
|
|
tag "$meta.id"
|
|
label 'process_low'
|
|
publishDir "${params.outdir}",
|
|
mode: params.publish_dir_mode,
|
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
|
|
|
conda (params.enable_conda ? "bioconda::peddy=0.4.8" : null)
|
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
|
container "https://depot.galaxyproject.org/singularity/peddy:0.4.8--pyh5e36f6f_0"
|
|
} else {
|
|
container "quay.io/biocontainers/peddy:0.4.8--pyh5e36f6f_0"
|
|
}
|
|
|
|
input:
|
|
tuple val(meta), path(vcf), path(vcf_tbi)
|
|
path ped
|
|
|
|
output:
|
|
tuple val(meta), path("*.html") , emit: html
|
|
tuple val(meta), path("*.csv") , emit: csv
|
|
tuple val(meta), path("*.peddy.ped"), emit: ped
|
|
tuple val(meta), path("*.png") , emit: png
|
|
path "versions.yml" , emit: versions
|
|
|
|
script:
|
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
|
"""
|
|
peddy \\
|
|
$options.args \\
|
|
--plot \\
|
|
-p $task.cpus \\
|
|
$vcf \\
|
|
$ped
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
${getProcessName(task.process)}:
|
|
${getSoftwareName(task.process)}: \$( peddy --version 2>&1 | sed 's/peddy, version //' )
|
|
END_VERSIONS
|
|
"""
|
|
}
|