[Biojava-l] needleman-wunsch score problems

Erik C erikclarke at gmail.com
Fri Apr 15 02:41:48 UTC 2011


Hi all,
I'm having some trouble reconciling the scores from the NeedlemanWunsch
sequence alignment object in BioJava with the scores I'm getting from the
EMBL-EBI command-line tool 'needle'. Specifically, for the same sequences,
matrix, and penalties, BioJava returns 274 (in one case), while `needle'
returns 163.
Does anybody have any ideas as to why this might be happening? Is there a
parameter or setting I'm missing? My implementation of the n.w. code in
biojava is below:

    public long alignTwoSequences(ProteinSequence subject,
            ProteinSequence target) {

        SubstitutionMatrix<AminoAcidCompound> blosum62 =
SubstitutionMatrixHelper.getBlosum62();
        GapPenalty penalties = new SimpleGapPenalty();
        penalties.setExtensionPenalty((short) .5);
        penalties.setOpenPenalty((short) 10);
        NeedlemanWunsch<ProteinSequence, AminoAcidCompound> nw = new
NeedlemanWunsch<ProteinSequence, AminoAcidCompound>(subject, target,
penalties, blosum62);
        return nw.getScore();

    }

Thanks,
Erik



More information about the Biojava-l mailing list