-
Notifications
You must be signed in to change notification settings - Fork 240
-
Notifications
You must be signed in to change notification settings - Fork 240
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 mask not applied when input vcf file contains no variants #1592
Comments
What version of bcftools are you using? I just tried with the latest version and with 1.12 and the masking works fine even for empty VCFs. |
Thanks for checking on it. Version details:
I installed
I've attached the empty vcf file (as *.txt so github will accept it) in case there is something that |
Can you provide also the fasta reference and the bed file please? |
Files, as attached below, reproduce the problem for me (without the .txt suffix). Thanks. |
This is now fixed. Thank you for the test case and for reporting the problem! |
Hi,
As part of a workflow I use
bcftools consensus
to generate consensus genomes, with low coverage sites masked with Ns. Command as follows:This command works well in most cases: variants are applied, and low-coverage sites are masked with 'N'. However, there are some cases where (for whatever reason) the reads files for sample(s) are completely empty, then the mapped BAM files are empty and no variants are called as expected (VCF file contains only headers and no variants). In this situation, my coverage mask (bed-format file) indicates that the whole consensus genome (29903 nt) should be masked:
Instead, in these cases no variants are applied (obviously), but the resulting consensus genome is returned as identical to the reference genome since the full-genome mask is not applied. I would instead hope that the resulting consensus genome is 100% Ns.
Is it possible to have the mask be respected even when no variants are in the VCF file? If I add even a single fake variant with a depth of 1 to the VCF file, the resulting consensus genome is 100% Ns (as hoped).
Thanks!
The text was updated successfully, but these errors were encountered: