mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Add bwa index
This commit is contained in:
parent
7f5ca56413
commit
7938a60a02
2 changed files with 32 additions and 0 deletions
1
software/bwa/index/functions.nf
Symbolic link
1
software/bwa/index/functions.nf
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../lib/functions.nf
|
31
software/bwa/index/main.nf
Normal file
31
software/bwa/index/main.nf
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
process BWA_INDEX {
|
||||
tag "$fasta"
|
||||
label 'process_high'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:'') }
|
||||
|
||||
container "biocontainers/bwa:v0.7.17_cv1"
|
||||
//container "https://depot.galaxyproject.org/singularity/bwa:0.7.17--hed695b0_7"
|
||||
|
||||
conda (params.conda ? "bioconda::bwa=0.7.17" : null)
|
||||
|
||||
input:
|
||||
path fasta
|
||||
val options
|
||||
|
||||
output:
|
||||
path "${fasta}.*", emit: index
|
||||
path "*.version.txt", emit: version
|
||||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
"""
|
||||
bwa index $ioptions.args $fasta
|
||||
echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt
|
||||
"""
|
||||
}
|
Loading…
Reference in a new issue