public float compareSequences(Sequence seq1, Sequence seq2)
	{
		float score = 0;
		
		// Translate leading and trailing gaps so that we know to ignore them
		seq1 = seq1.getSequenceWithEdgeGapsTranslated();
		seq2 = seq2.getSequenceWithEdgeGapsTranslated();
		
		for (int i=0;i<seq1.getSize();i++)
		{
			char comparingChar = seq1.getElementAt(i);
			char tempChar = seq2.getElementAt(i);
			if (comparingChar == '-' && tempChar == '-')
			{
				// aligned gaps -- ignore.
			}
			else if (comparingChar == '.' || tempChar == '.')
			{
				// Leading or trailing gaps.  Punish these, but at a lesser rate.
				score -= 1;
			}
			else if (comparingChar == tempChar)
			{
				// match
				score += 1;
			}
			else if (comparingChar == '-' || tempChar == '-')
			{
				// gap in one.
				score -= 2;
			}
			else
			{
				// mismatch
				score += -1;
			}
		}
		
		return score;
	}