Skip to content

Commit

Permalink
Fixed issue with the locus being fed into samtools
Browse files Browse the repository at this point in the history
  • Loading branch information
kvg committed Dec 5, 2024
1 parent e40daff commit 5af47fb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wdl/HidiveCorrect.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,10 @@ task Consensus {
command <<<
set -x

samtools faidx ~{reference} ~{locus} | bcftools consensus -H 1pIu ~{calls_vcf} | minimap2 -ayYL -x map-hifi ~{reference} - | samtools sort --write-index -O BAM -o h1.bam
samtools faidx ~{reference} ~{locus} | bcftools consensus -H 2pIu ~{calls_vcf} | minimap2 -ayYL -x map-hifi ~{reference} - | samtools sort --write-index -O BAM -o h2.bam
LOCUS=$(echo "~{locus}" | sed 's/,//g' | sed 's/|.*//')

samtools faidx ~{reference} ${LOCUS} | bcftools consensus -H 1pIu ~{calls_vcf} | minimap2 -ayYL -x map-hifi ~{reference} - | samtools sort --write-index -O BAM -o h1.bam
samtools faidx ~{reference} ${LOCUS} | bcftools consensus -H 2pIu ~{calls_vcf} | minimap2 -ayYL -x map-hifi ~{reference} - | samtools sort --write-index -O BAM -o h2.bam
>>>

output {
Expand Down

0 comments on commit 5af47fb

Please sign in to comment.