aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPjotr Prins2015-03-13 09:57:49 +0300
committerPjotr Prins2015-03-13 09:57:49 +0300
commit7ec5303a6eca758236103e191f574bb5480a0ba6 (patch)
treed0a0074250a3179a0d1291352b7a41af6c93e430
parentfa4227614042312a54a5d404af4235efc077ab3a (diff)
downloadgenenetwork2-7ec5303a6eca758236103e191f574bb5480a0ba6.tar.gz
& runlmm.py: added assertions for default run
-rw-r--r--wqflask/wqflask/my_pylmm/pyLMM/chunks.py2
-rw-r--r--wqflask/wqflask/my_pylmm/pyLMM/runlmm.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/wqflask/wqflask/my_pylmm/pyLMM/chunks.py b/wqflask/wqflask/my_pylmm/pyLMM/chunks.py
index abeffee7..9565fb96 100644
--- a/wqflask/wqflask/my_pylmm/pyLMM/chunks.py
+++ b/wqflask/wqflask/my_pylmm/pyLMM/chunks.py
@@ -93,4 +93,4 @@ if __name__ == '__main__':
_main()
print("\nConfirming doctests...")
import doctest
- doctest.testmod() \ No newline at end of file
+ doctest.testmod()
diff --git a/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py
index d22e2912..94533ecb 100644
--- a/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py
+++ b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py
@@ -125,10 +125,14 @@ if y != None:
if k != None: k = k[keep,:][:,keep]
if cmd == 'redis':
+ # Emulating the redis setup of GN2
print G
ps, ts = gn2_load_redis('testrun','other',np.array(k),y,G,options.testing)
print np.array(ps)
- assert(options.testing and ps[0]==0.726205761108)
+ 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)
elif cmd == 'kinship':
gn = []
for snp in G.T: