Merge branch 'develop' into tasks/JAL-3311_removeVamsasMenu
authorJim Procter <jprocter@issues.jalview.org>
Tue, 2 Jul 2019 19:47:52 +0000 (20:47 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 2 Jul 2019 19:47:52 +0000 (20:47 +0100)
1  2 
help/help/help.jhm
help/help/helpTOC.xml
src/jalview/bin/Jalview.java

diff --combined help/help/help.jhm
     <mapID target="groovy.colours" url="html/features/groovy.html#groovyColours" />
     <mapID target="groovy.featurescounter" url="html/groovy/featuresCounter.html" />
     <mapID target="privacy" url="html/privacy.html" />
 -   <mapID target="vamsas" url="html/vamsas/index.html"/>
     <mapID target="aminoAcids" url="html/misc/aminoAcids.html" />
     <mapID target="aaProperties" url="html/misc/aaproperties.html" />
     <mapID target="geneticCode" url="html/misc/geneticCode.html" />
     
     <mapID target="overview" url="html/features/overview.html" />
     <mapID target="overviewprefs" url="html/features/preferences.html#overview" />
+    
+    <mapID target="importvcf" url="html/features/importvcf.html" />
  </map>
diff --combined help/help/helpTOC.xml
@@@ -24,8 -24,9 +24,9 @@@
        <tocitem text="Jalview Documentation" target="home" expand="true">
                        <tocitem text="What's new" target="new" expand="true">
                                <tocitem text="Latest Release Notes" target="release"/>
-                               <tocitem text="Structure Chooser" target="pdbchooser"/>
-                               <tocitem text="Chimera Annotation Exchange" target="chimera.annotxfer"/>
+                               <tocitem text="VCF Import" target="vcfimport"/>
+                               <tocitem text="Feature Filters and Attribute Colourschemes" target="features.featureschemes" />
+                               
                </tocitem>
                
                <tocitem text="Editing Alignments" target="edit" />
@@@ -49,6 -50,7 +50,7 @@@
                <tocitem text="Select Columns by Annotation" target="selectcolbyannot" />
                
                <tocitem text="Nucleic Acid Support" target="nucleicAcids" expand="false">
+                 <tocitem text="Annotating from VCF" target="importvcf" /> 
                        <tocitem text="Viewing RNA structure" target="varna" />
                        <tocitem text="RNA Structure Consensus" target="calcs.alstrconsensus" />
                        <tocitem text="RNA Helices coloring" target="colours.rnahelices" />
                <tocitem text="Opening URLs from Jalview" target="urllinks" expand="true">
                    <tocitem text="Configuring URL Links" target="linksprefs" />
                </tocitem>
 -              <tocitem text="VAMSAS Data Exchange" target="vamsas">
 -                      <!-- what can Jalview share with other apps -->
 -                      <!-- what other apps exist -->
 -              </tocitem>
                <tocitem text="Window Menus" target="menus" expand="false">
                        <tocitem text="Desktop Window" target="desktopMenu" />
                        <tocitem text="Alignment Window" target="alMenu">
@@@ -107,7 -107,7 +107,7 @@@ public class Jalvie
          perms.add(new AllPermission());
          return (perms);
        }
-     
        @Override
        public void refresh()
        {
    class FeatureFetcher
    {
      /*
-      * TODO: generalise to track all jalview events to orchestrate batch
-      * processing events.
+      * TODO: generalise to track all jalview events to orchestrate batch processing
+      * events.
       */
  
      private int queued = 0;
     * main class for Jalview application
     * 
     * @param args
-    *          open <em>filename</em>
+    *               open <em>filename</em>
     */
    public static void main(String[] args)
    {
      // report Jalview version
      Cache.loadBuildProperties(true);
  
-     String appdirString = System.getProperty("getdownappdir");
-     if (appdirString != null && appdirString.length() > 0)
-     {
-       final File appdir = new File(appdirString);
-       new Thread()
-       {
-         @Override
-         public void run()
-         {
-           LaunchUtil.upgradeGetdown(
-                   new File(appdir, "getdown-launcher-old.jar"),
-                   new File(appdir, "getdown-launcher.jar"),
-                   new File(appdir, "getdown-launcher-new.jar"));
-         }
-       }.start();
-     }
      ArgsParser aparser = new ArgsParser(args);
      boolean headless = false;
  
                    "Failed to set QuaQua look and feel: " + e.toString());
          }
        }
-       if (lookAndFeel == null || !(lookAndFeel.getClass()
-               .isAssignableFrom(UIManager.getLookAndFeel().getClass()))
+       if (lookAndFeel == null
+               || !(lookAndFeel.getClass().isAssignableFrom(
+                       UIManager.getLookAndFeel().getClass()))
                || !UIManager.getLookAndFeel().getClass().toString()
                        .toLowerCase().contains("quaqua"))
        {
      }
  
      /*
-      * configure 'full' SO model if preferences say to, 
-      * else use the default (SO Lite)
+      * configure 'full' SO model if preferences say to, else use the default (SO
+      * Lite)
       */
-     if (Cache.getDefault("USE_FULL_SO", false))
+     if (Cache.getDefault("USE_FULL_SO", true))
      {
        SequenceOntologyFactory.setInstance(new SequenceOntology());
      }
        BioJsHTMLOutput.updateBioJS();
      }
  
+     // Move any new getdown-launcher-new.jar into place over old
+     // getdown-launcher.jar
+     String appdirString = System.getProperty("getdownappdir");
+     if (appdirString != null && appdirString.length() > 0)
+     {
+       final File appdir = new File(appdirString);
+       new Thread()
+       {
+         @Override
+         public void run()
+         {
+           LaunchUtil.upgradeGetdown(
+                   new File(appdir, "getdown-launcher-old.jar"),
+                   new File(appdir, "getdown-launcher.jar"),
+                   new File(appdir, "getdown-launcher-new.jar"));
+         }
+       }.start();
+     }
      String file = null, data = null;
      FileFormatI format = null;
      DataSourceType protocol = null;
        System.out.println("No files to open!");
        System.exit(1);
      }
 -    String vamsasImport = aparser.getValue("vdoc");
 -    String vamsasSession = aparser.getValue("vsess");
 -    if (vamsasImport != null || vamsasSession != null)
 -    {
 -      if (desktop == null || headless)
 -      {
 -        System.out.println(
 -                "Headless vamsas sessions not yet supported. Sorry.");
 -        System.exit(1);
 -      }
 -      // if we have a file, start a new session and import it.
 -      boolean inSession = false;
 -      if (vamsasImport != null)
 -      {
 -        try
 -        {
 -          DataSourceType viprotocol = AppletFormatAdapter
 -                  .checkProtocol(vamsasImport);
 -          if (viprotocol == DataSourceType.FILE)
 -          {
 -            inSession = desktop.vamsasImport(new File(vamsasImport));
 -          }
 -          else if (viprotocol == DataSourceType.URL)
 -          {
 -            inSession = desktop.vamsasImport(new URL(vamsasImport));
 -          }
 -
 -        } catch (Exception e)
 -        {
 -          System.err.println("Exeption when importing " + vamsasImport
 -                  + " as a vamsas document.");
 -          e.printStackTrace();
 -        }
 -        if (!inSession)
 -        {
 -          System.err.println("Failed to import " + vamsasImport
 -                  + " as a vamsas document.");
 -        }
 -        else
 -        {
 -          System.out.println("Imported Successfully into new session "
 -                  + desktop.getVamsasApplication().getCurrentSession());
 -        }
 -      }
 -      if (vamsasSession != null)
 -      {
 -        if (vamsasImport != null)
 -        {
 -          // close the newly imported session and import the Jalview specific
 -          // remnants into the new session later on.
 -          desktop.vamsasStop_actionPerformed(null);
 -        }
 -        // now join the new session
 -        try
 -        {
 -          if (desktop.joinVamsasSession(vamsasSession))
 -          {
 -            System.out.println(
 -                    "Successfully joined vamsas session " + vamsasSession);
 -          }
 -          else
 -          {
 -            System.err.println("WARNING: Failed to join vamsas session "
 -                    + vamsasSession);
 -          }
 -        } catch (Exception e)
 -        {
 -          System.err.println(
 -                  "ERROR: Failed to join vamsas session " + vamsasSession);
 -          e.printStackTrace();
 -        }
 -        if (vamsasImport != null)
 -        {
 -          // the Jalview specific remnants can now be imported into the new
 -          // session at the user's leisure.
 -          Cache.log.info(
 -                  "Skipping Push for import of data into existing vamsas session."); // TODO:
 -          // enable
 -          // this
 -          // when
 -          // debugged
 -          // desktop.getVamsasApplication().push_update();
 -        }
 -      }
 -    }
      long progress = -1;
      // Finally, deal with the remaining input data.
      if (file != null)
          {
            data.replaceAll("%20", " ");
  
-           ColourSchemeI cs = ColourSchemeProperty
-                   .getColourScheme(af.getViewport(),
-                           af.getViewport().getAlignment(), data);
+           ColourSchemeI cs = ColourSchemeProperty.getColourScheme(
+                   af.getViewport(), af.getViewport().getAlignment(), data);
  
            if (cs != null)
            {
      // And the user
      // ////////////////////
  
 -    if (!headless && file == null && vamsasImport == null
 +    if (!headless && file == null
              && jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true))
      {
        file = jalview.bin.Cache.getDefault("STARTUP_FILE",
                      // passed in correctly)"
                      + "-jabaws URL\tSpecify URL for Jabaws services (e.g. for a local installation).\n"
                      + "-fetchfrom nickname\tQuery nickname for features for the alignments and display them.\n"
 -                    // +
 -                    // "-vdoc vamsas-document\tImport vamsas document into new
 -                    // session or join existing session with same URN\n"
 -                    // + "-vses vamsas-session\tJoin session with given URN\n"
                      + "-groovy FILE\tExecute groovy script in FILE, after all other arguments have been processed (if FILE is the text 'STDIN' then the file will be read from STDIN)\n"
                      + "\n~Read documentation in Application or visit http://www.jalview.org for description of Features and Annotations file~\n\n");
    }
     * Locate the given string as a file and pass it to the groovy interpreter.
     * 
     * @param groovyscript
-    *          the script to execute
+    *                         the script to execute
     * @param jalviewContext
-    *          the Jalview Desktop object passed in to the groovy binding as the
-    *          'Jalview' object.
+    *                         the Jalview Desktop object passed in to the groovy
+    *                         binding as the 'Jalview' object.
     */
    private void executeGroovyScript(String groovyscript, AlignFrame af)
    {
    }
  
    /**
-    * Quit method delegates to Desktop.quit - unless running in headless mode
-    * when it just ends the JVM
+    * Quit method delegates to Desktop.quit - unless running in headless mode when
+    * it just ends the JVM
     */
    public void quit()
    {