aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorPjotr Prins2015-03-15 14:25:07 +0300
committerPjotr Prins2015-03-15 14:25:07 +0300
commit31dc2a62727d14e0eab154a1e2400fd7cf587b42 (patch)
tree3a99b60f5e5d15cb78f3422713106ff4196b3c39 /wqflask
parentc48d1b4415a455a1f96ddbe8f2f89cf88b2dc283 (diff)
downloadgenenetwork2-31dc2a62727d14e0eab154a1e2400fd7cf587b42.tar.gz
A little cleanup
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/my_pylmm/pyLMM/lmm.py5
-rw-r--r--wqflask/wqflask/my_pylmm/pyLMM/runlmm.py4
2 files changed, 5 insertions, 4 deletions
diff --git a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py
index bfb95045..5aa27106 100644
--- a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py
+++ b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py
@@ -333,8 +333,8 @@ def calculate_kinship_new(genotype_matrix, temp_data=None):
Call the new kinship calculation where genotype_matrix contains
inds (columns) by snps (rows).
"""
- G = np.apply_along_axis( genotype.normalize, axis=1, arr=genotype_matrix.T)
- return kinship(G),G.T
+ G = np.apply_along_axis( genotype.normalize, axis=0, arr=genotype_matrix)
+ return kinship(G.T),G
def calculate_kinship_old(genotype_matrix, temp_data=None):
"""
@@ -749,7 +749,6 @@ def gn2_redis(key,species):
print('pheno', np.array(params['pheno_vector']))
geno = np.array(params['genotype_matrix'])
print('geno', geno.shape, geno)
- # sys.exit(1)
if species == "human" :
ps, ts = run_human(pheno_vector = np.array(params['pheno_vector']),
diff --git a/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py
index 469ba6c9..6bb79856 100644
--- a/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py
+++ b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py
@@ -116,7 +116,9 @@ if cmd == 'redis':
g = None
gnt = None
- ps, ts = gn2_load_redis('testrun','other',k,Y,G.T)
+ gt = G.T
+ G = None
+ ps, ts = gn2_load_redis('testrun','other',k,Y,gt)
print np.array(ps)
# Test results
p1 = round(ps[0],4)