Clover icon

Coverage Report

  1. Project Clover database Thu Dec 4 2025 14:43:25 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
1.0100%
 

Contributing tests

This file is covered by 1 test. .

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  1 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  1 HMMFile file = new HMMFile(new FileParse(
26    "test/jalview/io/test_PKinase_hmm.txt", DataSourceType.FILE));
27  1 hmm = file.getHMM();
28    }
29   
 
30  1 toggle @Test(groups="Functional")
31    public void testGetMaxMatchEmissionIdex()
32    {
33  1 assertEquals(hmm.getAlphabetType(), "amino");
34  1 String symbols = hmm.getSymbols();
35   
36  1 assertEquals(hmm.getNode(1).getMaxMatchEmissionIndex(),
37    symbols.indexOf('Y'));
38   
39  1 assertEquals(hmm.getNode(17).getMaxMatchEmissionIndex(),
40    symbols.indexOf('K'));
41    }
42    }