annotate 0.6.1/modules/salmon/index/main.nf @ 11:749faef1caa9

"planemo upload"
author kkonganti
date Tue, 05 Sep 2023 11:51:40 -0400
parents
children
rev   line source
kkonganti@11 1 process SALMON_INDEX {
kkonganti@11 2 tag "$meta.id"
kkonganti@11 3 label "process_micro"
kkonganti@11 4
kkonganti@11 5 module (params.enable_module ? "${params.swmodulepath}${params.fs}salmon${params.fs}1.10.0" : null)
kkonganti@11 6 conda (params.enable_conda ? 'conda-forge::libgcc-ng bioconda::salmon=1.10.1' : null)
kkonganti@11 7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
kkonganti@11 8 'https://depot.galaxyproject.org/singularity/salmon:1.10.1--h7e5ed60_1' :
kkonganti@11 9 'quay.io/biocontainers/salmon:1.10.1--h7e5ed60_1' }"
kkonganti@11 10
kkonganti@11 11 input:
kkonganti@11 12 tuple val(meta), path(genome_fasta)
kkonganti@11 13
kkonganti@11 14 output:
kkonganti@11 15 tuple val(meta), path("${meta.id}_salmon_idx"), emit: idx
kkonganti@11 16 path "versions.yml" , emit: versions
kkonganti@11 17
kkonganti@11 18 when:
kkonganti@11 19 task.ext.when == null || task.ext.when
kkonganti@11 20
kkonganti@11 21 script:
kkonganti@11 22 def args = task.ext.args ?: ''
kkonganti@11 23 def prefix = task.ext.prefix ?: "${meta.id}_salmon_idx"
kkonganti@11 24 def decoys_file = file( meta.salmon_decoys )
kkonganti@11 25 def decoys = !("${decoys_file.simpleName}" ==~ 'dummy_file.*') && decoys_file.exits() ? "--decoys ${meta.salmon_decoys}" : ''
kkonganti@11 26 """
kkonganti@11 27 salmon \\
kkonganti@11 28 index \\
kkonganti@11 29 $decoys \\
kkonganti@11 30 --threads $task.cpus \\
kkonganti@11 31 $args \\
kkonganti@11 32 --index $prefix \\
kkonganti@11 33 --transcripts $genome_fasta
kkonganti@11 34
kkonganti@11 35 cat <<-END_VERSIONS > versions.yml
kkonganti@11 36 "${task.process}":
kkonganti@11 37 salmon: \$(echo \$(salmon --version) | sed -e "s/salmon //g")
kkonganti@11 38 END_VERSIONS
kkonganti@11 39 """
kkonganti@11 40 }