From d4a0b7bd3cb784f97e4b4faadbf2bd95601b3342 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 13 Apr 2005 16:39:13 +0000 Subject: [PATCH] Added order-preservation for clustalW alignment. No support for recovering order yet. --- src/jalview/ws/Jemboss.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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