diff options
author | Pjotr Prins | 2015-03-14 14:17:42 +0300 |
---|---|---|
committer | Pjotr Prins | 2015-03-14 14:17:42 +0300 |
commit | 3c8c9103606736abf3e891cb000dc01e8d0c8a43 (patch) | |
tree | a83d930d79ef8db89e1b512b41ed99425b4848c1 /wqflask | |
parent | 60476f068766371c41eb17c2ad20f4f6ce7da2d5 (diff) | |
download | genenetwork2-3c8c9103606736abf3e891cb000dc01e8d0c8a43.tar.gz |
Adding tests
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/my_pylmm/pyLMM/runlmm.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py index 8c0b73eb..21d9240b 100644 --- a/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py +++ b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py @@ -143,13 +143,24 @@ elif cmd == 'kinship': K = kinship_full(G,options) print "Genotype",G.shape, "\n", G print "first Kinship method",K.shape,"\n",K - K2 = calculate_kinship(np.copy(G.T),temp_data=None,is_testing=options.testing) + K2 = calculate_kinship(np.copy(G.T),temp_data=None) print "Genotype",G.shape, "\n", G print "GN2 Kinship method",K2.shape,"\n",K2 print "Genotype",G.shape, "\n", G K3 = kinship(np.copy(G),options) print "third Kinship method",K3.shape,"\n",K3 - assert(K[0][0]==1.28) + sys.stderr.write(options.geno+"\n") + k1 = round(K[0][0],4) + k2 = round(K2[0][0],4) + k3 = round(K3[0][0],4) + if options.geno == 'data/small.geno': + assert k1==0.7939, "k1=%f" % k1 + assert k2==0.7939, "k1=%f" % k1 + assert k3==0.7939, "k1=%f" % k1 + if options.geno == 'data/small_na.geno': + assert k1==0.7172, "k1=%f" % k1 + assert k2==0.7172, "k1=%f" % k1 + assert k3==0.7172, "k1=%f" % k1 else: print "Doing nothing" |