[Biojava-l] Blast xml parsing

mark.schreiber at novartis.com mark.schreiber at novartis.com
Tue Jun 20 02:51:57 UTC 2006


Hi Jose -

The orginal recipe parses the standard text output of BLAST. The 
modification you correctly made allows it to parse the XML output.

- Mark





Jose Duarte <duarte at molgen.mpg.de>
Sent by: biojava-l-bounces at lists.open-bio.org
06/19/2006 08:35 PM

 
        To:     Jose Duarte <duarte at molgen.mpg.de>
        cc:     biojava-l at biojava.org, mark.schreiber at novartis.com
        Subject:        Re: [Biojava-l] Blast xml parsing


Jose Duarte wrote:

>mark.schreiber at novartis.com wrote:
>
> 
>
>>Hi -=
>>
>>I'm not sure where the percent identity gets sent but you can find out 
by 
>>using the example code 
>>(http://biojava.org/wiki/BioJava:CookBook:Blast:Echo).
>>
>>It is also a nice code base for making a custom blast parser that is not 

>>so object heavy. 
>> 
>>
>Thanks, that sounds good. However I have tried to run the BlastEcho.java 
>code and got following error:
>
>Exception in thread "main" org.xml.sax.SAXException: Could not recognise 
>the format of this file as one supported by the framework.
>    at 
>org.biojava.bio.program.sax.BlastLikeSAXParser.parse(BlastLikeSAXParser.java:182)
>    at BlastEcho.echo(BlastEcho.java:29)
>    at BlastEcho.main(BlastEcho.java:75)
>
>I am pretty sure that my xml file is well formated blast output. 
>Actually I've been parsing it already with code using biojava's 
>BlastXMLParser without problems. My blast version is blastp 2.2.10.
>
>Also this is happening despite BlastEcho calling the setModeLazy() 
>method of the parser object. As I understand it shouldn't be checking 
>for versions using this mode.
> 
>

I think I can answer my question now. I just found out that for some 
reason replacing line 17 in BlastEcho.java:

    BlastLikeSAXParser parser = new BlastLikeSAXParser();

for:

    BlastXMLParserFacade parser = new BlastXMLParserFacade();

it all works fine.

I have no idea what's the difference between the BlastLikeSAXParser and 
the BlastXMLParserFacade classes but it looks as it works as good. I can 
change the code in the wiki if somebody can confirm this is correct.

Cheers

Jose

_______________________________________________
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