-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Take max of possible prior probabilities for terminal AAs
- Loading branch information
1 parent
9cd80f7
commit 59c5fcc
Showing
4 changed files
with
79 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package iterativelocalization; | ||
|
||
import edu.umich.andykong.ptmshepherd.iterativelocalization.BinPriorProbabilities; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
public class BinPriorProbabilitiesTest { | ||
BinPriorProbabilities bpp; | ||
|
||
@BeforeEach | ||
public void setUp() { | ||
// Initialize test data | ||
this.bpp = new BinPriorProbabilities(); | ||
} | ||
|
||
@Test | ||
public void computePriorProbs() { | ||
String seq = "PEPTI"; | ||
boolean[] allowedPoses = new boolean[]{true, true, true, true, true}; | ||
|
||
double[] expectedPriorProbs = new double[]{0.2, 0.2, 0.2, 0.2, 0.2}; | ||
assertArrayEquals(bpp.computePriorProbs(seq, allowedPoses), expectedPriorProbs, 0.0001); | ||
} | ||
|
||
@Test | ||
public void computeUniformPriorProbs() { | ||
String seq = "PEPTI"; | ||
boolean[] allowedPoses = new boolean[]{true, true, true, true, true}; | ||
|
||
double[] expectedPriorProbs = new double[]{0.2, 0.2, 0.2, 0.2, 0.2}; | ||
assertArrayEquals(bpp.computeUniformPriorProbs(seq, allowedPoses), expectedPriorProbs, 0.0001); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters