apply version 2.7 copyright
[jalview.git] / src / jalview / ws / jws1 / JPredClient.java
index 8fff195..b429c97 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
  * 
  * This file is part of Jalview.
  * 
@@ -99,33 +99,7 @@ public class JPredClient extends WS1Client
 
     if (viewonly)
     {
-      int[] viscontigs = alview.getVisibleContigs();
-      int spos = 0;
-      int i = 0;
-      if (viscontigs != null)
-      {
-        // Construct the delMap - mapping from the positions within the input to
-        // Jnet to the contigs in the original sequence
-
-        delMap = new int[seq.getEnd() - seq.getStart() + 1];
-        int gapMap[] = seq.gapMap();
-        for (int contig = 0; contig < viscontigs.length; contig += 2)
-        {
-
-          while (spos < gapMap.length && gapMap[spos] < viscontigs[contig])
-          {
-            spos++;
-          }
-          while (spos < gapMap.length
-                  && gapMap[spos] <= viscontigs[contig + 1])
-          {
-            delMap[i++] = spos++;
-          }
-        }
-        int tmap[] = new int[i];
-        System.arraycopy(delMap, 0, tmap, 0, i);
-        delMap = tmap;
-      }
+      delMap = alview.getVisibleContigMapFor(seq.gapMap());
     }
     if (msa && msf.length > 1)
     {