JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git] / src / jalview / analysis / Dna.java
index ab606f7..515bd91 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -21,7 +21,6 @@
 package jalview.analysis;
 
 import jalview.api.AlignViewportI;
-import jalview.bin.Cache;
 import jalview.datamodel.AlignedCodon;
 import jalview.datamodel.AlignedCodonFrame;
 import jalview.datamodel.Alignment;
@@ -50,7 +49,7 @@ import java.util.Map;
 
 public class Dna
 {
-  private static final String STOP_X = "X";
+  private static final String STOP_ASTERIX = "*";
 
   private static final Comparator<AlignedCodon> comparator = new CodonComparator();
 
@@ -209,9 +208,8 @@ public class Dna
     for (int gd = 0; gd < selection.length; gd++)
     {
       SequenceI dna = selection[gd];
-      DBRefEntry[] dnarefs = DBRefUtils
-              .selectRefs(dna.getDBRef(),
-                      jalview.datamodel.DBRefSource.DNACODINGDBS);
+      DBRefEntry[] dnarefs = DBRefUtils.selectRefs(dna.getDBRef(),
+              jalview.datamodel.DBRefSource.DNACODINGDBS);
       if (dnarefs != null)
       {
         // intersect with pep
@@ -301,8 +299,7 @@ public class Dna
         aa.graphHeight = annotation.graphHeight;
         if (annotation.getThreshold() != null)
         {
-          aa.setThreshold(new GraphLine(annotation
-                  .getThreshold()));
+          aa.setThreshold(new GraphLine(annotation.getThreshold()));
         }
         if (annotation.hasScore)
         {
@@ -447,8 +444,10 @@ public class Dna
           aa = gapString;
           if (skipint == null)
           {
-            skipint = new int[]
-            { alignedCodon.pos1, alignedCodon.pos3 /* cdp[0], cdp[2] */};
+            skipint = new int[] { alignedCodon.pos1, alignedCodon.pos3 /*
+                                                                        * cdp[0],
+                                                                        * cdp[2]
+                                                                        */};
           }
           skipint[1] = alignedCodon.pos3; // cdp[2];
         }
@@ -545,7 +544,7 @@ public class Dna
           }
           if (aa.equals("STOP"))
           {
-            aa = STOP_X;
+            aa = STOP_ASTERIX;
           }
           resSize++;
         }
@@ -617,14 +616,7 @@ public class Dna
       if (rf != 0)
       {
         final String errMsg = "trimming contigs for incomplete terminal codon.";
-        if (Cache.log != null)
-        {
-          Cache.log.debug(errMsg);
-        }
-        else
-        {
-          System.err.println(errMsg);
-        }
+        System.err.println(errMsg);
         // map and trim contigs to ORF region
         vc = scontigs.length - 1;
         lastnpos = vismapping.shift(lastnpos); // place npos in context of
@@ -691,8 +683,7 @@ public class Dna
          * range iv[0] = skipint[1]; } else { } } } else if (iv[0]<skipint[0]) {
          * iv = (int[]) narange.elementAt(vc+1); } } while (iv[0]) } }
          */
-        MapList map = new MapList(scontigs, new int[]
-        { 1, resSize }, 3, 1);
+        MapList map = new MapList(scontigs, new int[] { 1, resSize }, 3, 1);
 
         transferCodedFeatures(selection, newseq, map, null, null);
 
@@ -722,8 +713,7 @@ public class Dna
    * @param proteinSeqs
    * @return
    */
-  protected void insertAAGap(int pos,
-          List<SequenceI> proteinSeqs)
+  protected void insertAAGap(int pos, List<SequenceI> proteinSeqs)
   {
     aaWidth++;
     for (SequenceI seq : proteinSeqs)