[Biojava-l] Using REstriction Mapper
mark.schreiber at novartis.com
mark.schreiber at novartis.com
Tue Nov 28 05:55:43 UTC 2006
Hi -
Looks like you forgot to include the bytecode.jar on your classpath. Take
a look at these instructions : http://biojava.org/wiki/BioJava:GetStarted
- Mark
Mark Schreiber
Research Investigator (Bioinformatics)
Novartis Institute for Tropical Diseases (NITD)
10 Biopolis Road
#05-01 Chromos
Singapore 138670
www.nitd.novartis.com
www.dengueinfo.org
phone +65 6722 2973
fax +65 6722 2910
ashish mittal <mittalashr at yahoo.com>
Sent by: biojava-l-bounces at lists.open-bio.org
11/28/2006 12:54 PM
To: biojava-l at lists.open-bio.org
cc: (bcc: Mark Schreiber/GP/Novartis)
Subject: [Biojava-l] Using REstriction Mapper
Hi all,
I am trying to use restriction mapper to search for a list of resctriction
enzymes in a given sequence. Can some one send me some sample code that
does the same. I tried following and this code gives exception:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/biojava/utils/bytecode/CodeException
at
org.biojava.bio.seq.FeatureFilter$OnlyChildren.<clinit>(FeatureFilter.java:1270)
at
org.biojava.bio.seq.FeatureFilter.<clinit>(FeatureFilter.java:1813)
at
org.biojava.bio.seq.SimpleFeatureHolder.<init>(SimpleFeatureHolder.java:52)
at
org.biojava.bio.seq.impl.ViewSequence.<init>(ViewSequence.java:116)
at
org.biojava.bio.seq.impl.ViewSequence.<init>(ViewSequence.java:143)
at
org.biojava.bio.molbio.RestrictionMapper.annotate(RestrictionMapper.java:115)
at seed.rs.rsTry.Searcher.search(Searcher.java:91)
at seed.rs.rsTry.Searcher.main(Searcher.java:101)
CODE:
public class Searcher {
ThreadPool tPool = new ThreadPool() {
public void addRequest(Runnable runnable) {
}
public void startThreads() {
}
public void stopThreads() {
}
public void waitForThreads() {
}
};
RestrictionMapper mapper = new RestrictionMapper(tPool);
/** Creates a new instance of Searcher */
public Searcher() {
}
public void search(){
try {
RestrictionEnzyme res1 = new
RestrictionEnzyme("enz1",DNATools.createDNA("agtg"),0,0);
RestrictionEnzyme res2 = new
RestrictionEnzyme("enz2",DNATools.createDNA("gatt"),0,0);
RestrictionEnzyme res3 = new
RestrictionEnzyme("enz3",DNATools.createDNA("gatg"),0,0);
mapper.addEnzyme(res1);
mapper.addEnzyme(res2);
mapper.addEnzyme(res3);
RestrictionEnzymeManager.register(res1,new TreeSet());
RestrictionEnzymeManager.register(res2,new TreeSet());
RestrictionEnzymeManager.register(res3,new TreeSet());
} catch (IllegalSymbolException ex) {
ex.printStackTrace();
} catch (IllegalAlphabetException ex) {
ex.printStackTrace();
}
//RestrictionEnzymeManager resManager = new
RestrictionEnzymeManager();
try {
Sequence dnaSeq =
DNATools.createDNASequence("agtgattcgtatcgattcggatggtcattttt","my_dnaseq");
Sequence newSeq = mapper.annotate(dnaSeq);
} catch (IllegalSymbolException ex) {
ex.printStackTrace();
}
}
public static void main (String args[])
{
Searcher searcherObj = new Searcher();
searcherObj.search();
}
}
Thanks in Advance.
Ashish
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited
_______________________________________________
Biojava-l mailing list - Biojava-l at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biojava-l
More information about the Biojava-l
mailing list