Alternative gap introduced when comparing insertion/deletion results between minimap2 and STAR2
1
0
Entering edit mode
6 months ago

Hi, When I tried to match the insertion/deletion (INDEL) events between 1) RNA-seq reads aligned by STAR against human reference genome hg38. 2) RNA-seq reads aligned by minimap against transcript sequences (gencode v36), I noticed that it's hard to match those indel events by genomic position. After inspected the aligned reads, I noticed that STAR and minimap2 introduced the gap for INDEL at different positions:

Alignment: (by minimap2)

Refer : GCTACATGGC -TTTTTTGACGTATGACGAAGTGAAAGC
Query: GCTACATGGCTTTTTTTGACGTATGACGAAGTGAAAGC

Alignment: (by STAR2)

Refer : GCTACATGGCTTTTTT- GACGTATGACGAAGTGAAAGC
Query: GCTACATGGCTTTTTTTGACGTATGACGAAGTGAAAGC

The results affect the downstream analysis, for example, after called the variants follower by annotation, it would report different positions of the INDEL: enter image description here

Are there any way to solve this issue? Thanks!

STAR insertion minimap2 alignment deletion • 649 views
ADD COMMENT
2
Entering edit mode

I noticed that STAR2 and minimap2 introduced the gap for INDEL at different positions:

These programs are meant for different types of data/applications. By STAR2 I assume you mean STAR v.2.x?

ADD REPLY
0
Entering edit mode

Thanks! I am using STAR 2.7.11a.

ADD REPLY
3
Entering edit mode
6 months ago
Rob 6.9k

As GenoMax points out, there is no “STAR2”, the tool is just “STAR”. Nonetheless, the behavior you report is completely normal for both tools. The alignments returned here, under the same parameters, are of equivalent score. It is quite common for there to exist many optimal alignments of the same pair of sequences, where “tie breaking” choices are made in different ways depending on the specific implementations of the underlying algorithm. While the underlying alignment library of minimiap2 (ksw2) does, I believe, have the ability to set a left-aligned or right-aligned preference for gap characters, I don’t believe this capability is exposed within minimap2 itself.

If you really need to normalize for differences such as this, I suggest you give the LeftAlignIndels tool a try, which will go through the SAM/BAM file and convert such cases to normalize aligning the indels to the left where possible.

ADD COMMENT
0
Entering edit mode

Thanks! Your explanation totally make sense. I will try LeftAlignIndels.

ADD REPLY

Login before adding your answer.

Traffic: 1610 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6