-
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 annotate fails when contigs are not defined in header #766
Comments
When the contig lines are not present in the header, bcftools can use the index to get the information it needs - hence the suggested "Quick workaround". |
the first command fails with an error and exits before doing any annotation. in other bcftools commands, this is just a warning. It's not clear to me why it's an error in bcftools annotate, but a warning elsewhere. I'm so used to seeing the |
Sorry for a late response. Commands which only read VCFs can get away with the missing contigs, but writers need to know all the sequences beforehand, at the time the header is printed. This is because chromosome names in the BCF format are stored as pointers to the dictionary of names in the header. Only BCF writing has this problem and it is possible to make this work when VCF is output. However, it is not worth the effort as simple indexing solves the problem and missing contig names are discouraged anyway. |
How come My workaround by the way is to do:
With
And
|
One issue though, is that it silently fail in my case and does not return a non-zero response in the snakemake pipeline |
@Titorat Please open a new issue with the exact description of the problem. |
given t.vcf of:
the command:
if I bgzip and index, then this command works. This is suprising since normally that is a warning.
output of bcftools --version is:
The text was updated successfully, but these errors were encountered: