[Biojava-l] Blast2HTMLHandler.java bug

Simon Foote foote@nrcbsa.bio.nrc.ca
Thu, 14 Feb 2002 14:44:02 -0500


Hi Simon,

I've found a bug in the Blast2HTMLHandler code.  In the hit summary 
section that it produces, the score and expect values are shifted by 1 
result.  Thus, the first hit has the score & expect from the 2nd and so on.

I fixed it as follows (not sure if this is correct way, but it seems to 
work):

- removed the else part of the if statement at lines 173-178: (in 
startElement method)
    } else {
              oRenderer.writeCurrentSummary( oHitSummary );
    }
- added to endElement method above line 273:
    } else if ( poElementName.equals( "HitSummary" ) ) {
        oRenderer.writeCurrentSummary( oHitSummary );

Regards,
Simon Foote

-- 
Bioinformatics Specialist
Institute for Biological Sciences
National Research Council of Canada
[T] 613-991-4342  [F] 613-952-9092