public static double calculatePIdent(Hit h) {
        if(h==null){
            return 0;
        }
        if(h.getHitHsps()==null){
            return 0;
        }
        for(Hsp hsp:h.getHitHsps().getHsp()){
            if(hsp.getHspIdentity()==null){
                return 0;
            }
            if(hsp.getHspAlignLen()==null){
                return 0;
            }
        }

        double identities = 0;
        for(Hsp hsp:h.getHitHsps().getHsp()){
            identities+=Double.parseDouble(hsp.getHspIdentity());
        }
        double alingnmentLenght = 0;
        for(Hsp hsp:h.getHitHsps().getHsp()){
            alingnmentLenght+=Double.parseDouble(hsp.getHspAlignLen());
        }
        return Math.ceil(identities * 100 / alingnmentLenght);
    }