MCPcopy Create free account
hub / github.com/RealTimeGenomics/rtg-tools / Protein

Class Protein

src/main/java/com/rtg/mode/Protein.java:44–316  ·  view source on GitHub ↗

Individual amino acids. These conform to the standard unambiguous single letter IUPAC codes As SLIM does not currently support ambiguous codes the two ambiguous codes "B" and "Z" should be translated to "X".

Source from the content-addressed store, hash-verified

42 * "B" and "Z" should be translated to "X".
43 */
44public class Protein implements Residue, Comparable<Protein>, PseudoEnum {
45
46 /** Unknown */
47 public static final Protein X = new XProtein(0, "X", "Xaa", "Any amino acid");
48
49
50 private static class XProtein extends Protein {
51 XProtein(final int ordinal, final String ename, final String sname, final String name) {
52 super(ordinal, ename, sname, name);
53 }
54 @Override
55 public boolean ignore() {
56 return true;
57 }
58 }
59
60 /** Stop (from translated DNA) */
61 public static final Protein STOP = new STOPProtein(1, "STOP", "***", "Translated stop codon");
62
63 private static class STOPProtein extends Protein {
64 STOPProtein(final int ordinal, final String ename, final String sname, final String name) {
65 super(ordinal, ename, sname, name);
66 }
67 @Override
68 public boolean ignore() {
69 return true;
70 }
71
72 @Override
73 public String toString() {
74 return "*";
75 }
76 }
77
78 /** Alanine */
79 public static final Protein A = new Protein(2, "A", "Ala", "Alanine");
80
81 /** Arginine */
82 public static final Protein R = new Protein(3, "R", "Arg", "Arginine");
83
84 /** Asparagine */
85 public static final Protein N = new Protein(4, "N", "Asn", "Asparagine");
86
87 /** Aspartic acid */
88 public static final Protein D = new Protein(5, "D", "Asp", "Aspartic acid");
89
90 /** Cysteine */
91 public static final Protein C = new Protein(6, "C", "Cys", "Cysteine");
92
93 /** Glutamine */
94 public static final Protein Q = new Protein(7, "Q", "Gln", "Glutamine");
95
96 /** Glutamic acid */
97 public static final Protein E = new Protein(8, "E", "Glu", "Glutamic acid");
98
99 /** Glycine */
100 public static final Protein G = new Protein(9, "G", "Gly", "Glycine");
101

Callers

nothing calls this directly

Calls 3

valuesMethod · 0.95
toStringMethod · 0.65
putMethod · 0.45

Tested by

no test coverage detected