|
0
|
1 process POLYPOLISH {
|
|
|
2 tag "$meta.id"
|
|
|
3 label 'process_micro'
|
|
|
4
|
|
|
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}polypolish${params.fs}0.5.0" : null)
|
|
|
6 conda (params.enable_conda ? "bioconda::polypolish=0.5.0 conda-forge::libgcc-ng" : null)
|
|
|
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
8 'https://depot.galaxyproject.org/singularity/polypolish:0.5.0--hdbdd923_4' :
|
|
|
9 'quay.io/biocontainers/polypolish:0.5.0--hdbdd923_4' }"
|
|
|
10
|
|
|
11 input:
|
|
|
12 tuple val(meta), path(genome), path(sam)
|
|
|
13
|
|
|
14 output:
|
|
|
15 tuple val(meta), path("*.polished.fa"), emit: polished
|
|
|
16 path "versions.yml" , emit: versions
|
|
|
17
|
|
|
18 when:
|
|
|
19 task.ext.when == null || task.ext.when
|
|
|
20
|
|
|
21 script:
|
|
|
22 def args = task.ext.args ?: ''
|
|
|
23 def prefix = task.ext.prefix ?: "${meta.id}"
|
|
|
24 """
|
|
|
25
|
|
|
26 polypolish \\
|
|
|
27 $args \\
|
|
|
28 $genome \\
|
|
|
29 ${sam.join(' ')} > ${prefix}.polished.fa
|
|
|
30
|
|
|
31 cat <<-END_VERSIONS > versions.yml
|
|
|
32 "${task.process}":
|
|
|
33 polypolish: \$(echo \$(polypolish -V 2>&1) | sed 's/^Polypolish v//')
|
|
|
34 END_VERSIONS
|
|
|
35 """
|
|
|
36 } |