From: amwaterhouse Date: Tue, 24 Oct 2006 11:19:30 +0000 (+0000) Subject: Uses RemoveGapsCommand X-Git-Tag: Release_2_2~250 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d86deeaf2bf1128ff2d4e610c9a715c9970fb3ad;p=jalview.git Uses RemoveGapsCommand --- 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,