JAL-2685 tweaks to output spacing, updated TestAlignSeq for changes
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 30 Aug 2017 11:49:43 +0000 (12:49 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 30 Aug 2017 11:49:43 +0000 (12:49 +0100)
src/jalview/analysis/AlignSeq.java
test/jalview/analysis/TestAlignSeq.java
test/jalview/gui/PairwiseAlignmentPanelTest.java

index 15ea2fc..1b2578e 100755 (executable)
@@ -561,7 +561,7 @@ public class AlignSeq
         }
       }
 
-      output.append(NEWLINE);// .append(NEWLINE);
+      output.append(NEWLINE).append(NEWLINE);
     }
 
     pid = pid / (aseq1.length - count) * 100;
index 70e59c5..e2e5594 100644 (file)
@@ -64,7 +64,7 @@ public class TestAlignSeq
     s2 = new Sequence("Seq2", "ASDFA");
     s2.setStart(5);
     s2.setEnd(9);
-    s3 = new Sequence("Seq1", "SDFAQQQSSS");
+    s3 = new Sequence("Seq3", "SDFAQQQSSS");
 
   }
 
@@ -125,10 +125,10 @@ public class TestAlignSeq
     };
 
     as.printAlignment(ps);
-    String expected = "Score = 320.0\nLength of alignment = 10\nSequence Seq1 :  3 - 18 (Sequence length = 14)\nSequence Seq1 :  1 - 10 (Sequence length = 10)\n\n"
-            + "Seq1 SDFAQQQRRR\n"
-            + "     |||||||   \n"
-            + "Seq1 SDFAQQQSSS\n\n" + "Percentage ID = 70.00\n";
+    String expected = "Score = 320.0\nLength of alignment = 10\nSequence Seq1/4-13 (Sequence length = 14)\nSequence Seq3/1-10 (Sequence length = 10)\n\n"
+            + "Seq1/4-13 SDFAQQQRRR\n"
+            + "          |||||||   \n"
+            + "Seq3/1-10 SDFAQQQSSS\n\n" + "Percentage ID = 70.00\n\n";
     assertEquals(expected, baos.toString());
   }
 }
index 4d09f43..3322ee8 100644 (file)
@@ -42,7 +42,7 @@ public class PairwiseAlignmentPanelTest
             + "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" + "Percentage ID = 50.00\n\n";
+            + "Q93XJ9_SOLTU/23-26 LKAI\n\n" + "Percentage ID = 50.00\n\n";
     assertEquals(text, expected);
   }
 
@@ -67,7 +67,7 @@ public class PairwiseAlignmentPanelTest
             + "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" + "Percentage ID = 50.00\n\n";
+            + "Q93XJ9_SOLTU/23-26 LKAI\n\n" + "Percentage ID = 50.00\n\n";
     assertEquals(text, expected);
   }
 }