Skip to content

Commit

Permalink
sort the decomposed VCF file
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaGuarracino committed Jan 23, 2024
1 parent 4dfa1cf commit f581af3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pggb
Original file line number Diff line number Diff line change
Expand Up @@ -667,10 +667,9 @@ if [[ $vcf_spec != false ]]; then
bgzip -c -@ $threads "$vcf" > "$vcf".gz
TEMPDIR=$(pwd) $timer -f "$fmt" vcfbub -l 0 -a $pop_length --input "$vcf".gz | TEMPDIR=$(pwd) $timer -f "$fmt" vcfwave -I 1000 -t $threads > "$vcf_decomposed_tmp"

#TODO: to remove when vcfwave will be bug-free
# The TYPE info sometimes is wrong/missing
# There are variants without the ALT allele
bcftools annotate -x INFO/TYPE "$vcf_decomposed_tmp" | awk '$5 != "."' > "$vcf_decomposed"
#TODO: remove "bcftools annotate" when vcfwave will be bug-free.
# The TYPE info sometimes is wrong/missing and there are variants without the ALT allele.
bcftools sort -T "$temp_dir" | bcftools annotate -x INFO/TYPE "$vcf_decomposed_tmp" | awk '$5 != "."' > "$vcf_decomposed"
rm "$vcf_decomposed_tmp" "$vcf".gz

bcftools stats "$vcf_decomposed" > "$vcf_decomposed".stats
Expand Down

0 comments on commit f581af3

Please sign in to comment.