I like your time estimates. I will definitely try your program.
Then you'll like this estimate even better:
P:\test>484593-5 bioman.dat 000:001 L[072] (1557,1557)'CCTTCTCATCTGCCGGACCGTGTGCACTTCGCTTCACCTCTGCACGTCG +CATGGAGACC 000:002 L[1271] (0082,0082)'CAGAACCCTGCTCCGACTATTGCCTCTCTCACATCATCAATCTTCTTGA +AGACTGGGGG 000:003 L[225] (1128,1128)'CAATACATGAACCTTTACCCCGTTGCTCGGCAACGGCCAGGCCTGTGCC +AAGTGTTTGC 000:004 L[191] (0619,0619)'TGGGCTTTAGGAAAATACCTATGGGAGTGGGCCTCAGCCCGTTTCTCCT +GGCTCAGTTT 000:005 L[269] (0292,0292)'GGGTGTCCTGGCCAAAATTCGCAGTCCCCAACCTCCAATCACTTACCAA +CCTCCTGTCC 001:002 L[072] (1557,1557)'CCTTCTCATCTGCCGGACCGTGTGCACTTCGCTTCACCTCTGCACGTCG +CATGGAGACC 001:003 L[072] (1557,1557)'CCTTCTCATCTGCCGGACCGTGTGCACTTCGCTTCACCTCTGCACGTCG +CATGGAGACC 001:004 L[080] (1764,1764)'TCTTTGTACTAGGAGGCTGTAGGCATAAATTGGTCTGTTCACCAGCACC +ATGCAACTTT 001:005 L[072] (1557,1557)'CCTTCTCATCTGCCGGACCGTGTGCACTTCGCTTCACCTCTGCACGTCG +CATGGAGACC 002:003 L[320] (1128,1128)'CAATACATGAACCTTTACCCCGTTGCTCGGCAACGGCCAGGCCTGTGCC +AAGTGTTTGC 002:004 L[191] (0619,0619)'TGGGCTTTAGGAAAATACCTATGGGAGTGGGCCTCAGCCCGTTTCTCCT +GGCTCAGTTT 002:005 L[269] (0292,0292)'GGGTGTCCTGGCCAAAATTCGCAGTCCCCAACCTCCAATCACTTACCAA +CCTCCTGTCC 003:004 L[161] (1128,1128)'CAATACATGAACCTTTACCCCGTTGCTCGGCAACGGCCAGGCCTGTGCC +AAGTGTTTGC 003:005 L[510] (2693,2693)'AAACCCTATTATCCTGATAACGTGGTTAATCATTATTTTAAGACCAGAC +ACTATTTGCA 004:005 L[148] (1138,1138)'ACCTTTACCCCGTTGCTCGGCAACGGCCAGGCCTGTGCCAAGTGTTTGC +TGACGCAACC 15 trials of bioman.dat ( 1.948s total), 129.853ms/trial
That projects to a total time for your 300x3k of 1hr 37 minutes.
This is a Inline C (or could be XS) implementation and is the full monty with no restrictions on position or ordering, and will report multiple equal-length matches for all pairings. It is linear in both time (O(n*m)) and space (O(n+1) upto the capacity of your machine). It also supports a "minimum match" parameter though it makes little difference on performance.
It is much faster (2-orders of maginitude (or more)) than anything else I have been able to compare it against.
I would like to compare it against Bio::Tools::dpAlign, but I cannot even work out where to obtain this package. I (re-) installed the lastest Bioperl package, but it was not installed with that, and the install link takes you to the entire BioPerl distribution, but I cannot find either a Bio::Tools::dpAlign, or Bio::Tools package to download. If you succeeded in installing and using B::T::dpAlign, I'd realy like to see your results and timings?
I'm currently working out the best way to package what I have--with Inline::C as a dependancy or using the .xs it produces--as I think this would be useful even if dpAlign is faster. For anyone wanting a Least Common SubString function for simple/non-bioperl use, installing the whole bioperl behemoth is just overkill. I'm also thinking of sticking the Least Common SubSequences algo in there if my optimisation prove to be equally effective on it as on the SubStrings algo.
If you have/are comfortable installing Inline C and want to try this out, left me know and I'll send you the unpackaged version. You can be my guinea pig:)
In reply to Re^7: Search for identical substrings
by BrowserUk
in thread Search for identical substrings
by bioMan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |