Merge branch 'task/JAL-3243_PDB_free_text_error' into develop
authorBen Soares <bsoares@dundee.ac.uk>
Wed, 1 May 2019 13:37:45 +0000 (14:37 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Wed, 1 May 2019 13:37:45 +0000 (14:37 +0100)
Merging in JAL-3243 replacement .jar files for jersey and javax.ws.rs.

getdown/src/getdown/core/src/main/java/com/threerings/getdown/util/LaunchUtil.java
help/help/html/features/featuresettings.html
help/help/html/io/export.html
src/jalview/io/vcf/VCFLoader.java
src/jalview/util/ImageMaker.java
test/jalview/io/vcf/VCFLoaderTest.java
utils/install4j/install4j_template.install4j

index 829e38f..f2cd573 100644 (file)
@@ -20,7 +20,7 @@ import static com.threerings.getdown.Log.log;
 public class LaunchUtil
 {
     /** The directory into which a local VM installation should be unpacked. */
-    public static final String LOCAL_JAVA_DIR = "java_vm";
+    public static final String LOCAL_JAVA_DIR = "jre";
 
     /**
      * Writes a <code>version.txt</code> file into the specified application directory and
index 3d7c944..a156a39 100755 (executable)
     available in the application) will re-order the feature render
     ordering based on the average length of each feature type.
   </p>
-  <p>
+  <p><a name="transparency"></a>
     The <strong><em>transparency slider setting</em></strong> controls
     the visibility of features rendered below other features. Reducing
     the transparency will mean that features at the top of the list can
index 8a554aa..04216da 100755 (executable)
@@ -82,6 +82,8 @@
     blurred. Right-click the image and choose &quot;Edit image.&quot; to
     convert it to word drawing objects which give a truer WYSIWIG
     representation.</li>
+  <li>EPS does not support colour transparency, so will not reproduce this
+    if used for <a href="../features/featuresettings.html#transparency">feature colouring</a>.</li>
   <li>Mac OSX users will find that eps files are automatically
     converted into PDF files.</li>
   </p>
index f4ce1a3..9831af7 100644 (file)
@@ -262,8 +262,8 @@ public class VCFLoader
    */
   public SequenceI loadVCFContig(String contig)
   {
-    String ref = header.getOtherHeaderLine(VCFHeader.REFERENCE_KEY)
-            .getValue();
+    VCFHeaderLine headerLine = header.getOtherHeaderLine(VCFHeader.REFERENCE_KEY);
+    String ref = headerLine == null ? null : headerLine.getValue();
     if (ref.startsWith("file://"))
     {
       ref = ref.substring(7);
@@ -373,6 +373,7 @@ public class VCFLoader
    */
   protected void setSpeciesAndAssembly(String reference)
   {
+    reference = reference.toLowerCase();
     vcfSpecies = DEFAULT_SPECIES;
 
     /*
@@ -803,40 +804,6 @@ public class VCFLoader
   }
 
   /**
-   * Answers true if the species inferred from the VCF reference identifier
-   * matches that for the sequence
-   * 
-   * @param vcfAssembly
-   * @param speciesId
-   * @return
-   */
-  boolean vcfSpeciesMatchesSequence(String vcfAssembly, String speciesId)
-  {
-    // PROBLEM 1
-    // there are many aliases for species - how to equate one with another?
-    // PROBLEM 2
-    // VCF ##reference header is an unstructured URI - how to extract species?
-    // perhaps check if ref includes any (Ensembl) alias of speciesId??
-    // TODO ask the user to confirm this??
-
-    if (vcfAssembly.contains("Homo_sapiens") // gnomAD exome data example
-            && "HOMO_SAPIENS".equals(speciesId)) // Ensembl species id
-    {
-      return true;
-    }
-
-    if (vcfAssembly.contains("c_elegans") // VEP VCF response example
-            && "CAENORHABDITIS_ELEGANS".equals(speciesId)) // Ensembl
-    {
-      return true;
-    }
-
-    // this is not a sustainable solution...
-
-    return false;
-  }
-
-  /**
    * Queries the VCF reader for any variants that overlap the mapped chromosome
    * ranges of the sequence, and adds as variant features. Returns the number of
    * overlapping variants found.
index 7840261..7232042 100755 (executable)
@@ -78,22 +78,26 @@ public class ImageMaker
 
   public enum TYPE
   {
-    EPS("EPS", MessageManager.getString("label.eps_file"), getEPSChooser()),
+    EPS("EPS", MessageManager.getString("label.eps_file"), EPS_EXTENSION,
+            EPS_DESCRIPTION),
     PNG("PNG", MessageManager.getString("label.png_image"),
-            getPNGChooser()),
-    SVG("SVG", "SVG", getSVGChooser());
-
-    private JalviewFileChooser chooser;
+            PNG_EXTENSION, PNG_DESCRIPTION),
+    SVG("SVG", "SVG", SVG_EXTENSION, SVG_DESCRIPTION);
 
     private String name;
 
     private String label;
 
-    TYPE(String name, String label, JalviewFileChooser chooser)
+    private String extension;
+
+    private String description;
+
+    TYPE(String name, String label, String ext, String desc)
     {
       this.name = name;
       this.label = label;
-      this.chooser = chooser;
+      this.extension = ext;
+      this.description = desc;
     }
 
     public String getName()
@@ -101,9 +105,9 @@ public class ImageMaker
       return name;
     }
 
-    public JalviewFileChooser getChooser()
+    public JalviewFileChooser getFileChooser()
     {
-      return chooser;
+      return new JalviewFileChooser(extension, description);
     }
 
     public String getLabel()
@@ -126,7 +130,7 @@ public class ImageMaker
       setProgressMessage(MessageManager.formatMessage(
               "status.waiting_for_user_to_select_output_file", type.name));
       JalviewFileChooser chooser;
-      chooser = type.getChooser();
+      chooser = type.getFileChooser();
       chooser.setFileView(new jalview.io.JalviewFileView());
       chooser.setDialogTitle(title);
       chooser.setToolTipText(MessageManager.getString("action.save"));
index 9e0efe6..a87c160 100644 (file)
@@ -75,6 +75,7 @@ public class VCFLoaderTest
     Cache.loadProperties("test/jalview/io/testProps.jvprops");
     Cache.setProperty("VCF_FIELDS", ".*");
     Cache.setProperty("VEP_FIELDS", ".*");
+    Cache.setProperty("VCF_ASSEMBLY", "GRCh38=GRCh38");
     Cache.initLogger();
   }
 
index de1f6af..8a64055 100644 (file)
@@ -1773,8 +1773,14 @@ return console.askYesNo(message, true);
       </autoUpdate>
     </unixArchive>
   </mediaSets>
-  <buildIds buildAll="true">
+  <buildIds buildAll="false">
+    <mediaSet refId="153" />
+    <mediaSet refId="570" />
+    <mediaSet refId="743" />
+    <mediaSet refId="878" />
+    <mediaSet refId="1272" />
+    <mediaSet refId="1274" />
     <mediaSet refId="1595" />
   </buildIds>
-  <buildOptions verbose="false" faster="false" disableSigning="false" disableJreBundling="false" debug="false" />
+  <buildOptions verbose="false" faster="false" disableSigning="false" disableJreBundling="true" debug="false" />
 </install4j>