Minimap2: MD tag

Created on 18 Nov 2017  路  8Comments  路  Source: lh3/minimap2

Hi,
are you planing to provide the MD tag at some point? Or should I rely on samtools to reconstruct this information?

Thanks
Fritz

feature-request question

Most helpful comment

Oh, I forgot that you had requested the MD tag, @fritzsedlazeck. There have been a few independent requests on MD recently, so I have decided to implement it in minimap2. The next release will support MD.

All 8 comments

My current plan is to ditch MD and introduce a new cs tag instead. The problem with MD is that it is not a standalone tag. You have to parse query sequence, cigar and MD at the same time. In comparison, cs encodes cigar. You can parse cs alone.

Interesting, would make life easier for sure.
Thanks
Fritz

Hi Fritz,
Working with Pysam I also found this particularly frustrating,
methods such as get_reference_sequence() rely on the MD tag, I'm sure it's only a matter of time before they can incorporate the cs tag as a substitute.

I found that running
samtools calmd bam_file reference_file > new_bam_file would add in the md tag as needed.

Cheers,
Alexis.

Hi Alexis,
This is certainly true but very slow. Minimap2 has all the information during the running time since it writes it out in the cs string.

I will incorporate the cs string soon into my program to support the necessary step to replace cigar and MD string with it.

Cheers
Fritz

Oh, I forgot that you had requested the MD tag, @fritzsedlazeck. There have been a few independent requests on MD recently, so I have decided to implement it in minimap2. The next release will support MD.

Are you still pushing for the cs string? I think it would make things easier for us compared to MD + cigar...

cs will certainly stay in minimap2. The PAF output needs this tag anyway as PAF doesn't store the query sequence like SAM. My assembly-to-assembly variant caller is unable to work MD, either.

I think it would be nice to add a tool to samtools to generate the cs tag, similar to samtools calmd.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

a-89 picture a-89  路  7Comments

llevar picture llevar  路  4Comments

Adamtaranto picture Adamtaranto  路  5Comments

gringer picture gringer  路  5Comments

aniram118 picture aniram118  路  5Comments