Skip to content

Commit

Permalink
update stub; update docker container version
Browse files Browse the repository at this point in the history
  • Loading branch information
Krannich479 committed Dec 20, 2024
1 parent db548f3 commit cadb172
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
36 changes: 23 additions & 13 deletions modules/nf-core/kma/kma/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process KMA {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/kma:1.4.15--he4a0461_0' :
'biocontainers/kma:1.4.15--he4a0461_0' }"
'https://depot.galaxyproject.org/singularity/kma:1.4.15--h577a1d6_1' :
'biocontainers/kma:1.4.15--h577a1d6_1' }"

input:
tuple val(meta) , path(reads)
Expand All @@ -27,7 +27,7 @@ process KMA {

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}.${meta2.id}.kma"
def prefix = task.ext.prefix ?: "${meta.id}.${meta2.id}"
def input_style = interleaved ? "-int ${reads}" : "-ipe ${reads}"
def create_mat = mat_format ? "-matrix" : ''
"""
Expand All @@ -47,17 +47,27 @@ process KMA {
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}.${meta2.id}.kma"
def create_mat = mat_format ? "touch ${prefix}.mat.gz" : ''
def create_spa = task.ext.args.contains('-Sparse') ? "touch ${prefix}.spa" : ''
"""
touch ${prefix}.res \\
touch ${prefix}.fsa \\
touch ${prefix}.aln \\
touch ${prefix}.frag.gz \\
${create_mat} \\
${create_spa}
def prefix = task.ext.prefix ?: "${meta.id}.${meta2.id}"
def create_spa = task.ext.args.contains('-Sparse')

if ( create_spa )
"""
touch ${prefix}.spa
"""
else
"""
touch ${prefix}.res \\
touch ${prefix}.fsa \\
touch ${prefix}.aln \\
touch ${prefix}.frag.gz
"""

if ( mat_format )
"""
touch ${prefix}.mat.gz
"""

"""
cat <<-END_VERSIONS > versions.yml
"${task.process}":
kma: \$(echo \$(kma -v 2>&1) | sed 's/^KMA-\$//')
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/kma/kma/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ output:
e.g. [ id:'reference' ]
- '*.spa':
type: file
description: Text file containing the top scoring references.
description: Text file containing the top scoring references. Note that kma (v1.4.15) can only use spare alignment if the kma index was also build with the sparse option.
pattern: "*.{spa}"
- versions:
- versions.yml:
Expand Down

0 comments on commit cadb172

Please sign in to comment.