mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 05:43:08 +00:00
c9b29c7686
* Add eido/convert module * Run prettier * Update modules/eido/convert/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/eido/convert/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update extension format Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
37 lines
1 KiB
Text
37 lines
1 KiB
Text
process EIDO_CONVERT {
|
|
tag '$samplesheet'
|
|
label 'process_single'
|
|
|
|
conda (params.enable_conda ? "conda-forge::eido=0.1.9" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://containers.biocontainers.pro/s3/SingImgsRepo/eido/0.1.9_cv1/eido_0.1.9_cv1.sif' :
|
|
'biocontainers/eido:0.1.9_cv1' }"
|
|
|
|
input:
|
|
path samplesheet
|
|
val format
|
|
|
|
output:
|
|
path "versions.yml" , emit: versions
|
|
path "${prefix}.${format}" , emit: samplesheet_converted
|
|
|
|
when:
|
|
task.ext.when == null || task.ext.when
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
prefix = task.ext.prefix ?: "samplesheet_converted"
|
|
"""
|
|
eido \\
|
|
convert \\
|
|
-f $format \\
|
|
$samplesheet \\
|
|
$args \\
|
|
-p samples=${prefix}.${format}
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
eido: \$(echo \$(eido --version 2>&1) | sed 's/^.*eido //;s/ .*//' ))
|
|
END_VERSIONS
|
|
"""
|
|
}
|