aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPjotr Prins2015-03-14 13:58:02 +0300
committerPjotr Prins2015-03-14 13:58:02 +0300
commit60476f068766371c41eb17c2ad20f4f6ce7da2d5 (patch)
tree5161db57397f9e467aaf73f974c9ac63ccb23dc7
parentfc42cd5910bbc021e1fd51b579b2f83a421a33b8 (diff)
downloadgenenetwork2-60476f068766371c41eb17c2ad20f4f6ce7da2d5.tar.gz
Adding assertions
-rw-r--r--wqflask/wqflask/my_pylmm/pyLMM/runlmm.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py
index 7a77ad0a..8c0b73eb 100644
--- a/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py
+++ b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py
@@ -113,10 +113,19 @@ if cmd == 'redis':
ps, ts = gn2_load_redis('testrun','other',k,Y,G.T)
print np.array(ps)
- print round(ps[0],4)
- assert(options.testing and round(ps[0],4)==0.7262)
- print round(ps[-1],4)
- assert(options.testing and round(ps[-1],4)==0.3461)
+ # Test results
+ p1 = round(ps[0],4)
+ p2 = round(ps[-1],4)
+ sys.stderr.write(options.geno+"\n")
+ if options.geno == 'data/small.geno':
+ assert p1==0.0708, "p1=%f" % p1
+ assert p2==0.1417, "p2=%f" % p2
+ if options.geno == 'data/small_na.geno':
+ assert p1==0.0958, "p1=%f" % p1
+ assert p2==0.0435, "p2=%f" % p2
+ if options.geno == 'data/test8000.geno':
+ assert p1==0.8984, "p1=%f" % p1
+ assert p2==0.9623, "p2=%f" % p2
elif cmd == 'kinship':
G = g
print "Original G",G.shape, "\n", G