diff options
author | zsloan | 2021-06-15 18:00:54 +0000 |
---|---|---|
committer | zsloan | 2021-06-15 18:00:54 +0000 |
commit | d31f3f763471b19559ca74e73b52b3cb5e7153ce (patch) | |
tree | f9e8e9a2745cd62f7df8e6f0e7a189147e46d155 /wqflask | |
parent | a4ccb745e1d0a877eb0c22b24c64287cfc902c77 (diff) | |
download | genenetwork2-d31f3f763471b19559ca74e73b52b3cb5e7153ce.tar.gz |
Commented out rpy2 code and import from show_corr_results.py
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/correlation/show_corr_results.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 10e0d626..2f3df67a 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -22,7 +22,7 @@ import collections import json import scipy import numpy -import rpy2.robjects as ro # R Objects +# import rpy2.robjects as ro # R Objects import utility.logger import utility.webqtlUtil @@ -459,10 +459,10 @@ class CorrelationResults: if num_overlap > 5: # ZS: 2015 could add biweight correlation, see http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3465711/ - if self.corr_method == 'bicor': - sample_r, sample_p = do_bicor( - self.this_trait_vals, target_vals) - elif self.corr_method == 'pearson': + # if self.corr_method == 'bicor': + # sample_r, sample_p = do_bicor( + # self.this_trait_vals, target_vals) + if self.corr_method == 'pearson': sample_r, sample_p = scipy.stats.pearsonr( self.this_trait_vals, target_vals) else: @@ -487,22 +487,22 @@ class CorrelationResults: self.sample_data[str(sample)] = float(value) -def do_bicor(this_trait_vals, target_trait_vals): - r_library = ro.r["library"] # Map the library function - r_options = ro.r["options"] # Map the options function +# def do_bicor(this_trait_vals, target_trait_vals): +# r_library = ro.r["library"] # Map the library function +# r_options = ro.r["options"] # Map the options function - r_library("WGCNA") - r_bicor = ro.r["bicorAndPvalue"] # Map the bicorAndPvalue function +# r_library("WGCNA") +# r_bicor = ro.r["bicorAndPvalue"] # Map the bicorAndPvalue function - r_options(stringsAsFactors=False) +# r_options(stringsAsFactors=False) - this_vals = ro.Vector(this_trait_vals) - target_vals = ro.Vector(target_trait_vals) +# this_vals = ro.Vector(this_trait_vals) +# target_vals = ro.Vector(target_trait_vals) - the_r, the_p, _fisher_transform, _the_t, _n_obs = [ - numpy.asarray(x) for x in r_bicor(x=this_vals, y=target_vals)] +# the_r, the_p, _fisher_transform, _the_t, _n_obs = [ +# numpy.asarray(x) for x in r_bicor(x=this_vals, y=target_vals)] - return the_r, the_p +# return the_r, the_p def generate_corr_json(corr_results, this_trait, dataset, target_dataset, for_api=False): |