diff options
author | zsloan | 2021-06-14 23:12:27 +0000 |
---|---|---|
committer | zsloan | 2021-06-14 23:12:27 +0000 |
commit | 9e9e0e4d440383f617542e810a1115833eafd7bf (patch) | |
tree | ee5540bb26f30307af6c4f07b7ac55b30f5656a0 /wqflask | |
parent | c67a189fc32fb69a82539221e1ca05c2eb58f587 (diff) | |
download | genenetwork2-9e9e0e4d440383f617542e810a1115833eafd7bf.tar.gz |
Temporarily return None for tissue correlation and remove rpy2 imports
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/correlation/correlation_functions.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/wqflask/wqflask/correlation/correlation_functions.py b/wqflask/wqflask/correlation/correlation_functions.py index 2d25fbd8..c8b9da0e 100644 --- a/wqflask/wqflask/correlation/correlation_functions.py +++ b/wqflask/wqflask/correlation/correlation_functions.py @@ -25,7 +25,6 @@ # Last updated by NL 2011/03/23 import math -import rpy2.robjects import string from base.mrna_assay_tissue_data import MrnaAssayTissueData @@ -48,27 +47,28 @@ from flask import Flask, g def cal_zero_order_corr_for_tiss(primaryValue=[], targetValue=[], method='pearson'): - R_primary = rpy2.robjects.FloatVector(list(range(len(primaryValue)))) N = len(primaryValue) - for i in range(len(primaryValue)): - R_primary[i] = primaryValue[i] + # R_primary = rpy2.robjects.FloatVector(list(range(len(primaryValue)))) + # for i in range(len(primaryValue)): + # R_primary[i] = primaryValue[i] - R_target = rpy2.robjects.FloatVector(list(range(len(targetValue)))) - for i in range(len(targetValue)): - R_target[i] = targetValue[i] + # R_target = rpy2.robjects.FloatVector(list(range(len(targetValue)))) + # for i in range(len(targetValue)): + # R_target[i] = targetValue[i] - R_corr_test = rpy2.robjects.r['cor.test'] - if method == 'spearman': - R_result = R_corr_test(R_primary, R_target, method='spearman') - else: - R_result = R_corr_test(R_primary, R_target) + # R_corr_test = rpy2.robjects.r['cor.test'] + # if method == 'spearman': + # R_result = R_corr_test(R_primary, R_target, method='spearman') + # else: + # R_result = R_corr_test(R_primary, R_target) - corr_result = [] - corr_result.append(R_result[3][0]) - corr_result.append(N) - corr_result.append(R_result[2][0]) + # corr_result = [] + # corr_result.append(R_result[3][0]) + # corr_result.append(N) + # corr_result.append(R_result[2][0]) - return corr_result + return [None, N, None] + # return corr_result ######################################################################################################## |