-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestSiteSnpIndelAnno.java
77 lines (62 loc) · 2.53 KB
/
TestSiteSnpIndelAnno.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package fionaApp;
import org.junit.Assert;
import com.novelbio.analysis.seq.fasta.SeqFasta;
import com.novelbio.analysis.seq.genome.GffChrAbs;
import com.novelbio.database.model.species.Species;
public class TestSiteSnpIndelAnno {
GffChrAbs gffChrAbs;
public void before() {
Species species = new Species(9606);
species.setVersion("hg19_GRCh37");
gffChrAbs = new GffChrAbs(species);
}
public void testSnpAnnoNormCis() {
SiteSnpIndelAnno siteSnpIndelAnno = new SiteSnpIndelAnno(gffChrAbs);
String chrId = "chr1";
int startLoc = 218578574;
String refNr = "T", thisNr = "A";
siteSnpIndelAnno.setSite(chrId, refNr, thisNr);
siteSnpIndelAnno.anno();
Assert.assertEquals("ATG", siteSnpIndelAnno.getRefNr().toString());
Assert.assertEquals("AAG", siteSnpIndelAnno.getThisNr().toString());
chrId = "chr1";
startLoc = 218578573;
refNr = "A"; thisNr = "G";
siteSnpIndelAnno.setSite(chrId, refNr, thisNr);
siteSnpIndelAnno.anno();
Assert.assertEquals("ATG".toLowerCase(), siteSnpIndelAnno.getRefNr().toString());
Assert.assertEquals("GTG".toLowerCase(), siteSnpIndelAnno.getThisNr().toString());
chrId = "chr1";
startLoc = 218578575;
refNr = "G"; thisNr = "C";
siteSnpIndelAnno.setSite(chrId, refNr, thisNr);
siteSnpIndelAnno.anno();
Assert.assertEquals("ATG".toLowerCase(), siteSnpIndelAnno.getRefNr().toString());
Assert.assertEquals("ATC".toLowerCase(), siteSnpIndelAnno.getThisNr().toString());
}
public void testSnpAnnoNormTrans() {
SiteSnpIndelAnno siteSnpIndelAnno = new SiteSnpIndelAnno(gffChrAbs);
String chrId = "chr17";
int startLoc = 7577534;
String refNr = "C", thisNr = "A";
siteSnpIndelAnno.setSite(chrId, refNr, thisNr);
siteSnpIndelAnno.anno();
Assert.assertEquals("AGG", siteSnpIndelAnno.getRefNr().toString());
Assert.assertEquals("AGT", siteSnpIndelAnno.getThisNr().toString());
chrId = "chr1";
startLoc = 7577535;
refNr = "C"; thisNr = "G";
siteSnpIndelAnno.setSite(chrId, refNr, thisNr);
siteSnpIndelAnno.anno();
Assert.assertEquals("AGG".toLowerCase(), siteSnpIndelAnno.getRefNr().toString());
Assert.assertEquals("ACG".toLowerCase(), siteSnpIndelAnno.getThisNr().toString());
chrId = "chr1";
startLoc = 7577536;
refNr = "T"; thisNr = "C";
siteSnpIndelAnno.setSite(chrId, refNr, thisNr);
siteSnpIndelAnno.anno();
Assert.assertEquals("AGG".toLowerCase(), siteSnpIndelAnno.getRefNr().toString());
Assert.assertEquals("GGG".toLowerCase(), siteSnpIndelAnno.getThisNr().toString());
}
}
}