Hi,
I am aligning ONT reads to a reference and I wonder if in minimap2 there is a way to discard (or filter out from the output file?) alignments that do not span a minimum fraction of the query length (e.g. 0.8).
On a similar note, how to minimize secondary and spurious alignments (e.g. to have good alignments for mpileup or similar)? -N 0 and -p 1.0?
thanks
I wonder if in minimap2 there is a way to discard (or filter out from the output file?) alignments that do not span a minimum fraction of the query length (e.g. 0.8).
Please post-process the output alignment with your own script. I might consider to add an option in future.
how to minimize secondary and spurious alignments (e.g. to have good alignments for mpileup or similar)? -N 0 and -p 1.0?
Mpileup ignores secondary alignments. Please don't use -N0 -p1. This will lead to much worse alignment.
After a second thought, I wouldn't add an option to set a min fraction of the query length. For nanopore, there are often alignment splits due to long gaps. Such a filter would remove many of these alignments. It is hard to find a general way to filter alignments. Filtering is highly task dependent.