As the title states, I've got two sets of unaligned amino acid sequences (~25k sequences in one, ~3k in the other). I want to find the minimum distance between a sequence in the first set and a sequence in the second, expressed in terms of percent identity (so, maximum percent identity). So far I've only been able to find R packages that will compute percent identity for two already aligned sequences, which would then allow me to do a double loop over both sets of sequences to find the shortest distance between them. But this seems woefully inefficient - is there an easier/faster way? I also tried playing around with mmseqs2 but couldn't tell if there was a way to use it for anything other than clustering.
To clarify - there is a large amount of variation between the sequences in question, including in overall length (ranging from 148 residues to 872). They don't all belong to one family of homologs or anything. I'm expecting many of them to have quite low identity with each other. But the constraints of the problem I'm working on require me to put a number on that identity, or at least an upper bound.
I'm not constrained to using R, it's just what I'm most familiar with. Solutions with command line tools or python would also be fine - I'm sure there are better tools out there that I'm not aware of.