bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

Get identical variants from vcf using the given file

Open sssimonyang opened this issue 3 years ago • 3 comments

Hello!

In my vcf after splitting multiallelic sites, it has two or more variants on one site. like this:

10      89623861        .       T       A
10      89623861        .       T       C

In using -T sites.txt generated by bcftools isec to get variants from this vcf, It will return both two variants only using the chr and start in file to match.

10      89623861        T      C       11

This behavior is same as manual description. However, this behavior is not ideal for me to get identical variants from vcf.

I know this can be achieved by using bcftools isec -c none, but this way of extraction is not direct.

So, Is there any way which can get variants having the same Chr Start Ref Alt as the file provided?

If no, could it be implement in future? I think it is a useful choice added in -T and -t params.

My bcftools version is 1.13 in example.

sssimonyang avatar Aug 24 '21 13:08 sssimonyang

Just noting this is a duplicate of https://github.com/samtools/bcftools/issues/1320

pd3 avatar Aug 24 '21 16:08 pd3

Thanks

sssimonyang avatar Aug 25 '21 03:08 sssimonyang

I will leave this open, my comment was just to cross-reference the issues

pd3 avatar Aug 25 '21 06:08 pd3