Skip to content

Commit ae5a446

Browse files
committed
lofreq handle spaces in fasta
1 parent 4d745f1 commit ae5a446

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pipes/WDL/tasks/tasks_intrahost.wdl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ task lofreq {
136136
File reference_fasta
137137

138138
String out_basename = basename(aligned_bam, '.bam')
139-
String docker = "quay.io/biocontainers/lofreq:2.1.5--py38h588ecb2_4"
139+
String docker = "quay.io/broadinstitute/viral-phylo:2.3.6.0"
140140
}
141141
Int disk_size = 200
142142
command <<<
@@ -145,8 +145,13 @@ task lofreq {
145145
lofreq version | grep version | sed 's/.* \(.*\)/\1/g' | tee LOFREQ_VERSION
146146

147147
# make local copies because CWD is writeable but localization dir isn't always
148-
cp "~{reference_fasta}" reference.fasta
149148
cp "~{aligned_bam}" aligned.bam
149+
python3<<CODE
150+
import shutil
151+
import util.file
152+
with util.file.fastas_with_sanitized_ids("~{reference_fasta}", use_tmp=True) as sanitized_fastas:
153+
shutil.copyfile(sanitized_fastas[0], 'reference.fasta')
154+
CODE
150155
151156
# samtools faidx fails if fasta is empty
152157
if [ $(grep -v '^>' reference.fasta | tr -d '\nNn' | wc -c) == "0" ]; then

0 commit comments

Comments
 (0)