Remove fasta requirement from module

This commit is contained in:
drpatelh 2021-02-02 12:34:42 +00:00
parent 0d8bd42cca
commit dcb1dc5cd9

View file

@ -21,7 +21,6 @@ process BWA_MEM {
input: input:
tuple val(meta), path(reads) tuple val(meta), path(reads)
path index path index
path fasta
output: output:
tuple val(meta), path("*.bam"), emit: bam tuple val(meta), path("*.bam"), emit: bam
@ -32,13 +31,15 @@ process BWA_MEM {
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def read_group = meta.read_group ? "-R ${meta.read_group}" : "" def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
""" """
INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'`
bwa mem \\ bwa mem \\
$options.args \\ $options.args \\
$read_group \\ $read_group \\
-t $task.cpus \\ -t $task.cpus \\
$fasta \\ \$INDEX \\
$reads \\ $reads \\
| samtools view $options.args2 -@ $task.cpus -bS -o ${prefix}.bam - | samtools view $options.args2 -@ $task.cpus -bhS -o ${prefix}.bam -
echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt
""" """