diff options
author | zsloan | 2016-05-17 16:00:36 +0000 |
---|---|---|
committer | zsloan | 2016-05-17 16:00:36 +0000 |
commit | f6cee1731772c3482b0afd4c77472d69e747c655 (patch) | |
tree | 7ce53285e0209b670d3b93bf780bdf06857d2ffa /wqflask | |
parent | fdfd2a492d11e76aa8179d0dc799a8b1d45399bb (diff) | |
download | genenetwork2-f6cee1731772c3482b0afd4c77472d69e747c655.tar.gz |
Correlations are now much faster after I disabled fetching the sample data for each result trait
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/correlation/show_corr_results.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 0795f113..c4cb0145 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -183,7 +183,7 @@ class CorrelationResults(object): #XZ, 01/08/2009: read the first line line = dataset_file.readline() - dataset_strains = webqtlUtil.readLineCSV(line)[1:] + dataset_strains = webqtlUtil.readLineCSV(line)[1:] self.this_trait_vals = [] for item in dataset_strains: @@ -210,7 +210,7 @@ class CorrelationResults(object): range_chr_as_int = order_id for _trait_counter, trait in enumerate(self.correlation_data.keys()[:self.return_number]): - trait_object = GeneralTrait(dataset=self.target_dataset, name=trait, get_qtl_info=True) + trait_object = GeneralTrait(dataset=self.target_dataset, name=trait, get_qtl_info=True, get_sample_info=False) if self.dataset.type == "ProbeSet" or self.dataset.type == "Geno": #ZS: Convert trait chromosome to an int for the location range option @@ -558,7 +558,8 @@ class CorrelationResults(object): else: sample_r, sample_p = scipy.stats.spearmanr(self.this_trait_vals, target_vals) - self.correlation_data[trait] = [sample_r, sample_p, num_overlap] + if num_overlap > 5: + self.correlation_data[trait] = [sample_r, sample_p, num_overlap] """ |