JAL-1620 version bump and release notes
[jalview.git] / test / jalview / analysis / TestAlignSeq.java
index 31d4658..c6a24b4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * This file is part of Jalview.
@@ -30,24 +30,26 @@ import org.junit.Test;
 
 /**
  * Test the alignment -> Mapping routines
+ * 
  * @author jimp
- *
+ * 
  */
 public class TestAlignSeq
 {
 
-  SequenceI s1,s2,s3;
+  SequenceI s1, s2, s3;
+
   /**
    * @throws java.lang.Exception
    */
   @Before
   public void setUp() throws Exception
   {
-    s1 = new Sequence("Seq1","ASDFAQQQRRRSSS");
+    s1 = new Sequence("Seq1", "ASDFAQQQRRRSSS");
     s1.setStart(3);
-    s2 = new Sequence("Seq2","ASDFA");
+    s2 = new Sequence("Seq2", "ASDFA");
     s2.setStart(5);
-    s3 = new Sequence("Seq1","SDFAQQQSSS");
+    s3 = new Sequence("Seq1", "SDFAQQQSSS");
 
   }
 
@@ -57,16 +59,18 @@ public class TestAlignSeq
    */
   public void TestGetMappingForS1()
   {
-    jalview.analysis.AlignSeq as = jalview.analysis.AlignSeq.doGlobalNWAlignment(s1, s2, AlignSeq.PEP);
-    System.out.println("s1: "+as.getAStr1());
-    System.out.println("s2: "+as.getAStr2());
-    
-    Mapping s1tos2=as.getMappingFromS1(false);
+    jalview.analysis.AlignSeq as = jalview.analysis.AlignSeq
+            .doGlobalNWAlignment(s1, s2, AlignSeq.PEP);
+    System.out.println("s1: " + as.getAStr1());
+    System.out.println("s2: " + as.getAStr2());
+
+    Mapping s1tos2 = as.getMappingFromS1(false);
     System.out.println(s1tos2.getMap().toString());
-    for (int i=s2.getStart();i<s2.getEnd();i++)
+    for (int i = s2.getStart(); i < s2.getEnd(); i++)
     {
-      System.out.println("Position in s2: "+i +" maps to position in s1: "+s1tos2.getPosition(i));
-      assertTrue("",s2.getCharAt(i)==s1.getCharAt(s1tos2.getPosition(i)));
+      System.out.println("Position in s2: " + i
+              + " maps to position in s1: " + s1tos2.getPosition(i));
+      assertTrue("", s2.getCharAt(i) == s1.getCharAt(s1tos2.getPosition(i)));
     }
   }