From: jprocter Date: Wed, 13 Apr 2005 16:39:13 +0000 (+0000) Subject: Added order-preservation for clustalW alignment. No support for X-Git-Tag: Release_2_0~429 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d4a0b7bd3cb784f97e4b4faadbf2bd95601b3342;p=jalview.git Added order-preservation for clustalW alignment. No support for recovering order yet. --- diff --git a/src/jalview/ws/Jemboss.java b/src/jalview/ws/Jemboss.java index a8bf163..7983262 100755 --- a/src/jalview/ws/Jemboss.java +++ b/src/jalview/ws/Jemboss.java @@ -83,8 +83,11 @@ public class Jemboss } return allfound; } - - public SequenceI[] clustalW(SequenceI[] sequences) + public SequenceI[] clustalW(SequenceI[] sequences) { + // Does the same as below but keeps initial sequence order. + return (this.clustalW(sequences, true)); + } + public SequenceI[] clustalW(SequenceI[] sequences, boolean PreserveOrder) { // Simplest client call - with gumph from jemboss.server.TestPrivateServer @@ -172,6 +175,12 @@ public class Jemboss System.out.println("jalview.Jemboss: Couldn't read response:\n" + alfile + "\n---EOF\n"); else { + if (PreserveOrder) { + float[] ids = new float[alignment.length]; + for (int i=0; i