Merge remote-tracking branch 'origin/releases/Release_2_10_2b1_Branch'
[jalview.git] / src / jalview / datamodel / AlignedCodonFrame.java
index 4fbfd62..83eeb3d 100644 (file)
@@ -90,10 +90,11 @@ public class AlignedCodonFrame
         return that.mapping == null;
       }
       // TODO: can simplify by asserting fromSeq is a dataset sequence
-      return (this.fromSeq == that.fromSeq || (this.fromSeq != null
-              && that.fromSeq != null
-              && this.fromSeq.getDatasetSequence() != null && this.fromSeq
-              .getDatasetSequence() == that.fromSeq.getDatasetSequence()))
+      return (this.fromSeq == that.fromSeq
+              || (this.fromSeq != null && that.fromSeq != null
+                      && this.fromSeq.getDatasetSequence() != null
+                      && this.fromSeq.getDatasetSequence() == that.fromSeq
+                              .getDatasetSequence()))
               && this.mapping.equals(that.mapping);
     }
 
@@ -149,8 +150,8 @@ public class AlignedCodonFrame
 
     SequenceI fromSeq = (dnaseq.getDatasetSequence() == null) ? dnaseq
             : dnaseq.getDatasetSequence();
-    SequenceI toSeq = (aaseq.getDatasetSequence() == null) ? aaseq : aaseq
-            .getDatasetSequence();
+    SequenceI toSeq = (aaseq.getDatasetSequence() == null) ? aaseq
+            : aaseq.getDatasetSequence();
 
     /*
      * if we already hold a mapping between these sequences, just add to it 
@@ -434,8 +435,8 @@ public class AlignedCodonFrame
   {
     SequenceI targetDs = target.getDatasetSequence() == null ? target
             : target.getDatasetSequence();
-    SequenceI queryDs = query.getDatasetSequence() == null ? query : query
-            .getDatasetSequence();
+    SequenceI queryDs = query.getDatasetSequence() == null ? query
+            : query.getDatasetSequence();
     if (targetDs == null || queryDs == null /*|| dnaToProt == null*/)
     {
       return null;
@@ -506,8 +507,10 @@ public class AlignedCodonFrame
         codonPos = MappingUtils.flattenRanges(codonPos);
         char[] dna = dnaSeq.getSequence();
         int start = dnaSeq.getStart();
-        result.add(new char[] { dna[codonPos[0] - start],
-            dna[codonPos[1] - start], dna[codonPos[2] - start] });
+        result.add(
+                new char[]
+                { dna[codonPos[0] - start], dna[codonPos[1] - start],
+                    dna[codonPos[2] - start] });
       }
     }
     return result.isEmpty() ? null : result;
@@ -579,8 +582,9 @@ public class AlignedCodonFrame
    */
   protected int realiseWith(SequenceI seq, boolean doUpdate)
   {
-    SequenceI ds = seq.getDatasetSequence() != null ? seq
-            .getDatasetSequence() : seq;
+    SequenceI ds = seq.getDatasetSequence() != null
+            ? seq.getDatasetSequence()
+            : seq;
     int count = 0;
 
     /*
@@ -654,8 +658,8 @@ public class AlignedCodonFrame
     {
       int start = replacement.getStart();
       int end = replacement.getEnd();
-      boolean mappingOverlapsSequence = (mapStart >= start && mapStart <= end)
-              || (mapEnd >= start && mapEnd <= end);
+      boolean mappingOverlapsSequence = (mapStart >= start
+              && mapStart <= end) || (mapEnd >= start && mapEnd <= end);
       if (mappingOverlapsSequence)
       {
         return true;
@@ -732,8 +736,8 @@ public class AlignedCodonFrame
   {
     SequenceI dssFrom = fromSeq.getDatasetSequence() == null ? fromSeq
             : fromSeq.getDatasetSequence();
-    SequenceI dssTo = toSeq.getDatasetSequence() == null ? toSeq : toSeq
-            .getDatasetSequence();
+    SequenceI dssTo = toSeq.getDatasetSequence() == null ? toSeq
+            : toSeq.getDatasetSequence();
 
     for (SequenceToSequenceMapping mapping : mappings)
     {