Example #1
0
  /** Net AA change (only for InDels) */
  public String getAaNetChange() {
    String aaLong = "", aaShort = "";

    if (variant.isIns()) {
      aaShort = getAaRef().toUpperCase();
      aaLong = getAaAlt().toUpperCase();
    } else if (variant.isDel()) {
      aaLong = getAaRef().toUpperCase();
      aaShort = getAaAlt().toUpperCase();
    }

    if (aaLong.startsWith(aaShort)) return aaLong.substring(aaShort.length());
    if (aaLong.endsWith(aaLong)) return aaLong.substring(0, aaLong.length() - aaShort.length());

    return aaLong;
  }