Question: Minimap2: supplementary alignment PAF
0
gravatar for VHahaut
15 months ago by
VHahaut1.1k
Belgium
VHahaut1.1k wrote:

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 • 1.0k views
ADD COMMENTlink modified 10 months ago by lolec10 • written 15 months ago by VHahaut1.1k
0
gravatar for lolec
10 months ago by
lolec10
France
lolec10 wrote:

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 COMMENTlink written 10 months ago by lolec10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 907 users visited in the last hour