From 31dc2a62727d14e0eab154a1e2400fd7cf587b42 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 15 Mar 2015 14:25:07 +0300 Subject: A little cleanup --- wqflask/wqflask/my_pylmm/pyLMM/lmm.py | 5 ++--- wqflask/wqflask/my_pylmm/pyLMM/runlmm.py | 4 +++- 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) -- cgit v1.2.3