The question is a bit unclear, so let me explain. Finding local alignments in sequences like protein sequence is a well studied area in bioinformatics, and I do not think there is any lack of information on that.
However, recently, I had to tackle a problem in which sequences had partial orders - meaning that some parts of the sequences (if you can even call it that) was not imposed a strict restriction of ordering.
For example, we could have a protein sequence of
GAC(AG)TT, where the brackets denote that any elements within them can be freely reordered. Hence, the sequence can be viewed as either
A naive way to approach the problem is to compare all possible configurations of sequences, but the problem size becomes exponentially larger as the number of brackets (clusters of freely interchangeable elements) and the numbers of elements in each bracket increase.
I have tried looking up in algorithm textbooks, googling in general webpages and publications, but I could not find the slightest hint of such problem. It seems very peculiar (or very unlikely) that such a general problem has not been mentioned anywhere until now. So please, could anyone here shed some light on my question? Thank you.