[Biojava-l] parsing BLAST result

Charles Imbusch charles at imbusch.net
Wed Jul 23 23:22:52 UTC 2008


Thanks for that information. That did the job!

Cheers,
  Charles

Richard Holland wrote:
> Your hits consist of numerous sub-hits, which means that the hits
> themselves don't contain meaningful data. You can get the sub-hits by
> doing this:
>
>         // existing code to list the hits
>         for (Iterator k = result.getHits().iterator(); k.hasNext(); ) {
>           SeqSimilaritySearchHit hit = (SeqSimilaritySearchHit)k.next();
>           System.out.print("\tmatch: "+hit.getSubjectID());
>           System.out.print("\tSubSeqStart: "+hit.getSubjectStart());
>           System.out.print("\tSubSeqStop:  "+hit.getSubjectEnd());
>           System.out.println("\te score: "+hit.getEValue());
>
>           // new code to get the subhits
>           System.out.println("\t\t Subhits:");
>           for (Iterator j = hit.getSubHits().iterator(); j.hasNext(); ) {
>              SeqSimilaritySearchSubHit subhit =
> (SeqSimilaritySearchSubHit)j.next();
>              System.out.print("\t\tSubSeqStart: "+subhit.getSubjectStart());
>              System.out.print("\t\tSubSeqStop:  "+subhit.getSubjectEnd());
>              System.out.println("\t\te score: "+subhit.getEValue());
>           }
>         }
>
>
> cheers,
> Richard
>   




More information about the Biojava-l mailing list