[Biojava-dev] How to use SimilarityPairBuilder?

Keith James kdj at sanger.ac.uk
Tue Aug 5 11:09:18 EDT 2003


>>>>> "Tim" == Tim Troup <troup at dcs.gla.ac.uk> writes:

[...]

    Tim> In my particular case I retrieve Blast output over the web
    Tim> (from NCBI) as i do not have the target database held
    Tim> locally. So i thought i would try to set the
    Tim> SequenceDBInstallation to be a SimpleSequenceDBInstallation
    Tim> holding an instance of NCBISequenceDB as shown below.

    Tim> However when i try this approach a null pointer gets thrown
    Tim> as shown in the stack trace. From looking at the BioJava
    Tim> source code it would appear that the subHitData Map in class
    Tim> SimilarityPairBuilder does not have a key called HitId OR if
    Tim> it does its value is null.

Hi Tim,

I spotted a bug in the superclass of SimilarityPairBuilder leading to
it not retrieving the database indicated in the blast output. I've
fixed this in cvs. The parser chain will call the setDatabaseID method
for you when it comes across a database ID at the head of a blast
report.

The builder should be getting all the events from the parser, so if
HitId is absent/null then this points to an error farther back in the
parser chain. If you run the same output through
demos/eventbasedparsing/Blast2HTML do you see the hit IDs reported? If
it parses correctly then the problem is in the builder.

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-dev mailing list