private static final int MAX_NAME_LENGTH = 30;
//&!
- private static final int GAP_OPEN_COST = 120;
- //private static final int GAP_OPEN_COST = 100;
+ //private static final int GAP_OPEN_COST = 120;
+ private static final int GAP_OPEN_COST = 100;
- private static final int GAP_EXTEND_COST = 20;
- //private static final int GAP_EXTEND_COST = 5;
+ //private static final int GAP_EXTEND_COST = 20;
+ private static final int GAP_EXTEND_COST = 5;
private static final int GAP_INDEX = -1;
int trace;
maxscore = score[i][j] / 10f;
- //&! get trailing gaps
+ //prepare trailing gaps
while ((i < seq1.length - 1) || (j < seq2.length - 1))
{
i++;
count = (seq1.length + seq2.length) - 1;
- //&! get trailing gaps
+ //get trailing gaps
while ((i >= seq1.length) || (j >= seq2.length))
{
if (i >= seq1.length)
sb2.append(s2str.charAt(j));
}
- //&! get initial gaps
+ //get initial gaps
while (j > 0 || i > 0)
{
if (j > 0)
{
+ j--;
sb1.append("-");
sb2.append(s2str.charAt(j));
- j--;
} else if (i > 0) {
+ i--;
sb1.append(s1str.charAt(i));
sb2.append("-");
- i--;
}
}
float prescore = score; // only debug
score *= coverage;
- System.out.println(String.format("prepre-score: %f, pre-score: %f, longlength: %d\nscore: %f, mean: %f, max: %d", preprescore, prescore, _max[1], score, this.meanScore, this.hypotheticMaxScore));
- this.alignmentScore = (preprescore < 1) ? Float.NaN : score;
+ System.out.println(String.format("prepre-score: %f, pre-score: %f, longlength: %d\nscore: %1.16f, mean: %f, max: %d", preprescore, prescore, _max[1], score, this.meanScore, this.hypotheticMaxScore));
+ float minScore = 1f;
+ this.alignmentScore = (preprescore < minScore) ? Float.NaN : score;
}
}