+ /**
+ * A helper method that builds a sequence feature description
+ *
+ * @param feature
+ * @return
+ */
+ static String getDescription(FeatureType feature)
+ {
+ String orig = feature.getOriginal();
+ List<String> variants = feature.getVariation();
+ StringBuilder sb = new StringBuilder();
+
+ /*
+ * 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 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
+ sb.append("p.");
+ if (orig.length() < 4)
+ {
+ for (int c = 0, clen = orig.length(); c < clen; c++)