X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FGrouping.java;h=def5d5a3cbdd8a9a837ad85344ff4b6c0a0fb6f4;hb=refs%2Fheads%2Fbug%2FJAL-4290_headless_alignment_figure_with_sse;hp=ddf483b3dcd6f3836b5ba08254fa9acbdae31a40;hpb=fefc840cd97faf34b69ca387e8a38e3b9c79b92f;p=jalview.git diff --git a/src/jalview/analysis/Grouping.java b/src/jalview/analysis/Grouping.java index ddf483b..def5d5a 100644 --- a/src/jalview/analysis/Grouping.java +++ b/src/jalview/analysis/Grouping.java @@ -25,7 +25,6 @@ import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -92,8 +91,8 @@ public class Grouping i = 0; for (String key : gps.keySet()) { - SequenceGroup group = new SequenceGroup(gps.get(key), "Subseq: " - + key, null, true, true, false, 0, width - 1); + SequenceGroup group = new SequenceGroup(gps.get(key), + "Subseq: " + key, null, true, true, false, 0, width - 1); groups[i++] = group; } @@ -128,6 +127,11 @@ public class Grouping } } } + + /* + * get selected columns (in the order they were selected); + * note this could include right-to-left ranges + */ int[] spos = new int[cs.getSelected().size()]; int width = -1; int i = 0; @@ -136,11 +140,6 @@ public class Grouping spos[i++] = pos.intValue(); } - /* - * ensure column selection is in ascending order - */ - Arrays.sort(spos); - for (i = 0; i < sequences.length; i++) { int slen = sequences[i].getLength(); @@ -179,8 +178,8 @@ public class Grouping i = 0; for (String key : gps.keySet()) { - SequenceGroup group = new SequenceGroup(gps.get(key), "Subseq: " - + key, null, true, true, false, 0, width - 1); + SequenceGroup group = new SequenceGroup(gps.get(key), + "Subseq: " + key, null, true, true, false, 0, width - 1); groups[i++] = group; } @@ -270,7 +269,7 @@ public class Grouping * seqs.length) { for (int i = 0; i < seqs.length; i++) { if (!hasScore[i]) * { scores[i] = (max + i); } else { int nf=(feats[i]==null) ? 0 * :((SequenceFeature[]) feats[i]).length; - * System.err.println("Sorting on Score: seq "+seqs[i].getName()+ + * jalview.bin.Console.errPrintln("Sorting on Score: seq "+seqs[i].getName()+ * " Feats: "+nf+" Score : "+scores[i]); } } } * * jalview.util.QuickSort.sort(scores, seqs); } else if @@ -281,7 +280,7 @@ public class Grouping * (int i=0;i