I used minimap2 to produce an alignment and I outputted it into 2 formats, .paf and .sam. I did some filtering on the .paf version and now I would like to filter the alignments in the .sam file the same way. How can I use the filtered .paf file to filter the .sam file so that only the same alignments exist in each file?
Just save yourself a lot of pain and learn to filter the sam/bam file efficiently. It is much more of a widespread standard than PAF.