1 package jalview.datamodel;
4 * stores data for each node in the hmm model
10 //contains the match emissions for each symbol
11 double[] matchEmissions;
13 //contains the insert emissions for each symbol
14 double[] insertEmissions;
16 // contains the state transitions for each possible transition. These are mm,
17 // mi, md, im, ii, dm and dd in order
18 double[] stateTransitions;
22 char consensusResidue;
23 char referenceAnnotation;
25 char consensusStructure;
34 public double[] getMatchEmissions()
36 return matchEmissions;
39 double getMatchEmission(int symbolIndex)
41 return matchEmissions[symbolIndex];
44 public void setMatchEmissions(double[] matches)
46 this.matchEmissions = matches;
49 public double[] getInsertEmissions()
51 return insertEmissions;
54 double getInsertEmission(int symbolIndex)
56 return insertEmissions[symbolIndex];
59 public void setInsertEmissions(double[] insertEmissionsL)
61 this.insertEmissions = insertEmissionsL;
64 public double[] getStateTransitions()
66 return stateTransitions;
69 double getStateTransition(int transition)
71 return stateTransitions[transition];
74 public void setStateTransitions(double[] stateTransitionsM)
76 this.stateTransitions = stateTransitionsM;
79 int getResidueNumber()
83 public void setResidueNumber(int resNo)
85 this.residueNumber = resNo;
88 char getConsensusResidue()
90 return consensusResidue;
92 public void setConsensusResidue(char consensusResidue)
94 this.consensusResidue = consensusResidue;
97 char getReferenceAnnotation()
99 return referenceAnnotation;
101 public void setReferenceAnnotation(char referenceAnnotation)
103 this.referenceAnnotation = referenceAnnotation;
110 public void setMaskValue(char maskValue)
112 this.maskValue = maskValue;
115 char getConsensusStructure()
117 return consensusStructure;
119 public void setConsensusStructure(char consensusStructure)
121 this.consensusStructure = consensusStructure;
125 * Answers the symbol index of the symbol with the highest match emission
126 * probability (first symbol in case of a tie). Note this object stores
127 * probabilities, not the negative logarithms as in the HMM file.
131 int getMaxMatchEmissionIndex()
136 for (int i = 0; i < matchEmissions.length; i++)
138 if (matchEmissions[i] > max)
140 max = matchEmissions[i];