Uses RemoveGapsCommand
authoramwaterhouse <Andrew Waterhouse>
Tue, 24 Oct 2006 11:19:30 +0000 (11:19 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 24 Oct 2006 11:19:30 +0000 (11:19 +0000)
src/jalview/ws/JPredThread.java

index 6aebfdc..15b8bd8 100644 (file)
@@ -53,7 +53,7 @@ implements WSClientI
       return false;\r
     }\r
     /**\r
-     * \r
+     *\r
      * @return null or Object[] { annotated alignment for this prediction, ColumnSelection for this prediction} or null if no results available.\r
      * @throws Exception\r
      */\r
@@ -102,7 +102,7 @@ implements WSClientI
             for (int i = 0, j = al.getHeight(); i < j; i++)\r
             {\r
               sqs[i] = al.getSequenceAt(i);\r
-            } \r
+            }\r
             if (!jalview.analysis.SeqsetUtils.deuniquify( (Hashtable)\r
                 SequenceInfo, sqs))\r
             {\r
@@ -133,7 +133,14 @@ implements WSClientI
           SequenceI[] sqs = (SequenceI[]) ((java.lang.Object[]) input.getAlignmentAndColumnSelection(gc))[0];\r
           if (this.msaIndex>=sqs.length)\r
             throw new Error("Implementation Error! Invalid msaIndex for JPredJob on parent MSA input object!");\r
-          sqs[msaIndex].removeGaps();\r
+\r
+          /////\r
+          //Uses RemoveGapsCommand\r
+          /////\r
+          new jalview.commands.RemoveGapsCommand("Remove Gaps",\r
+                                                 new SequenceI[] {sqs[msaIndex]},\r
+                                                 gc);\r
+\r
           SequenceI profileseq=al.getSequenceAt(FirstSeq);\r
           profileseq.setSequence(sqs[msaIndex].getSequence());\r
         }\r
@@ -250,7 +257,7 @@ implements WSClientI
           int diff=origseq.getLength()-sq.length();\r
           while (diff>0) {\r
             sq=sq+((diff>=sb.length()) ? sb.toString() : sb.substring(0, diff));\r
-            diff=origseq.getLength()-sq.length();            \r
+            diff=origseq.getLength()-sq.length();\r
           }\r
         }\r
       }\r
@@ -508,14 +515,14 @@ implements WSClientI
             if (((SequenceI[])alandcolsel[0])[0].getLength()!=res.getWidth()) {\r
               if (msa) {\r
                 throw new Error("Implementation Error! ColumnSelection from input alignment will not map to result alignment!");\r
-              } \r
+              }\r
             }\r
             if (!msa) {\r
               // update hidden regions to account for loss of gaps in profile. - if any\r
               // gapMap returns insert list, interpreted as delete list by pruneDeletions\r
               //((ColumnSelection) alandcolsel[1]).pruneDeletions(ShiftList.parseMap(((SequenceI[]) alandcolsel[0])[0].gapMap()));\r
             }*/\r
-            \r
+\r
             af = new AlignFrame((Alignment) res[0], (ColumnSelection) res[1],AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);\r
           }\r
           Desktop.addInternalFrame(af, altitle,\r