# How do you visualize minimap2's PAF output format?

As described by the developer of minimap2:

PAF is a text format describing the approximate mapping positions between two set of sequences.

He also suggest to use either Ribbon to visualize PAF files, or to use minidot from miniasm:

minimap2 -c -x??? asm1.fa asm2.fa > out.paf
minidot out.paf > out.eps && epstopdf out.eps


What does -x??? stand for? And how do you visualize PAF files? Could you think of a way to use IGV to visualize PAF files?

As described in the minimap2 manual, -x STR is used to specify a preset option like -x map-pb for PacBio/Oxford Nanopore read to reference mapping (-Hk19).

In general, I use the -a flag to output alignments in sam format that can then be sorted and converted to bam format, and viewed in any genome browser. The support for PAF format when it comes to visualization appears to be limited. A few options that I have found, but not tested are:

Depending on what level of information you need, it is not difficult to just homebrew a plot in your plotting package of choice, as PAF has relevant coordinate information. Unless you are interested in some more complex features of a plotter such as IGV, I think that this is a good flexible solution.

For example, this R code makes a dot plot of the synteny between the reference and the query:

library(ggplot2)