Minimap2: How does mappy provide supplementary alignments?

Created on 24 Feb 2019  Â·  4Comments  Â·  Source: lh3/minimap2

Hi,

I'm trying to figure out how to get split-reads via mappy. Looking at the exposed fields I'm not seeing one related to supplementary alignments. Are they currently supported?

Thanks.

question

Most helpful comment

Yes, exactly.

All 4 comments

SAM has supplementary mostly for converting bam to fastq. Mappy doesn't have a concept of supplementary. The following code gives both primary and supplementary alignments in SAM.

for h in a.map(seq):
  if h.is_primary:
    print('{}\t{}\t{}'.format(name, len(seq), h)) 

So for a chimeric read with 3 pieces you will get 3 hits that are all
marked primary but have a different h.q_st?

On Tue, Feb 26, 2019 at 4:39 PM Heng Li notifications@github.com wrote:

SAM has supplementary mostly for converting bam to fastq. Mappy doesn't
have a concept of supplementary. The following code gives both primary and
supplementary alignments in SAM.

for h in a.map(seq):
if h.is_primary:
print('{}\t{}\t{}'.format(name, len(seq), h))

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/lh3/minimap2/issues/342#issuecomment-467487729, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFlTB4uTenvT7qoWTXmgrMb9i9jvYvHSks5vRVUUgaJpZM4bOtNs
.

--

Sergei

Yes, exactly.

@lh3 could you possibly add an entry in the FAQ mentioning that supplementary alignments are marked as primary in PAF? I spent quite a bit of time trying to figure this out today and I suspect many others have too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tramaraj picture tramaraj  Â·  4Comments

a-89 picture a-89  Â·  7Comments

wangyugui picture wangyugui  Â·  3Comments

sjackman picture sjackman  Â·  3Comments

gringer picture gringer  Â·  5Comments