public double checkScore(Alignment ali) {
		int score = 0;
		for (int i = ali.startOfAlignment; i < ali.endOfAlignment; i++) {
			if (ali.aliSeq1.charAt(i) == '-') {
				score += gapOpen + gapExtend;
				i++;
				while (ali.aliSeq1.charAt(i) == '-') {
					score += gapExtend;
					i++;
				}
			}
			else if (ali.aliSeq2.charAt(i) == '-') {
				score += gapOpen + gapExtend;
				i++;
				while (ali.aliSeq2.charAt(i) == '-') {
					score += gapExtend;
					i++;
				}
			}
			else {
				score += submatrix.getValue(ali.aliSeq1.charAt(i), ali.aliSeq2.charAt(i));
			}
		}
		return (score / (double) submatrix.getMultiplicationFactor());
	}