Possibly documentation issue but hopefully some sort of fix needed: The 10th column on paf output is off by 2x if no aligment is requested. I know paf spec let's those be "approximate" but I'd rather have them way off (like zero or minus one) if they're this much wrong.
See my_read.fastq.zip for difference between 48% identity and 88% identity.
$ minimap2 /data/reference-genomes/lambda_phage/lambda_ref.fasta my_read.fastq |cut -f 10-11
20319 42448
$ minimap2 -c /data/reference-genomes/lambda_phage/lambda_ref.fasta my_read.fastq |cut -f 10-11
37736 43060
That is a documentation issue. I will think about how to improve.
Without base-level alignment, column 10 gives the number of matching bases in the chain. It is often far off. You should look at the dv:f tag instead. It estimates per-base sequence divergence more accurately.
I have added to miniasm/PAF.md that col10 and col11 can be "highly inaccurate". There is little I can do here unfortunately.
Am I right in thinking that (1 - dv:f) * 100 would give an approximate identity?
Yes, approximate.
Most helpful comment
Yes, approximate.