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