[Biojava-l] Exception on Running BlastLikeSearchBuilder with null query SequenceDB

Jianjun Wang jwang at biohealthbase.org
Wed Sep 5 11:50:04 UTC 2007


Sure. See attached. 
  _____  

From: Mark Schreiber [mailto:markjschreiber at gmail.com]
To: Jianjun Wang [mailto:jwang at biohealthbase.org]
Cc: biojava-l at lists.open-bio.org
Sent: Tue, 04 Sep 2007 22:06:04 -0400
Subject: Re: [Biojava-l] Exception on Running BlastLikeSearchBuilder with null query SequenceDB

Hi -
  
  Can you post the BLAST output that caused the problem?
  
  - Mark
  
  On 9/4/07, Jianjun Wang <jwang at biohealthbase.org> wrote:
  >
  >  Oh, no, not PsiBlast. I'm using ncbi blastn. Thx.
  > ________________________________
  > From: Mark Schreiber [mailto:markjschreiber at gmail.com]
  > To: Jianjun Wang [mailto:jwang at biohealthbase.org]
  > Cc: biojava-l at lists.open-bio.org
  > Sent: Tue, 04 Sep 2007 10:05:46 -0400
  > Subject: Re: [Biojava-l] Exception on Running BlastLikeSearchBuilder with
  > null query SequenceDB
  >
  >
  > Hello -
  >
  >  Just out of interest what type of blast were you running. Some of the
  >  more exotic forms like PSIBlast probably don't work well.
  >
  >  - Mark
  >
  >  On 9/4/07, Jianjun Wang <jwang at biohealthbase.org> wrote:
  >  > Hi Colleagues,
  >  >
  >  > I used the Blast parsing example from the Biojava tutorial and ran into
  > this problem:
  >  > ######################
  >  > Failed to build SeqSimilaritySearchResult:
  >  > org.biojava.bio.BioException: Running BlastLikeSearchBuilder with null
  > query SequenceDB
  >  > at
  > org.biojava.bio.program.ssbind.BlastLikeSearchBuilder.makeSearchResult(BlastLikeSearchBuilder.java:239)
  >  > at
  > org.biojava.bio.program.ssbind.BlastLikeSearchBuilder.endSearch(BlastLikeSearchBuilder.java:319)
  >  > at
  > org.biojava.bio.program.ssbind.SeqSimilarityStAXAdapter.endElement(SeqSimilarityStAXAdapter.java:119)
  >  > at
  > org.biojava.utils.stax.SAX2StAXAdaptor.endElement(SAX2StAXAdaptor.java:153)
  >  > at
  > org.biojava.bio.program.ssbind.SeqSimilarityAdapter.endElement(SeqSimilarityAdapter.java:136)
  >  > at
  > org.biojava.bio.program.sax.AbstractNativeAppSAXParser.endElement(AbstractNativeAppSAXParser.java:300)
  >  > at
  > org.biojava.bio.program.sax.BlastSAXParser.parse(BlastSAXParser.java:181)
  >  > at
  > org.biojava.bio.program.sax.BlastLikeSAXParser.onNewDataSet(BlastLikeSAXParser.java:311)
  >  > at
  > org.biojava.bio.program.sax.BlastLikeSAXParser.interpret(BlastLikeSAXParser.java:274)
  >  > at
  > org.biojava.bio.program.sax.BlastLikeSAXParser.parse(BlastLikeSAXParser.java:160)
  >  >
  >  > ###########################
  >  >
  >  > I experimented with both supported Blast versions such as 2.2.3 and later
  > ones, such as 2.2.13, and with the lazymode both on and off, and concluded
  > that this problem is independent of Blast version and the lazymode. My
  > debugging didn't yield much fruit, except that the obvious cause of the
  > exception was BlastLikeSearchBuilder.querySeqHolder being
  > null. Can someone shed some light on this?
  >  >
  >  > Here is the relevant section of my code:
  >  >
  >  > try {
  >  > StringReader sr = new StringReader(in);
  >  > BlastLikeSAXParser parser = new BlastLikeSAXParser();
  >  > //works for 2.2.13?
  >  > //parser.setModeLazy();
  >  >
  >  > //make the SAX event adapter that will pass events to a Handler.
  >  > SeqSimilarityAdapter adapter = new SeqSimilarityAdapter();
  >  >
  >  > //set the parsers SAX event adapter
  >  > parser.setContentHandler(adapter);
  >  >
  >  > //The list to hold the SeqSimilaritySearchResults
  >  > //List results = new ArrayList();
  >  >
  >  > //create the SearchContentHandler that will build
  > SeqSimilaritySearchResults
  >  > //in the results List
  >  > SearchContentHandler builder = new
  > BlastLikeSearchBuilder(results);
  >  >
  >  > //register builder with adapter
  >  > adapter.setSearchContentHandler(builder);
  >  >
  >  > //parse the file, after this the result List will be populated with
  > SeqSimilaritySearchResults
  >  > parser.parse(new InputSource(sr));
  >  >
  >  > //output some blast details - expect 1 result only
  >  > ......
  >  >
  >  > Thanks,
  >  > Jianjun
  >  > _______________________________________________
  >  > Biojava-l mailing list - Biojava-l at lists.open-bio.org
  >  > http://lists.open-bio.org/mailman/listinfo/biojava-l
  >  >
  >
    
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blastResult.out
Type: application/octet-stream
Size: 40183 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/biojava-l/attachments/20070905/9a9850d9/attachment-0002.obj>


More information about the Biojava-l mailing list