Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate INS and DEL events in bcftools merge results #1704

Closed
ahishsujay opened this issue Apr 18, 2022 · 2 comments · Fixed by #1747
Closed

Separate INS and DEL events in bcftools merge results #1704

ahishsujay opened this issue Apr 18, 2022 · 2 comments · Fixed by #1747
Labels
enhancement htslib-dependent Cannot be fixed until htslib is fixed

Comments

@ahishsujay
Copy link

Hi,

I apologize if this question has already been asked, but I needed some clarification and inputs on the merge I am performing. I'm currently merging insertions and deletions for ~40 samples and while performing this I noticed instances where there are deletions happening at a particular site for a few samples but at the same time insertions happening at the same site for other samples (and vice-versa). Here's an example I found in my merged VCF:

chr10	6408	DEL79395-sample1;DEL90355-sample2;INS94796-sample3	AC	A,ACCC	.	PASS	END=6409;ChrB=chr10;StartB=11151;EndB=11151

To reiterate, there seems to be a deletion event at POS=6408 on chr10 for sample1 and sample2 while an insertion event at the same position for sample3. I was wondering if there is a way where they can be separated into separate annotations of insertion and deletion, possibly like this?

chr10	6408	DEL79395-sample1;DEL90355-sample2	AC	A	.	PASS	END=6409;ChrB=chr10;StartB=11151;EndB=11151
chr10	6408	INS94796-sample3	AC	ACCC	.	PASS	END=6409;ChrB=chr10;StartB=11151;EndB=11151

Thank you, I appreciate it!

@pd3
Copy link
Member

pd3 commented Apr 26, 2022

Currently one can control whether SNP records can be merged with indel records (see the --merge option), but not insertions vs deletions. I will mark this as a feature request.

@pd3 pd3 added the htslib-dependent Cannot be fixed until htslib is fixed label Jun 9, 2022
@pd3
Copy link
Member

pd3 commented Jun 9, 2022

The best way to address this is to extend htslib VCF interface as follows

#define VCF_REF      0
#define VCF_SNP      1
#define VCF_MNP      2
//
#define VCF_OTHER    8
#define VCF_BND     16      // breakend
#define VCF_OVERLAP 32      // overlapping deletion, ALT=*
#define VCF_INS     64      // short insertion
#define VCF_DEL    128      // short deletion
#define VCF_INDEL  (VCF_INS|VCF_DEL)

However, as this is a breaking change in the library so may take longer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement htslib-dependent Cannot be fixed until htslib is fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants