This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to exclude a region with bcftools

Heys,

Quick question here. I want to exclude a region with bcftools, how can I do it? I am aware that I can check specific regions with a file.txt and

bcftools view -R file.txt file.vcf

How can I exclude the very same regions?

Thanks in advance!

bcftools

1 answer

bcftools view -T ^file.txt file.vcf

Sorry, I've just found it, just in case it is useful for my future me or others. Important to add the ^ symbol before the coordinates!

Log in to answer this question.