This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bcftools doesn't normalize the vcf file

Hi all,

I'm trying to normalize a vcf file using bcftools (norm -m -any), but it didn't normalize the vcf file without returning any error. Actually, the vcf file was the same before and after normalization! could you please give me any suggestions about the issue, what's the problem?

Thanks

vcf bcftools normalize

Please give us an example of your input and your desired output.

Thanks!

Hi, sorry for backing late as I had no access to our cluster. There is some rows as below (I just mentioned ref and alt columns, here):

ref alt
A   C,T
A,G C

That I expected after normalization something like below, for example for the first variation:

A   C
A   T

But it didn't change after normalization via bcftools norm -m -any. Could you please tell me what's happened?

Hello again,

so what you are trying is not called "normalizing". You like to split multiallelic sites.

What version of bcftools are you using? For me it works.

input.vcf:

##fileformat=VCFv4.2
##FILTER=<ID=PASS,Description="All filters passed">
##contig=<ID=chr1,length=249250621>
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  Sample1
chr1    977330  .   T   C,G 225 PASS    .   GT  1/2

Command used:

$ bcftools norm -m -any input.vcf

Output:

##fileformat=VCFv4.2
##FILTER=<ID=PASS,Description="All filters passed">
##contig=<ID=chr1,length=249250621>
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
##bcftools_normVersion=1.9+htslib-1.9
##bcftools_normCommand=norm -m -any norm.vcf; Date=Fri Jan 25 13:01:30 2019
#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  Sample1
chr1    977330  .   T   C   225 PASS    .   GT  1/0
chr1    977330  .   T   G   225 PASS    .   GT  0/1
Lines   total/split/realigned/skipped:  1/1/0/0

I'm using bcftools v1.9.

fin swimmer

Thank you for your reply. oh, yes multiallelic sites splitting. I'll check the version.

Hi again. I'm using bcftools v1.9, too. so what's the problem in your opinion?

Does my example work? If so please post an example of your data for testing.

Currently, I have no access to the cluster, I try your example and back to you.

1 answer

From the manual:

normalization will only be applied if the --fasta-ref option is supplied.

Oh, I knew it for normalizing indels. Is it true for splitting the multiallelic snps?

Log in to answer this question.