-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fix: incorrect order of pattern in figure drawing
Draw pattern with allele first, which is consistent with assumption in drawASMFigure. Add test for this issue.
- Loading branch information
1 parent
934b9e4
commit 012a3c8
Showing
3 changed files
with
36 additions
and
6 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
29 changes: 29 additions & 0 deletions
29
BSPAT_standAlone/src/test/java/edu/cwru/cbc/BSPAT/MethylFigure/IOUtilsTest.java
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,29 @@ | ||
package edu.cwru.cbc.BSPAT.MethylFigure; | ||
|
||
import edu.cwru.cbc.BSPAT.commons.PatternResult; | ||
import org.testng.annotations.BeforeMethod; | ||
import org.testng.annotations.Test; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
|
||
import static org.testng.Assert.*; | ||
|
||
public class IOUtilsTest { | ||
private String testResourcePath; | ||
|
||
@BeforeMethod | ||
public void setUp() { | ||
String root = this.getClass().getClassLoader().getResource("").getFile(); | ||
assertNotNull(root); | ||
testResourcePath = root + "integration/"; | ||
} | ||
|
||
@Test | ||
public void testReadASMPatterns() throws IOException { | ||
String ASMPatternFileName = testResourcePath + "/demoExpected/demoRef-10-96-test-plus_bismark.analysis_ASM.txt"; | ||
List<PatternResult> patternResultList = IOUtils.readASMPatterns(ASMPatternFileName); | ||
assertNotNull(patternResultList.get(0).getSnp(), "First ASM pattern should be the one with allele"); | ||
assertNull(patternResultList.get(1).getSnp(), "Second ASM pattern should be the one without allele"); | ||
} | ||
} |