Skip to content

Commit 4188297

Browse files
authored
Merge pull request #112 from broadinstitute/dp-fasta-handling
align_and_fix: tolerate whitespace in headers
2 parents 979583f + 393c8ab commit 4188297

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

read_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,8 @@ def align_and_fix(
11971197
samtools = tools.samtools.SamtoolsTool()
11981198

11991199
refFastaCopy = mkstempfname('.ref_copy.fasta')
1200-
shutil.copyfile(refFasta, refFastaCopy)
1200+
with util.file.fastas_with_sanitized_ids(refFasta, use_tmp=True) as sanitized_fastas:
1201+
shutil.copyfile(sanitized_fastas[0], refFastaCopy)
12011202

12021203
tools.picard.CreateSequenceDictionaryTool().execute(refFastaCopy, overwrite=True, JVMmemory=JVMmemory)
12031204
samtools.faidx(refFastaCopy, overwrite=True)

0 commit comments

Comments
 (0)