This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Approximate matching to find similar DNA sequence

Hi,

I am trying to fuzzily match a DNA sequence, like "ATCATTA" in "agATCGTTAgtatt", but I would like that some errors can be tolerant, such as mismatch, insertion or deletion for seed sequence - "ATCATTA". Do you have any method with Perl or Python?

genome

The solution depends on how many such sequences you have and how many to search.

Wonderful !!! It works well. Lots of thanks to you!

2 answers

take a look here - fuzzysearch

Wonderful !!! It works well. Lots of thanks to you!

Wonderful !!! It works well. Lots of thanks to you!

hi, I had a further question. I want to match the pattern "aggacctgct.+aggcgctcaacgg" for "aggacctgctGGCCAAGACCGCTGAGAACAaggcgctcaacgg" using fuzzysearch, but it couldn't work. And how can I take the subsequence out if there are some errors in the pattern? Thanks.

or this agrep

I could approximately match a subsequence by agrep, but if I would like to only take the subsequence out rather than the whole row, what should I do? And I haven't found the related parameters to address the problem. Thanks!!!

Log in to answer this question.