Merge branch 'bug/JAL-2864nullOverviewCanvas' into develop
[jalview.git] / src / jalview / ws / dbsources / Uniprot.java
index d44b104..167cd97 100644 (file)
@@ -309,14 +309,17 @@ public class Uniprot extends DbSourceProxyImpl
     /*
      * append variant in standard format if present
      * e.g. p.Arg59Lys
+     * multiple variants are split over lines using <br>
      */
+    boolean asHtml = false;
     if (orig != null && !orig.isEmpty() && variants != null
             && !variants.isEmpty())
     {
       int p = 0;
       for (String var : variants)
       {
-        // TODO proper HGVC nomenclature for delins structural variations
+        // TODO proper HGVS nomenclature for delins structural variations
+        // http://varnomen.hgvs.org/recommendations/protein/variant/delins/
         // for now we are pragmatic - any orig/variant sequence longer than
         // three characters is shown with single-character notation rather than
         // three-letter notation
@@ -355,7 +358,8 @@ public class Uniprot extends DbSourceProxyImpl
         }
         if (++p != variants.size())
         {
-          sb.append("\n");
+          sb.append("<br/>&nbsp;&nbsp;");
+          asHtml = true;
         }
         else
         {
@@ -368,6 +372,11 @@ public class Uniprot extends DbSourceProxyImpl
     {
       sb.append(description);
     }
+    if (asHtml)
+    {
+      sb.insert(0, "<html>");
+      sb.append("</html>");
+    }
 
     return sb.toString();
   }