Entering edit mode
2.3 years ago
Timotheus
▴
40
Hello,
I'm trying to remove variants that are within 1000 bp of contig ends from by bcf file using BCFtools. I know how to remove those from the beggining:
bcftools filter -i 'POS>1000' my.bcf -o my_filtered.bcf
...but not ends. I thought about adding a column of contig lengths to my vcf when calling with BCFtools mpileup/call
, and doing something like:
bcftools filter -i 'POS>1000 && POS<END-1000' my.bcf -o my_filtered.bcf
but I'm unable to produce the 'END' field. I'd appreciate any help.
Thank you, it works well!