From: jprocter Date: Fri, 21 Jan 2011 17:07:31 +0000 (+0000) Subject: relaxed ID matching parameter JAL-753 and sortBy JAL-754 X-Git-Tag: Release_2_7~281 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a9514dd266ef856c485fd8f9108a3797b87add3f;p=jalview.git relaxed ID matching parameter JAL-753 and sortBy JAL-754 --- diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 1496595..bad7848 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -17,7 +17,6 @@ */ package jalview.appletgui; -import java.io.*; import java.net.*; import java.util.*; @@ -167,7 +166,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, featuresFile = new jalview.io.FeaturesFile(file, type) .parse(viewport.alignment, alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featureColours, - featureLinks, true); + featureLinks, true, viewport.applet.getDefaultParameter("relaxedidmatch", false)); } catch (Exception ex) { ex.printStackTrace(); @@ -2454,7 +2453,22 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, }; }); } - + public boolean sortBy(AlignmentOrder alorder, String undoname) + { + SequenceI[] oldOrder = viewport.getAlignment() + .getSequencesArray(); + if (viewport.applet.debug) + { + System.err.println("Sorting "+alorder.getOrder().size()+" in alignment '"+getTitle()+"'"); + } + AlignmentSorter.sortBy(viewport.getAlignment(), alorder); + if (undoname!=null) + { + addHistoryItem(new OrderCommand(undoname, oldOrder, viewport.alignment)); + } + alignPanel.paintAlignment(true); + return true; + } protected void documentation_actionPerformed() { showURL("http://www.jalview.org/help.html", "HELP"); diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index f74d05e..f79afca 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -3723,7 +3723,18 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, sortByTreeMenu.add(item); } } - + public boolean sortBy(AlignmentOrder alorder, String undoname) + { + SequenceI[] oldOrder = viewport.getAlignment() + .getSequencesArray(); + AlignmentSorter.sortBy(viewport.getAlignment(), alorder); + if (undoname!=null) + { + addHistoryItem(new OrderCommand(undoname, oldOrder, viewport.alignment)); + } + alignPanel.paintAlignment(true); + return true; + } /** * Work out whether the whole set of sequences or just the selected set will * be submitted for multiple alignment. @@ -4377,7 +4388,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, featuresFile = new FeaturesFile(file, type) .parse(viewport.alignment.getDataset(), alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featureColours, - false); + false,jalview.bin.Cache.getDefault("RELAXEDSEQIDMATCHING", false)); } catch (Exception ex) { ex.printStackTrace();