[Biojava-dev] How to use SimilarityPairBuilder?

Keith James kdj at sanger.ac.uk
Thu Jul 31 10:19:06 EDT 2003


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

    Tim> Hi, I was wondering if someone could give me a few pointers
    Tim> as to how to use the class:

    Tim> org.biojava.bio.program.ssbind.SimilarityPairBuilder

    Tim> I tied to use this class in place of:

    Tim> org.biojava.bio.program.ssbind.BlastLikeSearchBuilder

    Tim> in the BioJava in anger Blast Parser:

    Tim> http://www.biojava.org/docs/bj_in_anger/BlastParser.htm

    Tim> in the hope of being able to re-generate the alignments as
    Tim> they are displayed in the orginal output file.

    Tim> However, i can't quite understand how i get the results back
    Tim> as you do not pass the constructor a java.util.List in which
    Tim> to store the results (as you do with both
    Tim> BlastLikeSerachBuilder and BlastLikeHomology Builder)

Hi Tim,

What happens is that annotated views of queries and hits are
created. These may be examined by fetching them using the methods

public Sequence getAnnotatedQuerySeq(String queryID)

and

public Sequence getAnnotatedSubjectSeq(String subjectID)

    Tim> Also it would appear that you cannot

    Tim> 1) call the method setQuerySeqHolder with DummySequenceDB as
    Tim> a parameter

    Tim> 2) call the method setSubjectDBInstallation with
    Tim> DummySequenceDBInstallation as a parameter.

Well, you can, but as you've discovered you will get exceptions when
the builder tries to attach SimilarityPairFeatures to the query and
hit sequences which are both zero length (being DummySequences). Every
Feature will br out of range. You will need to use real Sequences in
this case.

cheers,

Keith


More information about the biojava-dev mailing list