}
pid = pid / (aseq1.length - count) * 100;
- output.append(new Format("Percentage ID = %3.2f\n").form(pid));
- output.append(NEWLINE);
+ output.append(new Format("Percentage ID = %3.2f").form(pid));
+ output.append(NEWLINE).append(NEWLINE);
try
{
os.print(output.toString());
*/
public jalview.datamodel.Mapping getMappingFromS1(boolean allowmismatch)
{
- ArrayList<Integer> as1 = new ArrayList<Integer>(),
- as2 = new ArrayList<Integer>();
+ ArrayList<Integer> as1 = new ArrayList<>(),
+ as2 = new ArrayList<>();
int pdbpos = s2.getStart() + getSeq2Start() - 2;
int alignpos = s1.getStart() + getSeq1Start() - 2;
int lp2 = pdbpos - 3, lp1 = alignpos - 3;
{
mapseq1[i++] = ip;
}
- ;
i = 0;
for (Integer ip : as2)
{
mapseq2[i++] = ip;
}
- ;
if (lastmatch)
{
mapseq1[mapseq1.length - 1] = alignpos;
List<SequenceI> ochains, AlignmentI al, String dnaOrProtein,
boolean removeOldAnnots)
{
- List<SequenceI> orig = new ArrayList<SequenceI>(),
- repl = new ArrayList<SequenceI>();
- List<AlignSeq> aligs = new ArrayList<AlignSeq>();
+ List<SequenceI> orig = new ArrayList<>(),
+ repl = new ArrayList<>();
+ List<AlignSeq> aligs = new ArrayList<>();
if (al != null && al.getHeight() > 0)
{
- ArrayList<SequenceI> matches = new ArrayList<SequenceI>();
- ArrayList<AlignSeq> aligns = new ArrayList<AlignSeq>();
+ ArrayList<SequenceI> matches = new ArrayList<>();
+ ArrayList<AlignSeq> aligns = new ArrayList<>();
for (SequenceI sq : ochains)
{
public class PairwiseAlignmentPanelTest
{
+ private static final String NL = System.lineSeparator();
+
@Test(groups = "Functional")
public void testConstructor_withSelectionGroup()
{
PairwiseAlignPanel testee = new PairwiseAlignPanel(viewport);
String text = ((JTextArea) PA.getValue(testee, "textarea")).getText()
- .replaceAll("\r", "");
- String expected = "Score = 80.0\n" + "Length of alignment = 4\n"
- + "Sequence FER1_PEA/29-32 (Sequence length = 7)\n"
- + "Sequence Q93XJ9_SOLTU/23-26 (Sequence length = 7)\n\n"
- + " FER1_PEA/29-32 TKAF\n" + " ||.\n"
- + "Q93XJ9_SOLTU/23-26 LKAI\n\n" + "Percentage ID = 50.00\n\n";
+ ;// .replaceAll("\r", "");
+ String expected = "Score = 80.0" + NL + "Length of alignment = 4" + NL
+ + "Sequence FER1_PEA/29-32 (Sequence length = 7)" + NL
+ + "Sequence Q93XJ9_SOLTU/23-26 (Sequence length = 7)" + NL + NL
+ + " FER1_PEA/29-32 TKAF" + NL + " ||."
+ + NL + "Q93XJ9_SOLTU/23-26 LKAI" + NL + NL
+ + "Percentage ID = 50.00" + NL + NL;
assertEquals(text, expected);
}
PairwiseAlignPanel testee = new PairwiseAlignPanel(viewport);
String text = ((JTextArea) PA.getValue(testee, "textarea")).getText()
- .replaceAll("\r", "");
- String expected = "Score = 80.0\n" + "Length of alignment = 4\n"
- + "Sequence FER1_PEA/29-32 (Sequence length = 7)\n"
- + "Sequence Q93XJ9_SOLTU/23-26 (Sequence length = 7)\n\n"
- + " FER1_PEA/29-32 TKAF\n" + " ||.\n"
- + "Q93XJ9_SOLTU/23-26 LKAI\n\n" + "Percentage ID = 50.00\n\n";
+ ;// .replaceAll("\r", "");
+ String expected = "Score = 80.0" + NL + "Length of alignment = 4" + NL
+ + "Sequence FER1_PEA/29-32 (Sequence length = 7)" + NL
+ + "Sequence Q93XJ9_SOLTU/23-26 (Sequence length = 7)" + NL + NL
+ + " FER1_PEA/29-32 TKAF" + NL + " ||."
+ + NL + "Q93XJ9_SOLTU/23-26 LKAI" + NL + NL
+ + "Percentage ID = 50.00" + NL + NL;
assertEquals(text, expected);
}
}