From 7ec5303a6eca758236103e191f574bb5480a0ba6 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 13 Mar 2015 09:57:49 +0300 Subject: & runlmm.py: added assertions for default run --- wqflask/wqflask/my_pylmm/pyLMM/chunks.py | 2 +- wqflask/wqflask/my_pylmm/pyLMM/runlmm.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'wqflask') 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: -- cgit v1.2.3