Mercurial > repos > galaxytrakr > hfp_nowayout_awsbatch
comparison 0.5.0/modules/bwa/mem/main.nf @ 0:3c767f9cfd88 draft default tip
planemo upload
| author | galaxytrakr |
|---|---|
| date | Fri, 29 May 2026 13:37:56 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:3c767f9cfd88 |
|---|---|
| 1 process BWA_MEM { | |
| 2 tag "$meta.id" | |
| 3 label 'process_micro' | |
| 4 | |
| 5 module (params.enable_module ? "${params.swmodulepath}${params.fs}bwa${params.fs}0.7.17" : null) | |
| 6 conda (params.enable_conda ? "bioconda::bwa=0.7.17 conda-forge::perl" : null) | |
| 7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | |
| 8 'https://depot.galaxyproject.org/singularity/bwa:0.7.17--he4a0461_11' : | |
| 9 'quay.io/biocontainers/bwa:0.7.17--he4a0461_11' }" | |
| 10 | |
| 11 input: | |
| 12 tuple val(meta), path(reads), path(index) | |
| 13 val index2 | |
| 14 | |
| 15 output: | |
| 16 tuple val(meta), path("*.sam"), emit: aligned_sam | |
| 17 path "versions.yml" , emit: versions | |
| 18 | |
| 19 when: | |
| 20 | |
| 21 | |
| 22 script: | |
| 23 def args = task.ext.args ?: '' | |
| 24 def args2 = task.ext.args2 ?: '' | |
| 25 def prefix = task.ext.prefix ?: "${meta.id}" | |
| 26 def this_index = (index ?: index2) | |
| 27 """ | |
| 28 | |
| 29 if [ "${params.fq_single_end}" = "false" ]; then | |
| 30 bwa mem \\ | |
| 31 $args \\ | |
| 32 -t $task.cpus \\ | |
| 33 $this_index \\ | |
| 34 ${reads[0]} ${reads[1]} > ${prefix}.aligned.sam | |
| 35 else | |
| 36 bwa mem \\ | |
| 37 $args \\ | |
| 38 -t $task.cpus \\ | |
| 39 -a \\ | |
| 40 $this_index \\ | |
| 41 $reads > ${prefix}.aligned.sam | |
| 42 | |
| 43 fi | |
| 44 | |
| 45 cat <<-END_VERSIONS > versions.yml | |
| 46 "${task.process}": | |
| 47 bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') | |
| 48 END_VERSIONS | |
| 49 """ | |
| 50 } |
