Open AnnaMontaner opened 1 year ago
That sounds very odd indeed. This is such a basic functionality that most likely you are doing something wrong. I am unable to help without a small test case.
I noticed something similar. Some regions get lost, but when I use -R <(grep 'chr1' chr1.region.bed)
or -R <(cat chr1.region.bed)
, the missed regions are considered.
I noticed the odd behavior when running bcftools mpileup
.
Tried version 1.8 and 1.15.1. The behavior is similar.
I want the opposite of -R, where all regions except those listed in file.txt are extracted.
What is the best option available in bcftools?
This should work --targets-file ^file.txt
, see the documentation here http://samtools.github.io/bcftools/bcftools.html
Please open a new issue next time, this is unrelated to the problem discussed here
Thank you for the swift response! Jaison Sequeira
Dept. of Applied Zoology Mangalore University
On Wed, 7 Aug, 2024, 23:05 Petr Danecek, @.***> wrote:
This should work --targets-file ^file.txt, see the documentation here http://samtools.github.io/bcftools/bcftools.html
Please open a new issue next time, this is unrelated to the problem discussed here
— Reply to this email directly, view it on GitHub https://github.com/samtools/bcftools/issues/1966#issuecomment-2273984382, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2H3GUDPHBJUWCFWHLBGPWDZQJLHLAVCNFSM6AAAAABMC6GOGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZTHE4DIMZYGI . You are receiving this because you commented.Message ID: @.***>
Hi,
I am using bcftools view -R regions.bed input.vcf.gz to extract only those variants present in regions.bed. However, I get only those variants not present in regions.bed, so exactly the opposite. I really don't know what is going on... Any help?
Thanks!
Anna