Note that there are some explanatory texts on larger screens.

plurals
  1. PODatabase design for storing LCS information?
    primarykey
    data
    text
    <p>I have a table that contains 2 columns, one is a id, and other is column containing long strings eg.</p> <pre><code>Id strings 1 AGTTAGGACCTTACTCTATATCTGTTCTGTTGGTATGGAG 2 GTACTTGTATTCTGATATCTAGGGTTTTCTAATTACTTCTG 3 GTATTCTCTTTCTAGCTGATCGTAATTAAATCTTATCTAA </code></pre> <p>when the user is performing a search, I would find the longest common subsequence in the search string and all the data in the table. Eg. the search sequence is</p> <blockquote> <p>TCTGTTCTG</p> </blockquote> <pre><code>1. Its a 100% match, with the whole match found. 2. The LCS is TCTGTTCTG, but with some gaps. 3. The LCS is TCTGTTCT, with some gaps in BTW. </code></pre> <p>Is there a way to store the information about the match that where exactly it started finding the match and then upto where it found the match, and then where it started again and so on? So, that I can represent data in somewhat this format</p> <pre><code>First one =&gt; AGTTAGGACCTTACTCTATATCTGTTCTGTTGGTATGGAG ||||||||| TCTGTTCTG Second one =&gt; GTACTTGTATTCTGATATCTAGGGTTTTCTAATTACTTCTG | || | ||||| T CT G TTCTG </code></pre> <p>Basically <strong><em>somehow I could store this, start and end position for each sequence for each subsequence found, so that when I show this page again in future, I don't have to compute this match again and can somehow pick out this data about start and end from database and just show this in the format shown</em></strong>? I know the question might be a little hazy, but please let me know how else I can elaborate if you have any doubts?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload