Merge branch 'develop' into features/JAL-1793VCF
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 16 Nov 2017 12:20:04 +0000 (12:20 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 16 Nov 2017 12:20:04 +0000 (12:20 +0000)
help/html/releases.html
help/html/whatsNew.html
src/jalview/ws/dbsources/Uniprot.java
test/jalview/ws/dbsources/UniprotTest.java

index 6396313..dd1bdc7 100755 (executable)
@@ -97,16 +97,18 @@ li:before {
             <li><!-- JAL-2685 -->Start/End limits are shown in Pairwise Alignment report</li>
             <li><!-- JAL-2810 -->Sequence fetcher's Free text 'autosearch' feature can be disabled</li>
             <li><!-- JAL-2810 -->Retrieve IDs tab added for UniProt and PDB easier retrieval of sequences for lists of IDs</li>
-             
+            <li><!-- JAL-2758 -->Short names for sequences retrieved from Uniprot</li> 
           </ul>
           <em>Scripting</em>
           <ul>
-          <li>Groovy interpreter updated to 2.4.12</li>
-          <li>Example groovy script for generating a matrix of percent identity scores for current alignment.</li>
+            <li>Groovy interpreter updated to 2.4.12</li>
+            <li>Example groovy script for generating a matrix of percent identity scores for current alignment.</li>
           </ul>
           <em>Testing and Deployment</em>
-          <ul><li><!-- JAL-2727 -->Test to catch memory leaks in Jalview UI</li></ul>
-          </div>
+          <ul>
+            <li><!-- JAL-2727 -->Test to catch memory leaks in Jalview UI</li>
+          </ul>
+        </div>
       </td>
       <td><div align="left">
           <em>General</em>
index 9cf1044..d92f26b 100755 (executable)
@@ -38,6 +38,7 @@
     <li>Improved usability with <a href="features/pdbsequencefetcher.html">PDB</a> and 
     <a href="features/uniprotsequencefetcher.html">UniProt</a> Free Text Search
       dialog, and new tab for retrieval of sequences for lists of IDs.</li>
+      <li>Short names assigned to sequences retrieved from UniProt</li> 
   </ul>
   <p>
     <strong><a name="experimental">Experimental Features</a></strong>
index c9beb8e..73775cf 100644 (file)
@@ -310,23 +310,18 @@ public class Uniprot extends DbSourceProxyImpl
   /**
    *
    * @param entry
-   *          UniportEntry
+   *          UniprotEntry
    * @return The accession id(s) and name(s) delimited by '|'.
    */
   public static String getUniprotEntryId(UniprotEntry entry)
   {
     StringBuilder name = new StringBuilder(32);
-    // name.append("UniProt/Swiss-Prot");
-    // use 'canonicalised' name for optimal id matching
-    name.append(DBRefSource.UNIPROT);
-    for (String accessionId : entry.getAccession())
-    {
-      name.append(BAR_DELIMITER);
-      name.append(accessionId);
-    }
     for (String n : entry.getName())
     {
-      name.append(BAR_DELIMITER);
+      if (name.length() > 0)
+      {
+        name.append(BAR_DELIMITER);
+      }
       name.append(n);
     }
     return name.toString();
index 2d4be71..f98ef85 100644 (file)
@@ -163,11 +163,11 @@ public class UniprotTest
             new StringReader(UNIPROT_XML)).get(0);
 
     /*
-     * name formatted as source | accession ids | names
-     * source database converted to Jalview canonical name
+     * name formatted with Uniprot Entry name
      */
-    String expectedName = "UNIPROT|A9CKP4|A9CKP5|A9CKP4_AGRT5|A9CKP4_AGRT6";
-    assertEquals(expectedName, Uniprot.getUniprotEntryId(entry));
+    String expectedName = "A9CKP4_AGRT5|A9CKP4_AGRT6";
+    assertEquals(expectedName,
+            Uniprot.getUniprotEntryId(entry));
   }
 
   /**