Commit 715c514b authored by Acivico's avatar Acivico
Browse files

Add gunzip to bwa_index

parent d349f9ae
process BWA_INDEX {
tag "bwa index"
tag { "bwa index" }
container 'quay.io/biocontainers/bwa:0.7.17--h84994c4_5'
input:
path input
......@@ -12,10 +12,6 @@ process BWA_INDEX {
script:
def algoType = params.algoType ? "-a $params.algoType" : ""
"""
if [ "${input.extension}" == "gz" ];then
gunzip -c $input >> ${input.simpleName}.fa
fi
bwa index $algoType ${input.simpleName}.fa
bwa index $algoType $input
"""
}
\ No newline at end of file
......@@ -7,6 +7,9 @@ include {
include {
SAMTOOLS_FAIDX
} from "../modules/samtools_faidx"
include {
GUNZIP
} from "../modules/gunzip"
/*
* Subworkflow bwa_index
......@@ -16,7 +19,11 @@ workflow SUB_BWA_INDEX {
reference_fasta
main:
BWA_INDEX(reference_fasta)
GUNZIP(reference_fasta)
uncompressed = GUNZIP.out
BWA_INDEX(uncompressed)
SAMTOOLS_FAIDX(BWA_INDEX.out.reference_fasta)
emit:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment