Indel conversion issue

Open
#948 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale

Research direction

Reproduce the chr22 example using the mentioned bcftools norm -any and bcftools merge -m all commands, then compare their coordinates with Annovar's conversion. Determine whether the tools can produce consistent representations for this indel and document or verify the expected matching behavior; no source file or test is named in the issue.

Written by the indexing model from the issue text.

Description

I encountered the indel problem, which you partially described in annovar website. The problem is like this,
I have many indels like this,

chr22     10928178 TCC   TCCTCCC,*

If I break them into multiple rows, I will have variant like this,

bcftools norm -any ...
chr22     10928178 TCC   *     
chr22     10928178 TCC   TCCTCCC 

Run Annovar, I will have conversion to the following coordinates

  Chrom    Start      End Ref   Alt   Chrom_o position_o Ref_o Alt_o  
  <chr>    <int>    <int> <chr> <chr> <chr>        <int> <chr> <chr> 
1 chr22 10928178 10928180 TCC   0     chr22     10928178 TCC   *      
2 chr22 10928180 10928180 -     TCCC  chr22     10928178 TCC   TCCTCCC

Before I obtain the final vcf file, I have to merge them using bcftools, and the bctools convert the variants into following,

bcftools merge -m all ....
chr22         10928178 TCC     *  
chr22         10928178 T       TCCTC 

Run Annovar, I will have conversion to the following coordinates

  Chrom    Start      End Ref   Alt   Chrom_GDS position_GDS Ref_GDS Alt_GDS
  <chr>    <int>    <int> <chr> <chr> <chr>            <int> <chr>   <chr>  
1 chr22 10928178 10928180 TCC   0     chr22         10928178 TCC     *      
2 chr22 10928178 10928178 -     CCTC  chr22         10928178 T       TCCTC 

So when I tried to match the annotation data to variants I have this variants can't be matched,

> mappingocmvcf[105877:105878,]
# A tibble: 2 x 8
  Chrom_GDS position_GDS Ref_GDS Alt_GDS Chrom_o position_o Ref_o Alt_o
  <chr>            <int> <chr>   <chr>   <chr>        <int> <chr> <chr>
1 chr22         10928178 TCC     *       chr22     10928178 TCC   *    
2 chr22         10928178 T       TCCTC   NA              NA NA    NA   
> which(mappingovcf$position_o==10928178)
[1] 105877 105878
> mappingocmvcf[105877:105878,]
# A tibble: 2 x 8
  Chrom_GDS position_GDS Ref_GDS Alt_GDS Chrom_o position_o Ref_o Alt_o
  <chr>            <int> <chr>   <chr>   <chr>        <int> <chr> <chr>
1 chr22         10928178 TCC     *       chr22     10928178 TCC   *    
2 chr22         10928178 T       TCCTC   NA              NA NA    NA 

So this problem seems to be like, for this type of indel,

chr22     10928178 TCC   TCCTCCC

Annovar believe insertion happens at

chr22     10928178 TCC   TCC**TCCC**

BCFtools believe insertion happens at

chr22     10928178 TCC   T**CCTC**CC

Both are correct and make sense, but for researchers, the results just don't match, for the output of annovar and bcftools.
I am wondering if it is possible for me to set bcftools to have consistent conversion as annovar or vice versa?

Thanks very much indeed for your great help.

Dominant language
C
Stars
891
Forks
277
Avg merge
2d 23h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from samtools/bcftools

All issues in samtools/bcftools

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.