Merge branch 'develop' of https://source.jalview.org/git/jalview into develop
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 15 Aug 2016 13:54:19 +0000 (14:54 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 15 Aug 2016 13:54:19 +0000 (14:54 +0100)
16 files changed:
help/html/features/clarguments.html
help/html/features/dasfeatures.html
help/html/features/varna.html
help/html/io/index.html
help/html/na/index.html
help/html/webServices/index.html
help/html/webServices/newsreader.html
resources/lang/Messages.properties
resources/lang/Messages_es.properties
src/jalview/appletgui/APopupMenu.java
src/jalview/appletgui/AnnotationPanel.java
src/jalview/bin/Jalview.java
src/jalview/gui/AnnotationPanel.java
src/jalview/gui/PopupMenu.java
src/jalview/gui/SeqPanel.java
utils/HelpLinksChecker.java

index 63a14af..1d6f62d 100644 (file)
     </tr>
     <tr>
       <td>
+        <div align="center">-nonews</div>
+      <td>
+        <div align="left">Disable check for <a href="../webServices/newsreader.html">Jalview news</a> on startup (not recommended other than for classroom / demo usage)</div>
+      </td>
+    </tr>
+    <tr>
+      <td>
         <div align="center">-nousagestats</div>
       <td>
         <div align="left">Turn off google analytics usage tracking</div>
index c0c888a..90958ae 100644 (file)
@@ -29,8 +29,7 @@
   </p>
   <p>
     Jalview includes a client for retrieving sequences and their
-    features via the <a href="http://www.biodas.org">Distributed
-      Annotation System</a>.
+    features via the Distributed Annotation System.
   </p>
   <ol>
     <li>Open the Feature Settings panel by selecting &quot;View
   <p>
     <em>DAS support was introduced in Jalview Version 2.1.</em>
   </p>
+  <br/>
+  <p>
+    <em>The DAS registry at http://www.dasregistry.org was decommissioned early in 2015. An unmaintained mirror is currently hosted at http://www.ebi.ac.uk/das-srv/registry/.</em>
+  </p>
   <p>&nbsp;
 </body>
 </html>
index 029edce..ce446f3 100644 (file)
@@ -27,7 +27,7 @@
     <strong>The VARNA RNA Viewer</strong>
   </p>
   <p>
-    <a href="http://varna.lri.fr/index.html">VARNA</a> was integrated
+    <a href="http://varna.lri.fr">VARNA</a> was integrated
     into Jalview 2.8 to allow interactive viewing of RNA secondary
     structure annotation. It is opened by selecting the <strong>&quot;Structure&#8594;View
       Structure:&quot;</strong> option in the <a href="../menus/popupMenu.html">sequence
index c0a89cf..d2196c1 100755 (executable)
       NBRF/PIR (including MODELLER variant), Pfam/Stockholm</em>
   </p>
   <p>
-    The EBI has <a href="http://www.ebi.ac.uk/help/formats.html">examples</a>
-    of these file formats.
-  </p>
-  <p>
     Additionally, whole sets of coloured and annotated alignments and
     trees can be read from a <a href="../features/jalarchive.html">Jalview
       (jar) format</a> file using <strong>Desktop&#8594;Load
index ae4c1c6..de2741b 100644 (file)
@@ -65,7 +65,7 @@ td {
       annotation.</li>
     <li><em>Clustal files</em> - certain RNA alignment programs,
       such as <a
-      href="http://rna.informatik.uni-freiburg.de:8080/LocARNA.jsp"
+      href="http://rna.informatik.uni-freiburg.de/LocARNA"
     >LocaRNA</a> output consensus RNA secondary structure lines in the
       line normally reserved for the Clustal consensus line in a clustal
       file.</li>
index b03bb9d..1463554 100755 (executable)
@@ -90,7 +90,7 @@
     services were maintained by the Barton group at the University of
     Dundee, and ran programs on the Life Sciences High-performance
     Computing Cluster. With the advent of <a
-      href="http://www.compbio.dundee.ac.uk/JABAWS"
+      href="http://www.compbio.dundee.ac.uk/jabaws"
     >JABAWS</a>, however, it is possible for anyone to host Jalview web
     services.
   </p>
index ee69290..5ec088a 100644 (file)
@@ -19,7 +19,7 @@
  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  -->
-<head>Jalview Desktop RSS News Reader
+<head>
 </head>
 <body>
   <p>
   <p>The news reader will be launched automatically when you start
     the Desktop if new items are available. Should you want to browse
     older items, however, you can open it manually from the 'Jalview
-    news reader' option in the Desktop's 'Tools' menu.</p>
-  <img src="jalviewrssreader.gif" align="center" width="513"
-    height="337" alt="Snapshot of the Jalview Desktop's RSS reader"
-  />
-  <p>
+    news reader' option in the Desktop's <a href="../menus/desktopMenu.html">'Tools' menu</a>.</p><br/>
+  <div style="text-align: center;"><img src="jalviewrssreader.gif" width="513"
+    height="337" alt="Snapshot of the Jalview Desktop's RSS reader"/></div>
+
+  <br/><p>
     The <em>Jalview news reader</em> was introduced in <a
       href="http://www.jalview.org/releaseHistory.html#Jalview2.7"
     >Jalview version 2.7</a>. Its implementation is based on <a
       href="http://jswingreader.sourceforge.net/"
     >JSwingReader</a>.
   </p>
+  <br/><em>From Jalview 2.10.0, check for news on startup can be disabled with <a href="../features/clarguments.html">command-line parameter</a> &#39;-nonews&#39;. 
+  This is not recommended for normal use, but may be useful to avoid interruptions when teaching, demonstrating, recording etc.</em>
 </body>
 </html>
index 40c311f..f20558d 100644 (file)
@@ -1308,3 +1308,5 @@ status.fetching_3d_structures_for = Fetching 3D Structure for {0}
 status.obtaining_mapping_with_sifts = Obtaining mapping with SIFTS
 status.obtaining_mapping_with_nw_alignment = Obtaining mapping with NW alignment
 status.exporting_alignment_as_x_file = Exporting alignment as {0} file
+label.column = Column
+label.sequence = Sequence
index 618178d..3f04bad 100644 (file)
@@ -468,8 +468,9 @@ label.create_sequence_feature = Crear funci
 label.edit_sequence = Editar secuencia
 label.edit_sequences = Editar secuencias
 label.sequence_details = Detalles de la secuencia
-label.jmol_help = Ayuda de Jmol 
-label.all = Todo
+label.jmol_help = Ayuda de Jmol
+# Todos/Todas is gender-sensitive, but currently only used for feminine (cadena / anotación)! 
+label.all = Todas
 label.sort_by = Ordenar por
 label.sort_by_score = Ordenar por puntuación
 label.sort_by_density = Ordenar por densidad
@@ -1314,3 +1315,5 @@ status.fetching_3d_structures_for_selected_entries=Buscando las estructuras 3D p
 status.fetching_dbrefs_for_sequences_without_valid_refs=Buscando referencias para {0} secuencia(s) sin referencia válida necesaria para mapeado SIFTS
 status.obtaining_mapping_with_nw_alignment=Obteniendo mapeo por alineamiento Needleman y Wunsch
 status.exporting_alignment_as_x_file = Exportando alineamiento como fichero tipo {0}
+label.column = Columna
+label.sequence = Secuencia
index 948c8e5..b6cc7c0 100644 (file)
@@ -70,8 +70,6 @@ import java.util.Vector;
 public class APopupMenu extends java.awt.PopupMenu implements
         ActionListener, ItemListener
 {
-  private static final String ALL_ANNOTATIONS = "All";
-
   Menu groupMenu = new Menu();
 
   MenuItem editGroupName = new MenuItem();
@@ -1326,7 +1324,8 @@ public class APopupMenu extends java.awt.PopupMenu implements
     showMenu.removeAll();
     hideMenu.removeAll();
 
-    final List<String> all = Arrays.asList(ALL_ANNOTATIONS);
+    final List<String> all = Arrays.asList(new String[] { MessageManager
+            .getString("label.all") });
     addAnnotationTypeToShowHide(showMenu, forSequences, "", all, true, true);
     addAnnotationTypeToShowHide(hideMenu, forSequences, "", all, true,
             false);
index 77700d0..dd652b1 100755 (executable)
@@ -22,8 +22,10 @@ package jalview.appletgui;
 
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.Annotation;
+import jalview.datamodel.SequenceI;
 import jalview.renderer.AnnotationRenderer;
 import jalview.renderer.AwtRenderPanelI;
+import jalview.util.Comparison;
 import jalview.util.MessageManager;
 
 import java.awt.Color;
@@ -457,21 +459,47 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
       }
     }
 
-    int res = evt.getX() / av.getCharWidth() + av.getStartRes();
+    int column = evt.getX() / av.getCharWidth() + av.getStartRes();
 
     if (av.hasHiddenColumns())
     {
-      res = av.getColumnSelection().adjustForHiddenColumns(res);
+      column = av.getColumnSelection().adjustForHiddenColumns(column);
     }
 
-    if (row > -1 && res < aa[row].annotations.length
-            && aa[row].annotations[res] != null)
+    if (row > -1 && column < aa[row].annotations.length
+            && aa[row].annotations[column] != null)
     {
-      StringBuffer text = new StringBuffer("Sequence position " + (res + 1));
-      if (aa[row].annotations[res].description != null)
+      StringBuilder text = new StringBuilder();
+      text.append(MessageManager.getString("label.column")).append(" ")
+              .append(column + 1);
+      if (aa[row].annotations[column].description != null)
       {
-        text.append("  " + aa[row].annotations[res].description);
+        text.append("  ").append(aa[row].annotations[column].description);
       }
+
+      /*
+       * if the annotation is sequence-specific, show the sequence number
+       * in the alignment, and (if not a gap) the residue and position
+       */
+      SequenceI seqref = aa[row].sequenceRef;
+      if (seqref != null)
+      {
+        int seqIndex = av.getAlignment().findIndex(seqref);
+        if (seqIndex != -1)
+        {
+          text.append(", ")
+                  .append(MessageManager.getString("label.sequence"))
+                  .append(" ").append(seqIndex + 1);
+          char residue = seqref.getCharAt(column);
+          if (!Comparison.isGap(residue))
+          {
+            int residuePos = seqref.findPosition(column);
+            text.append(": ").append(residue).append(" (")
+                    .append(residuePos).append(")");
+          }
+        }
+      }
+
       ap.alignFrame.statusBar.setText(text.toString());
     }
   }
index 764c92c..3294c26 100755 (executable)
@@ -328,7 +328,6 @@ public class Jalview
             Cache.log.debug("Starting questionnaire with default url: "
                     + defurl);
             desktop.checkForQuestionnaire(defurl);
-
           }
         }
       }
@@ -336,14 +335,12 @@ public class Jalview
       {
         System.err.println("CMD [-noquestionnaire] executed successfully!");
       }
+
       if (!aparser.contains("nonews"))
       {
         desktop.checkForNews();
       }
-    }
 
-    if (!isHeadlessMode())
-    {
       BioJsHTMLOutput.updateBioJS();
     }
 
@@ -785,6 +782,7 @@ public class Jalview
                     + "-eps FILE\tCreate EPS file FILE from alignment.\n"
                     + "-questionnaire URL\tQueries the given URL for information about any Jalview user questionnaires.\n"
                     + "-noquestionnaire\tTurn off questionnaire check.\n"
+                    + "-nonews\tTurn off check for Jalview news.\n"
                     + "-nousagestats\tTurn off google analytics tracking for this session.\n"
                     + "-sortbytree OR -nosortbytree\tEnable or disable sorting of the given alignment by the given tree\n"
                     // +
index bb311ef..398f57d 100755 (executable)
@@ -26,6 +26,7 @@ import jalview.datamodel.ColumnSelection;
 import jalview.datamodel.SequenceI;
 import jalview.renderer.AnnotationRenderer;
 import jalview.renderer.AwtRenderPanelI;
+import jalview.util.Comparison;
 import jalview.util.MessageManager;
 
 import java.awt.AlphaComposite;
@@ -351,7 +352,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
       }
     }
     else
-    // HELIX OR SHEET
+    // HELIX, SHEET or STEM
     {
       char type = 0;
       String symbol = "\u03B1";
@@ -412,9 +413,10 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
       }
     }
+
     av.getAlignment().validateAnnotation(aa[activeRow]);
     ap.alignmentChanged();
-
+    ap.alignFrame.setMenusForViewport();
     adjustPanelHeight();
     repaint();
 
@@ -628,10 +630,10 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
   }
 
   /**
-   * DOCUMENT ME!
+   * Constructs the tooltip, and constructs and displays a status message, for
+   * the current mouse position
    * 
    * @param evt
-   *          DOCUMENT ME!
    */
   @Override
   public void mouseMoved(MouseEvent evt)
@@ -657,7 +659,6 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
       if (evt.getY() < height)
       {
         row = i;
-
         break;
       }
     }
@@ -668,64 +669,125 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
       return;
     }
 
-    int res = (evt.getX() / av.getCharWidth()) + av.getStartRes();
+    int column = (evt.getX() / av.getCharWidth()) + av.getStartRes();
 
     if (av.hasHiddenColumns())
     {
-      res = av.getColumnSelection().adjustForHiddenColumns(res);
+      column = av.getColumnSelection().adjustForHiddenColumns(column);
+    }
+
+    AlignmentAnnotation ann = aa[row];
+    if (row > -1 && ann.annotations != null
+            && column < ann.annotations.length)
+    {
+      buildToolTip(ann, column, aa);
+      setStatusMessage(column, ann);
+    }
+    else
+    {
+      this.setToolTipText(null);
+      ap.alignFrame.statusBar.setText(" ");
     }
+  }
 
-    if (row > -1 && aa[row].annotations != null
-            && res < aa[row].annotations.length)
+  /**
+   * Builds a tooltip for the annotation at the current mouse position.
+   * 
+   * @param ann
+   * @param column
+   * @param anns
+   */
+  void buildToolTip(AlignmentAnnotation ann, int column,
+          AlignmentAnnotation[] anns)
+  {
+    if (ann.graphGroup > -1)
     {
-      if (aa[row].graphGroup > -1)
+      StringBuilder tip = new StringBuilder(32);
+      tip.append("<html>");
+      for (int i = 0; i < anns.length; i++)
       {
-        StringBuffer tip = new StringBuffer("<html>");
-        for (int gg = 0; gg < aa.length; gg++)
+        if (anns[i].graphGroup == ann.graphGroup
+                && anns[i].annotations[column] != null)
         {
-          if (aa[gg].graphGroup == aa[row].graphGroup
-                  && aa[gg].annotations[res] != null)
+          tip.append(anns[i].label);
+          String description = anns[i].annotations[column].description;
+          if (description != null && description.length() > 0)
           {
-            tip.append(aa[gg].label + " "
-                    + aa[gg].annotations[res].description + "<br>");
+            tip.append(" ").append(description);
           }
-        }
-        if (tip.length() != 6)
-        {
-          tip.setLength(tip.length() - 4);
-          this.setToolTipText(tip.toString() + "</html>");
+          tip.append("<br>");
         }
       }
-      else if (aa[row].annotations[res] != null
-              && aa[row].annotations[res].description != null
-              && aa[row].annotations[res].description.length() > 0)
+      if (tip.length() != 6)
       {
-        this.setToolTipText(JvSwingUtils.wrapTooltip(true,
-                aa[row].annotations[res].description));
+        tip.setLength(tip.length() - 4);
+        this.setToolTipText(tip.toString() + "</html>");
       }
-      else
+    }
+    else if (ann.annotations[column] != null)
+    {
+      String description = ann.annotations[column].description;
+      if (description != null && description.length() > 0)
       {
-        // clear the tooltip.
-        this.setToolTipText(null);
+        this.setToolTipText(JvSwingUtils.wrapTooltip(true, description));
       }
+    }
+    else
+    {
+      // clear the tooltip.
+      this.setToolTipText(null);
+    }
+  }
 
-      if (aa[row].annotations[res] != null)
+  /**
+   * Constructs and displays the status bar message
+   * 
+   * @param column
+   * @param ann
+   */
+  void setStatusMessage(int column, AlignmentAnnotation ann)
+  {
+    /*
+     * show alignment column and annotation description if any
+     */
+    StringBuilder text = new StringBuilder(32);
+    text.append(MessageManager.getString("label.column")).append(" ")
+            .append(column + 1);
+
+    if (ann.annotations[column] != null)
+    {
+      String description = ann.annotations[column].description;
+      if (description != null && description.trim().length() > 0)
       {
-        StringBuffer text = new StringBuffer("Sequence position "
-                + (res + 1));
+        text.append("  ").append(description);
+      }
+    }
 
-        if (aa[row].annotations[res].description != null)
+    /*
+     * if the annotation is sequence-specific, show the sequence number
+     * in the alignment, and (if not a gap) the residue and position
+     */
+    SequenceI seqref = ann.sequenceRef;
+    if (seqref != null)
+    {
+      int seqIndex = av.getAlignment().findIndex(seqref);
+      if (seqIndex != -1)
+      {
+        text.append(", ")
+                .append(MessageManager.getString("label.sequence"))
+                .append(" ")
+                .append(seqIndex + 1);
+        char residue = seqref.getCharAt(column);
+        if (!Comparison.isGap(residue))
         {
-          text.append("  " + aa[row].annotations[res].description);
+          int residuePos = seqref.findPosition(column);
+          text.append(": ").append(residue).append(" (")
+                  .append(residuePos).append(")");
         }
-
-        ap.alignFrame.statusBar.setText(text.toString());
       }
     }
-    else
-    {
-      this.setToolTipText(null);
-    }
+
+    ap.alignFrame.statusBar.setText(text.toString());
   }
 
   /**
index 497f3ba..569fcec 100644 (file)
@@ -91,8 +91,6 @@ import javax.swing.JRadioButtonMenuItem;
  */
 public class PopupMenu extends JPopupMenu
 {
-  private static final String ALL_ANNOTATIONS = "All";
-
   JMenu groupMenu = new JMenu();
 
   JMenuItem groupName = new JMenuItem();
@@ -756,7 +754,8 @@ public class PopupMenu extends JPopupMenu
     showMenu.removeAll();
     hideMenu.removeAll();
 
-    final List<String> all = Arrays.asList(ALL_ANNOTATIONS);
+    final List<String> all = Arrays.asList(new String[] { MessageManager
+            .getString("label.all") });
     addAnnotationTypeToShowHide(showMenu, forSequences, "", all, true, true);
     addAnnotationTypeToShowHide(hideMenu, forSequences, "", all, true,
             false);
index 8ebcc87..f476d41 100644 (file)
@@ -857,7 +857,8 @@ public class SeqPanel extends JPanel implements MouseListener,
      * Sequence number (if known), and sequence name.
      */
     String seqno = seq == -1 ? "" : " " + (seq + 1);
-    text.append("Sequence" + seqno + " ID: " + sequence.getName());
+    text.append("Sequence").append(seqno).append(" ID: ")
+            .append(sequence.getName());
 
     String residue = null;
     /*
index 1f666a4..1ad5322 100644 (file)
@@ -90,7 +90,7 @@ public class HelpLinksChecker
       return;
     }
 
-    internetAvailable &= connectToUrl("http://www.example.com");
+    internetAvailable &= connectToUrl("http://www.example.org");
 
     Map<String, String> tocTargets = checkHelpMappings(helpFolder);