FW: [Biojava-l] Newbie Question 1: Searching Sequences

Schreiber, Mark mark.schreiber@agresearch.co.nz
Thu, 24 Oct 2002 11:11:35 +1300


Sorry meant to forward this to the list

-----Original Message-----
From: Schreiber, Mark 
Sent: Thursday, 24 October 2002 11:07 a.m.
To: 'andy hammer'
Subject: RE: [Biojava-l] Newbie Question 1: Searching Sequences


Hi -

To find an exact match you can use the KnuthMorrisPrattSearch from
org.biojava.bio.search package. This uses the very efficient KMP
algorithm. Probably a similar one is used by the String class.

For non-exact matches you'll probably need to use the MarkovModel
classes or the WeightMatrix class from the org.biojava.bio.dp package.
This is roughly equivalent to regular expression parsing.

- Mark


> -----Original Message-----
> From: andy hammer [mailto:ahammer@genetics.utah.edu]
> Sent: Thursday, 24 October 2002 10:57 a.m.
> To: biojava-l@biojava.org
> Subject: [Biojava-l] Newbie Question 1: Searching Sequences
> 
> 
> In the file bootcamp_blast.tar.gz I found MotifFinder.java. It 
> searches sequences for a motiff Symbol by Symbol. If I am searching 
> 4MB file, that could take awhile. By contrast, I can search a string 
> very quickly with the
> indexOf("motiff") function. My question: Is there a better
> way to search a sequence for a motiff?
> 
> Andy Hammer
> University of Utah
> Human Genetics
> 
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
> 
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================