Mercurial > repos > kkonganti > cfsan_cronology
comparison 0.2.0/modules/masurca/polish/main.nf @ 11:a5f31c44f8c9
planemo upload
author | kkonganti |
---|---|
date | Mon, 15 Jul 2024 16:11:44 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
10:ddf7a172bf30 | 11:a5f31c44f8c9 |
---|---|
1 process MASURCA_POLISH { | |
2 tag "$meta.id" | |
3 label 'process_micro' | |
4 | |
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}masurca${params.fs}4.1.0" : null) | |
6 conda (params.enable_conda ? "bioconda::masurca=4.1.0 conda-forge::libgcc-ng" : null) | |
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | |
8 'https://depot.galaxyproject.org/singularity/masurca:4.1.0--pl5321hb5bd705_1' : | |
9 'quay.io/biocontainers/masurca:4.1.0--pl5321hb5bd705_1' }" | |
10 | |
11 input: | |
12 tuple val(meta), path(contigs), path(reads) | |
13 | |
14 output: | |
15 tuple val(meta), path("${prefix}_contigs.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 memory = (task.memory ? task.memory.toGiga() : 16) | |
24 def mem_per_thread = memory.toGiga().toInteger().div(task.cpus.toInteger()).round(0) | |
25 def all_reads = "${reads.join(' ')}" | |
26 prefix = (task.ext.prefix ?: meta.id) | |
27 """ | |
28 polca.sh \\ | |
29 -a $contigs \\ | |
30 -r '${all_reads}' \\ | |
31 -t $task.cpus \\ | |
32 -m $mem_per_thread \\ | |
33 $args \\ | |
34 | |
35 mv 'contigs.fa' "${prefix}.contigs.fa" | |
36 | |
37 cat <<-END_VERSIONS > versions.yml | |
38 "${task.process}": | |
39 masurca: \$(echo \$(masurca --version 2>&1) | sed 's/^.*version //') | |
40 END_VERSIONS | |
41 """ | |
42 } |