Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Intersecting Two Strings

by lima1 (Curate)
on Aug 22, 2007 at 12:38 UTC ( [id://634325]=note: print w/replies, xml ) Need Help??


in reply to Re: Intersecting Two Strings
in thread Intersecting Two Strings

It seems that OP's problem is an easy special case of the LCS problem. We have one big string S and 2 substrings (seq1, seq2) with known coordinates within S:
S: CTGCCACCGCTGTGTTTCGGCCGGCGAXXXXXXXXXXXXXXXXXXXXX seq1: CTGCCACCGCTGT (Pos: 0) seq2: ACCGCTGTGTTTCGGCCGGCGA (Pos: 5)
So it's a trivial O(1) algorithm to calculate the overlap with the substring positions and lengths.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://634325]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found