Minimap2: supplementary alignment PAF
1
0
Entering edit mode
6.5 years ago
VHahaut ★ 1.2k

Hi!

I am trying to parse PAF file generated from minimap2.1 to get primary and supplementary alignments of reads but excluding secundary alignments. In SAM format I would search for flags: 0, 16, 2048 and 2064. Unfortunately I don't currently find a nice way to get the same information out of PAF file.

Does anyone knows how to retrieve supplementary/primary but not secundary alignments from PAF file?

minimap2 • 4.9k views
ADD COMMENT
0
Entering edit mode
6.1 years ago
lolec ▴ 20

Hi,

According to minimap2 man page, the "tp" tag in the thirteenth column indicates the type of alignment: either primary, secondary or inversion.

Therefore, if you want only primary or supplementary, you can simply filter as follow :

awk '($13~"tp:A:P")  {print $0}' file.paf > filtered_file.paf
ADD COMMENT

Login before adding your answer.

Traffic: 1553 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