Skip to content

Commit 724b247

Browse files
authored
Merge pull request #596 from broadinstitute/ct-debug-run_discordance_task
run_discordance task: first index the ref fasta
2 parents 3f2e759 + 7103163 commit 724b247

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pipes/WDL/tasks/tasks_assembly.wdl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,12 @@ task run_discordance {
904904
905905
if [ ! -f everything.vcf ]; then
906906
# bcftools call snps while treating each RG as a separate sample
907+
908+
# first index the ref fasta, iff it contains non-N sequence
909+
if [ $(grep -v '^>' "~{reference_fasta}" | tr -d '\nNn' | wc -c) != "0" ]; then
910+
samtools faidx "~{reference_fasta}"
911+
fi
912+
907913
bcftools mpileup \
908914
-G readgroups.txt -d 10000 -a "FORMAT/DP,FORMAT/AD" \
909915
-q 1 -m 2 -Ou \

0 commit comments

Comments
 (0)