From 7c28880430765f06ccd5ec8ad3caf17871336e97 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 15 Sep 2011 14:16:51 +0100 Subject: [PATCH] JAL-860 fixed grammar for one structure vs many structures associated with selection --- help/html/features/viewingpdbs.html | 26 +++++++++++++------------- src/jalview/gui/PopupMenu.java | 12 +++++++++++- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/help/html/features/viewingpdbs.html b/help/html/features/viewingpdbs.html index 679f353..e9f28d5 100755 --- a/help/html/features/viewingpdbs.html +++ b/help/html/features/viewingpdbs.html @@ -38,22 +38,23 @@ structure is selected, one of the following will happen:

  • If the structure is already shown, then you will be prompted to associate the sequence with an existing view of the selected - structure.
  • + structure. This is useful when working with multi-domain or multi-chain PDB files.
  • See the Jmol PDB viewer help page for more information about the display.
  • -

    - Additionally, if several of the sequences in the currently selected - region of the alignment have associated structures, then Jalview will - provide a 'View X structures' entry in the submenu. This - option will open a new Jmol view containing all the structures - available for all selected sequences, superimposed using the currently - selected region of the alignment. (This capability was added - in Jalview 2.7) + Opening structures associated with the current selection
    + If one or more of the sequences in the alignment are selected, then + the Structure submenu of the Sequence + ID popup menu will contain will include either a 'View all X + structures' entry in the submenu or a 'View structure for Sequence' + entry. Both these options will open a new Jmol view containing one, or + all the structures available for all selected sequences, superimposed + using the currently selected region of the alignment. (This + capability was added in Jalview 2.7)

    - +

    Associating PDB files with Sequences

    To associate PDB files with a sequence, right click on a sequence ID and select "Structure Associate Structure with Sequence", and one of the submenus:

    @@ -69,9 +70,8 @@ Sequence", and one of the submenus:

    EBI, to fetch the PDB file with the entered Id.
    -
  • Discover PDB Ids - Jalview uses WSDBFetch, provided by the - EBI, to discover PDB ids for all the sequences in the alignment which - have valid Uniprot names / accession ids.
  • +
  • Discover PDB Ids - Jalview uses the sequence's ID to query WSDBFetch, provided by the + EBI, and any enabled DAS servers, to discover PDB ids associated with the sequence.
  • Importing PDB Entries or files in PDB format
    diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index ca6b199..d778125 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -391,6 +391,7 @@ public class PopupMenu extends JPopupMenu } // Add a 'show all structures' for the current selection Hashtable pdbe=new Hashtable(); + SequenceI sqass=null; for (SequenceI sq: ap.av.getSequenceSelection()) { Vector pes = (Vector) sq.getDatasetSequence().getPDBId(); @@ -398,6 +399,10 @@ public class PopupMenu extends JPopupMenu for (PDBEntry pe: pes) { pdbe.put(pe.getId(), pe); + if (sqass==null) + { + sqass = sq; + } } } } @@ -405,7 +410,12 @@ public class PopupMenu extends JPopupMenu { final PDBEntry[] pe = pdbe.values().toArray(new PDBEntry[pdbe.size()]); final JMenuItem gpdbview; - structureMenu.add(gpdbview=new JMenuItem("View "+pdbe.size()+" structures.")); + if (pdbe.size()==1) + { + structureMenu.add(gpdbview=new JMenuItem("View structure for "+sqass.getDisplayId(false))); + } else { + structureMenu.add(gpdbview=new JMenuItem("View all "+pdbe.size()+" structures.")); + } gpdbview.setToolTipText("Open a new Jmol view with all structures associated with the current selection and superimpose them using the alignment."); gpdbview.addActionListener(new ActionListener() { -- 1.7.10.2