From aca3001513959116fdbe93eadaa4c2041a49d093 Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Tue, 16 Apr 2013 22:15:47 +0000 Subject: Checking in before making some changes --- wqflask/wqflask/my_pylmm/pyLMM/lmm.py | 41 +++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py index 3344b024..d9189f30 100644 --- a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py +++ b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py @@ -66,26 +66,29 @@ def run_human(pheno_vector, with Bench("snp iterator loop"): count = 0 for snp, this_id in plink_input: - if count > 10000: - break - count += 1 - - percent_complete = (float(count) / total_snps) * 100 - #print("percent_complete: ", percent_complete) - temp_data.store("percent_complete", percent_complete) + with Bench("part before association"): + if count > 10000: + break + count += 1 + + percent_complete = (float(count) / total_snps) * 100 + #print("percent_complete: ", percent_complete) + temp_data.store("percent_complete", percent_complete) + + with Bench("actual association"): + ps, ts = human_association(snp, + n, + keep, + lmm_ob, + pheno_vector, + covariate_matrix, + kinship_matrix, + refit) + + with Bench("after association"): + p_values.append(ps) + t_stats.append(ts) - ps, ts = human_association(snp, - n, - keep, - lmm_ob, - pheno_vector, - covariate_matrix, - kinship_matrix, - refit) - - p_values.append(ps) - t_stats.append(ts) - return p_values, t_stats -- cgit v1.2.3