JAL-1920 JAL-3017 use newline not <br/> in description and update test to cover multi...
[jalview.git] / src / jalview / ws / dbsources / Uniprot.java
index fc4f318..274ad32 100644 (file)
@@ -316,10 +316,18 @@ public class Uniprot extends DbSourceProxyImpl
       int p = 0;
       for (String var : variants)
       {
+        // TODO proper HGVC nomenclature for delins structural variations
         sb.append("p.");
-        String orig3 = ResidueProperties.aa2Triplet.get(orig);
-        sb.append(orig3 == null ? orig : StringUtils.toSentenceCase(orig3));
+        for (int c = 0, clen = orig.length(); c < clen; c++)
+        {
+          char origchar = orig.charAt(c);
+          String orig3 = ResidueProperties.aa2Triplet.get("" + origchar);
+          sb.append(orig3 == null ? origchar
+                  : StringUtils.toSentenceCase(orig3));
+        }
+
         sb.append(Integer.toString(uf.getPosition()));
+
         for (int c = 0, clen = var.length(); c < clen; c++)
         {
           char varchar = var.charAt(c);
@@ -330,7 +338,7 @@ public class Uniprot extends DbSourceProxyImpl
         }
         if (++p != variants.size())
         {
-          sb.append("<br/>");
+          sb.append("\n");
         }
         else
         {