public String format() {
//

        StringBuilder allele = new StringBuilder();
        allele.append(formatPrefix());  // if use_prefix else ''
        allele.append(":");

        if (kind.equals(Kind.CODING)) {
            allele.append("c.").append(formatCdna());
        } else if (kind.equals(Kind.NON_CODING)) {
            allele.append("n.").append(formatCdna());
//    elif self.kind == 'p':
//    allele = 'p.' + self.format_protein()
//    elif self.kind == 'g':
//    allele = 'g.' + self.format_genome()
        } else {
            throw new NotImplementedException("HGVS calculation not implemented for variant " + chromosome + ":"
                    + start + ":" + reference + ":" + alternate + "; kind: " + kind);
        }
//            if prefix:
        return allele.toString();
//        else:
//                return allele
    }
public String format ( ) { StringBuilder allele = new StringBuilder ( ) ; allele . append ( formatPrefix ( ) ) ; allele . append ( ":" ) ; if ( kind . equals ( Kind . CODING ) ) { allele . append ( "c." ) . append ( formatCdna ( ) ) ; } else if ( kind . equals ( Kind . NON_CODING ) ) { allele . append ( "n." ) . append ( formatCdna ( ) ) ; } else { throw new NotImplementedException ( "HGVS calculation not implemented for variant " + chromosome + ":" + start + ":" + reference + ":" + alternate + "; kind: " + kind ) ; } return allele . toString ( ) ; }
Generate a HGVS string.
@return String containing an HGVS formatted variant representation