I have one long sequence (several kb) (I can cut it into pieces) and I want to find small parts that align (small repeats, from 10 to 500 bp long). What is the best algorithm to use? why? Preferably I want to use inside my python script.
It should allow mismatches and gaps with a penalty (maybe 1 mismatch in 10 bp, one gap).
I've tried pairwise2.align.localxx, but it gave me very long alignments as output.
To be honest this actually sounds like a motif analysis tool might do this.
For example, finding short enriched set of motif repeats in 1 long sequence....maybe try meme for this...you prob wont care for the TFs that bind, but it should find short enriched sequences in your long sequence .... then align those sequences with a multiple sequence aligner.