[Biopython] allow ambiguities is sequence matching?

Cedar McKay cmckay at u.washington.edu
Thu Nov 19 23:42:12 UTC 2009


Hello all,
Apologies if this is covered in the tutorial anywhere, if so I didn't  
see it.

I am trying to test whether sequence A appears anywhere in sequence B.  
The catch is I want to allow n mismatches. Right now my code looks like:

#record is a SeqRecord
#query_seq is a string
if query_seq in record.seq:
	do something


If I want query_seq to match despite n nucleotide mismatches, how  
should I do that? It seems like something that would be pretty common  
for people working with DNA probes. Is this even a biopython problem?  
Or is it just a general python problem?

thanks,
Cedar




More information about the Biopython mailing list