Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcftools consensus always output "Applied 0 variants" and does not change the reference sequence. #2260

Closed
shiro-kur opened this issue Aug 19, 2024 · 1 comment

Comments

@shiro-kur
Copy link

Hello. There is something wrong with "bcftools consensus" recently.

Finally I tried to convert some nucleotides in simple files below, as examples.
Can you reproduce these errors? and How can we solve the problem.

$ bcftools --version
bcftools 1.20
Using htslib 1.20
Copyright (C) 2024 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.

$ zcat ex.vcf.gz
##fileformat=VCFv4.1
##contig=<ID=chr1,length=4>
#CHROM POS ID REF ALT QUAL FILTER INFO
chr1 1 . A T . . .

$ cat ex.fa

chr1
ATGC

$ bcftools consensus -f ex.fa ./ex.vcf.gz -o ./ex2.fa
Applied 0 variants

(bcftools) [shiro2@rc026 ""]$ cat ex2.fa

chr1
ATGC

The vcf files was compressed and indexed as followings.
$ bgzip ex.vcf
$ bcftools index ex.vcf.gz

@pd3 pd3 closed this as completed in 17b6563 Sep 9, 2024
@pd3
Copy link
Member

pd3 commented Sep 9, 2024

The program had a usage bug, it required -s - even when no samples were present. This is now fixed. Moreover, a message is printed to indicate whether FORMAT/GT or REF,ALT is being applied.

Thanks for reporting the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants