[Biojava-l] Finding Annotation keys for parsed reports and
inconsistent Blast parsing errors...
Keith James
kdj at sanger.ac.uk
Wed Jul 9 10:46:45 EDT 2003
>>>>> "DL" == DeAngelo Lampkin <dlampkin at xencor.com> writes:
DL> Is there some place that lists all the keys that are stored in
DL> Annotations for various types of reports that are parsed
DL> (specifically BLAST in my case)? Or are we stuck with manually
DL> going in,? listing them all and "seeing before trying". Say
DL> it ain't so! :)
Hi,
The keys are currently documented in the builder which creates the
blast result objects -
org.biojava.bio.program.ssbind.BlastLikeSearchBuilder. Not the most
obvious place, admittedly!
The result objects are quite generic and it is left to the builder to
decide what to put in the annotation. It is now possible to create
typed annotations (using org.biojava.bio.AnnotationType) and the
eventual aim is to get the builders to create e.g. 'BlastAnnotation'
where the keys are better defined and described.
DL> Also, I've been getting inconsistent errors when parsing Blast
DL> reports. Specifically, I get an error when I try parsing a
DL> BLAST report using the BlastParser program given in Biojava in
DL> Anger (nice title BTW) while the Blast2HTML parser in the
DL> demos directory (also using the BlastLikeSaxParser) runs
DL> perfectly fine. So the problem is probably actually in the
DL> ContentHandler or the SeqSimilarityAdapter. Anyway, the error
DL> that the BlastParser program returns is:
DL> ----------------------------- "org.xml.sax.SAXException:
DL> Program ncbi-blastp Version 2.2.6 is not supported by the
DL> biojava blast-like parsing framework at
DL> org.biojava.bio.program.sax.BlastLikeSAXParser.interpret(BlastLikeSAXParser.java:241)
DL> at
DL> org.biojava.bio.program.sax.BlastLikeSAXParser.parse(BlastLikeSAXParser.java:160)
DL> at BlastParser.main(BlastParser.java:43)"
DL> -------------------------
You are getting this message because in one case you are using the
parser in strict mode (where it will explictly check for the flavour
and version of blast and die immediately if necessary) and in the
other case (Blast2HTML) the parser is set to lazy mode where it will
have a go but not guarantee anything.
See main method of Blast2HTML:
/**
* Create a SAX Parser
*/
XMLReader oParser = (XMLReader) new BlastLikeSAXParser();
((BlastLikeSAXParser)oParser).setModeLazy();
I believe that strict is the default. Try setting the demo to lazy for
your output and it should work.
Keith
--
- Keith James <kdj at sanger.ac.uk> bioinformatics programming support -
- Pathogen Sequencing Unit, The Wellcome Trust Sanger Institute, UK -
More information about the Biojava-l
mailing list