Skip to content

Left-align reporting multiple alleles at the same position in bacterial genome #2597

Description

@Biltu

Hello, I have a PGGB pangenome of bacterial isolates, vcf called by vg deconstruct. When I normalized the vcf, multiple alleles were reported for the same POS(554480) and GT(15BCS23). The -f Ref option helps for the other complex regions, so -N is not an option. Is there any other way to correct the POS?

bcftools norm -f ATCC_700669.fasta -m -any \
wave_bub_no_sv.vcf
-Ou |
bcftools view
-e 'COUNT(GT="alt")=0'
-f 'PASS,.'
--threads 8
-Ou |
bcftools sort
-Oz
-o ref_norm_wave_bub_no_sv.vcf.gz

Writing to /var/folders/6m/ymp1jbrj713dr0bg64mwrg2r0000gn/T//bcftools.1nZbbL
Lines total/split/joined/realigned/mismatch_removed/dup_removed/skipped: 80955/1567/0/1169/0/0/0
Merging 1 temporary files
Done
Cleaning
(Swave-env) biltu@Mohammads-MacBook-Pro vcspn % for vcf in wave_bub_no_sv.vcf ref_norm_wave_bub_no_sv.vcf.gz; do
echo
echo "===== $vcf ====="
bcftools query
-f '%CHROM\t%POS\t%ID\t%REF\t%ALT\tAC=%INFO/AC\tAF=%INFO/AF\tAN=%INFO/AN[\t%SAMPLE=%GT]\n'
"$vcf" |
awk -F'\t' '$2==554480 || $2==554481'
done

===== wave_bub_no_sv.vcf =====
NC011900#1#00 554480 >95228>95230 G GAA AC=1 AF=0.0227273 AN=44 10AS22=0 10AS29=0 11ADS26=0 11AS28=0 15AS1=0 15AS10=0 15BCS11=0 15BCS14=0 15BCS19=0 15BCS23=1 15BCS41=0 16FS31=0 18S30=0 18S35=0 18S37=0 18S8=0 19AS15=0 19AS16=0 19AS18=0 19AS2=0 19AS25=0 19AS33=0 19AS34=0 19AS36=0 19AS4=0 19AS40=0 19AS44=0 19AS7=0 29S12=0 35AS27=0 35BS13=0 35BS24=0 35BS38=0 35BS42=0 35BS43=0 35BS5=0 3S39=0 4S9=0 6ABCS17=0 6ABCS20=0 6ABCS21=0 6ABCS3=0 6ABCS6=0 6ABS32=0
NC011900#1#00 554481 >95223>95228_1 A ACTATA AC=1 AF=0.022727 AN=44 10AS22=0 10AS29=0 11ADS26=0 11AS28=0 15AS1=0 15AS10=0 15BCS11=0 15BCS14=0 15BCS19=0 15BCS23=1 15BCS41=0 16FS31=0 18S30=0 18S35=0 18S37=0 18S8=0 19AS15=0 19AS16=0 19AS18=0 19AS2=0 19AS25=0 19AS33=0 19AS34=0 19AS36=0 19AS4=0 19AS40=0 19AS44=0 19AS7=0 29S12=0 35AS27=0 35BS13=0 35BS24=0 35BS38=0 35BS42=0 35BS43=0 35BS5=0 3S39=0 4S9=0 6ABCS17=0 6ABCS20=0 6ABCS21=0 6ABCS3=0 6ABCS6=0 6ABS32=0

===== ref_norm_wave_bub_no_sv.vcf.gz =====
NC011900#1#00 554480 >95228>95230 G GAA AC=1 AF=0.0227273 AN=44 10AS22=0 10AS29=0 11ADS26=0 11AS28=0 15AS1=0 15AS10=0 15BCS11=0 15BCS14=0 15BCS19=0 15BCS23=1 15BCS41=0 16FS31=0 18S30=0 18S35=0 18S37=0 18S8=0 19AS15=0 19AS16=0 19AS18=0 19AS2=0 19AS25=0 19AS33=0 19AS34=0 19AS36=0 19AS4=0 19AS40=0 19AS44=0 19AS7=0 29S12=0 35AS27=0 35BS13=0 35BS24=0 35BS38=0 35BS42=0 35BS43=0 35BS5=0 3S39=0 4S9=0 6ABCS17=0 6ABCS20=0 6ABCS21=0 6ABCS3=0 6ABCS6=0 6ABS32=0
NC011900#1#00 554480 >95223>95228_1 G GACTAT AC=1 AF=0.022727 AN=44 10AS22=0 10AS29=0 11ADS26=0 11AS28=0 15AS1=0 15AS10=0 15BCS11=0 15BCS14=0 15BCS19=0 15BCS23=1 15BCS41=0 16FS31=0 18S30=0 18S35=0 18S37=0 18S8=0 19AS15=0 19AS16=0 19AS18=0 19AS2=0 19AS25=0 19AS33=0 19AS34=0 19AS36=0 19AS4=0 19AS40=0 19AS44=0 19AS7=0 29S12=0 35AS27=0 35BS13=0 35BS24=0 35BS38=0 35BS42=0 35BS43=0 35BS5=0 3S39=0 4S9=0 6ABCS17=0 6ABCS20=0 6ABCS21=0 6ABCS3=0 6ABCS6=0 6ABS32=0
(Swave-env) biltu@Mohammads-MacBook-Pro vcspn % bcftools -v
bcftools 1.24
Using htslib 1.23.1
Copyright (C) 2026 Genome Research Ltd.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
(Swave-env) biltu@Mohammads-MacBook-Pro vcspn %

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions