Clover icon

Coverage Report

  1. Project Clover database Tue Mar 10 2026 14:58:44 GMT
  2. Package jalview.datamodel

File HMMNode.java

 

Coverage histogram

../../img/srcFileCovDistChart0.png
0% of files have more coverage

Code metrics

4
26
21
1
148
105
23
0.88
1.24
21
1.1

Classes

Class Line # Actions
HMMNode 8 26 23
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package jalview.datamodel;
2   
3    /**
4    * stores data for each node in the hmm model
5    * @author TZVanaalten
6    *
7    */
 
8    public class HMMNode
9    {
10    //contains the match emissions for each symbol
11    double[] matchEmissions;
12   
13    //contains the insert emissions for each symbol
14    double[] insertEmissions;
15   
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;
19   
20    //annotations
21    int residueNumber;
22    char consensusResidue;
23    char referenceAnnotation;
24    char maskValue;
25    char consensusStructure;
26   
27    /**
28    * Constructor
29    */
 
30  0 toggle public HMMNode()
31    {
32    }
33   
 
34  0 toggle public double[] getMatchEmissions()
35    {
36  0 return matchEmissions;
37    }
38   
 
39  0 toggle double getMatchEmission(int symbolIndex)
40    {
41  0 return matchEmissions[symbolIndex];
42    }
43   
 
44  0 toggle public void setMatchEmissions(double[] matches)
45    {
46  0 this.matchEmissions = matches;
47    }
48   
 
49  0 toggle public double[] getInsertEmissions()
50    {
51  0 return insertEmissions;
52    }
53   
 
54  0 toggle double getInsertEmission(int symbolIndex)
55    {
56  0 return insertEmissions[symbolIndex];
57    }
58   
 
59  0 toggle public void setInsertEmissions(double[] insertEmissionsL)
60    {
61  0 this.insertEmissions = insertEmissionsL;
62    }
63   
 
64  0 toggle public double[] getStateTransitions()
65    {
66  0 return stateTransitions;
67    }
68   
 
69  0 toggle double getStateTransition(int transition)
70    {
71  0 return stateTransitions[transition];
72    }
73   
 
74  0 toggle public void setStateTransitions(double[] stateTransitionsM)
75    {
76  0 this.stateTransitions = stateTransitionsM;
77    }
78   
 
79  0 toggle int getResidueNumber()
80    {
81  0 return residueNumber;
82    }
 
83  0 toggle public void setResidueNumber(int resNo)
84    {
85  0 this.residueNumber = resNo;
86    }
87   
 
88  0 toggle char getConsensusResidue()
89    {
90  0 return consensusResidue;
91    }
 
92  0 toggle public void setConsensusResidue(char consensusResidue)
93    {
94  0 this.consensusResidue = consensusResidue;
95    }
96   
 
97  0 toggle char getReferenceAnnotation()
98    {
99  0 return referenceAnnotation;
100    }
 
101  0 toggle public void setReferenceAnnotation(char referenceAnnotation)
102    {
103  0 this.referenceAnnotation = referenceAnnotation;
104    }
105   
 
106  0 toggle char getMaskValue()
107    {
108  0 return maskValue;
109    }
 
110  0 toggle public void setMaskValue(char maskValue)
111    {
112  0 this.maskValue = maskValue;
113    }
114   
 
115  0 toggle char getConsensusStructure()
116    {
117  0 return consensusStructure;
118    }
 
119  0 toggle public void setConsensusStructure(char consensusStructure)
120    {
121  0 this.consensusStructure = consensusStructure;
122    }
123   
124    /**
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.
128    *
129    * @return
130    */
 
131  0 toggle int getMaxMatchEmissionIndex()
132    {
133  0 int maxIndex = 0;
134  0 double max = 0D;
135   
136  0 for (int i = 0; i < matchEmissions.length; i++)
137    {
138  0 if (matchEmissions[i] > max)
139    {
140  0 max = matchEmissions[i];
141  0 maxIndex = i;
142    }
143    }
144  0 return maxIndex;
145    }
146    }
147   
148