annotate 0.5.0/modules/salmon/index/main.nf @ 0:97cd2f532efe

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