Hello,

Sorry to pepper the board with questions! I am working on BLAST parsing and have the standard output for BLAST working fine with JUnit tests. So I am attempting to recreate this for files in XML format coming from blast (blastp), however I have the problem that I get a SAXException that content is not allowed before prolog. I thought I could have some invisible characters which is causing it to throw a wobbly but I cannot see any. Has anyone else come across the problem? For completeness, the file can be downloaded at : http://idisk-srv1.mpi-cbg.de/~benn/xmloutput.xml (the mailing list server would not me attach the file to the email) and the code which parses is below:

<code>
 private List<SeqSimilaritySearchResult> parseBlast(String filename)
         throws IOException, SAXException, BioException {

     InputStream is = new FileInputStream(
             "src/test/resources/blast/standardoutput.blastp");

     BlastXMLParserFacade parser = new BlastXMLParserFacade();
     SeqSimilarityAdapter adapter = new SeqSimilarityAdapter();
     parser.setContentHandler(adapter);
List<SeqSimilaritySearchResult> results = new ArrayList<SeqSimilaritySearchResult>();

     SearchContentHandler builder = new BlastLikeSearchBuilder(results,
             new DummySequenceDB("queries"),
             new DummySequenceDBInstallation());

     adapter.setSearchContentHandler(builder);

     parser.parse(new InputSource(is));
     return results;
 }
</code>

Cheers,

Neil
_______________________________________________
Biojava-l mailing list  -  [email protected]
http://lists.open-bio.org/mailman/listinfo/biojava-l

Reply via email to