Clover icon

Coverage Report

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

File HMMNodeTest.java

 

Code metrics

0
6
2
1
42
30
2
0.33
3
2
1

Classes

Class Line # Actions
HMMNodeTest 15 6 2
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package jalview.datamodel;
2   
3    import static org.testng.Assert.assertEquals;
4   
5    import jalview.io.DataSourceType;
6    import jalview.io.FileParse;
7    import jalview.io.HMMFile;
8   
9    import java.io.IOException;
10    import java.net.MalformedURLException;
11   
12    import org.testng.annotations.BeforeClass;
13    import org.testng.annotations.Test;
14   
 
15    public class HMMNodeTest
16    {
17    private HiddenMarkovModel hmm;
18   
 
19  0 toggle @BeforeClass(alwaysRun = true)
20    public void setUp() throws MalformedURLException, IOException
21    {
22    /*
23    * load hmm model of a Kinase domain to a HiddenMarkovModel
24    */
25  0 HMMFile file = new HMMFile(new FileParse(
26    "test/jalview/io/test_PKinase_hmm.txt", DataSourceType.FILE));
27  0 hmm = file.getHMM();
28    }
29   
 
30  0 toggle @Test(groups="Functional")
31    public void testGetMaxMatchEmissionIdex()
32    {
33  0 assertEquals(hmm.getAlphabetType(), "amino");
34  0 String symbols = hmm.getSymbols();
35   
36  0 assertEquals(hmm.getNode(1).getMaxMatchEmissionIndex(),
37    symbols.indexOf('Y'));
38   
39  0 assertEquals(hmm.getNode(17).getMaxMatchEmissionIndex(),
40    symbols.indexOf('K'));
41    }
42    }