1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.utgenome.util.sv;
24
25 import org.utgenome.gwt.utgb.client.bio.AminoAcid;
26
27 public class EnhancedGeneticVariation extends GeneticVariation {
28
29
30
31
32
33
34
35 public enum MutationType {
36 NA("N/A"), NC("non coding"), MS("missense"), SN("synonymous"), NS("non-sense mutation"), FS("frame-shift mutation"), SS("splice-site muatation");
37
38 public final String description;
39
40 private MutationType(String description) {
41 this.description = description;
42 }
43 }
44
45 public enum MutationPosition {
46 NA("N/A"), InterGenic("inter-genic"), UTR5("5'-UTR"), UTR3("3'-UTR"), Intron("intron"), NonCodingExon("non-coding exon"), FirstExon("first coding exon"), Exon(
47 "coding exon"), LastExon("last coding exon"), SS5("splice site at 5'-end"), SS3("splice site at 3'-end");
48
49 public final String description;
50
51 private MutationPosition(String description) {
52 this.description = description;
53 }
54 }
55
56 public EnhancedGeneticVariation(GeneticVariation v) {
57 super(v);
58 }
59
60 private static final long serialVersionUID = 1L;
61
62
63 public MutationPosition mutationPosition;
64
65 public String strand;
66 public String geneName;
67 public AminoAcid refAA;
68 public AminoAcid altAA;
69 public String refCodon;
70 public String altCodon;
71
72 public MutationType getMutationType() {
73 switch (mutationPosition) {
74 case NA:
75 case InterGenic:
76 case UTR5:
77 case UTR3:
78 case Intron:
79 case NonCodingExon:
80 return MutationType.NC;
81 case SS3:
82 case SS5:
83 return MutationType.SS;
84 }
85
86 if (refAA == null && altAA == null)
87 return MutationType.NC;
88
89 if (variationType != VariationType.Mutation) {
90 return MutationType.FS;
91 }
92
93 if (refAA == altAA)
94 return MutationType.SN;
95
96 if (!refAA.isStopCodon() && altAA.isStopCodon()) {
97 return MutationType.NS;
98 }
99 else
100 return MutationType.MS;
101 }
102
103 }