Entering edit mode
12 months ago
conorproud89
▴
20
I'm trying to annotate variants in a vcf file according to:
- position
- variant type
My bcftools command looks something like this:
bcftools annotate -o output_file.vcf -c CHROM,FROM,TO,ALT --annotations annotation_file.bed -k --mark-sites "MY_VARIANT" input_vcf.gz
The problem is bcftools annotate only matches the position of the variant, not the type. Is there a way to make sure that only variants that match the ALT from the bed file are annotated?
https://samtools.github.io/bcftools/bcftools.html
REF is missing.
So I have tried doing that, but, adding in ref throws an error:
So I update
-c CHROM,FROM,-,REF,ALT
(so I'm not sure how that changes how TO is used), but it still doesn't match on the ALT. I'm not familiar enough with bcftools to know if that should work (i.e. my problem is elsewhere) or not.I'm also assuming the ALT should match between the bed file and the vcf file: e.g.
<DEL>
in the bed file should equal<DEL>
in the vcf file