*/
package jalview.analysis;
+import java.util.Locale;
+
import jalview.analysis.scoremodels.PIDModel;
import jalview.analysis.scoremodels.ScoreMatrix;
import jalview.analysis.scoremodels.ScoreModels;
public AlignSeq(SequenceI s1, String string1, SequenceI s2,
String string2, String type)
{
- seqInit(s1, string1.toUpperCase(), s2, string2.toUpperCase(), type);
+ seqInit(s1, string1.toUpperCase(Locale.ROOT), s2,
+ string2.toUpperCase(Locale.ROOT), type);
}
/**
}
}
- output.append(NEWLINE);// .append(NEWLINE);
+ output.append(NEWLINE).append(NEWLINE);
}
pid = pid / (aseq1.length - count) * 100;
for (int j = 1; j < m; j++)
{
// What should these values be? 0 maybe
- E[0][j] = max(score[0][j - 1] - GAP_OPEN_COST, E[0][j - 1] - GAP_EXTEND_COST);
+ E[0][j] = max(score[0][j - 1] - GAP_OPEN_COST,
+ E[0][j - 1] - GAP_EXTEND_COST);
F[0][j] = -GAP_EXTEND_COST;
float pairwiseScore = scoreMatrix.getPairwiseScore(s1str.charAt(0),
s2str.charAt(j));
- score[0][j] = max(pairwiseScore * 10, -GAP_OPEN_COST, -GAP_EXTEND_COST);
+ score[0][j] = max(pairwiseScore * 10, -GAP_OPEN_COST,
+ -GAP_EXTEND_COST);
traceback[0][j] = 1;
}
for (int i = 1; i < n; i++)
{
E[i][0] = -GAP_OPEN_COST;
- F[i][0] = max(score[i - 1][0] - GAP_OPEN_COST, F[i - 1][0] - GAP_EXTEND_COST);
+ F[i][0] = max(score[i - 1][0] - GAP_OPEN_COST,
+ F[i - 1][0] - GAP_EXTEND_COST);
float pairwiseScore = scoreMatrix.getPairwiseScore(s1str.charAt(i),
s2str.charAt(0));
{
for (int j = 1; j < m; j++)
{
- E[i][j] = max(score[i][j - 1] - GAP_OPEN_COST, E[i][j - 1] - GAP_EXTEND_COST);
- F[i][j] = max(score[i - 1][j] - GAP_OPEN_COST, F[i - 1][j] - GAP_EXTEND_COST);
+ E[i][j] = max(score[i][j - 1] - GAP_OPEN_COST,
+ E[i][j - 1] - GAP_EXTEND_COST);
+ F[i][j] = max(score[i - 1][j] - GAP_OPEN_COST,
+ F[i - 1][j] - GAP_EXTEND_COST);
float pairwiseScore = scoreMatrix.getPairwiseScore(s1str.charAt(i),
s2str.charAt(j));
}
}
- System.out.println(max + " " + min);
+ jalview.bin.Console.outPrintln(max + " " + min);
for (int i = 0; i < n; i++)
{
int x = psize * i;
int y = psize * j;
- // System.out.println(mat[i][j]);
+ // jalview.bin.Console.outPrintln(mat[i][j]);
float score = (float) (mat[i][j] - min) / (float) (max - min);
g.setColor(new Color(score, 0, 0));
g.fillRect(x, y, psize, psize);
- // System.out.println(x + " " + y + " " + score);
+ // jalview.bin.Console.outPrintln(x + " " + y + " " + score);
}
}
}
pdbpos++;
}
- if (allowmismatch || c1 == c2)
+ // ignore case differences
+ if (allowmismatch || (c1 == c2) || (Math.abs(c2-c1)==('a'-'A')))
{
// extend mapping interval
if (lp1 + 1 != alignpos || lp2 + 1 != pdbpos)
bestm = msq;
}
}
- // System.out.println("Best Score for " + (matches.size() + 1) + " :"
+ // jalview.bin.Console.outPrintln("Best Score for " + (matches.size() + 1) + " :"
// + bestscore);
matches.add(bestm);
aligns.add(bestaseq);