From a37bc6e233d49fecd81f7ec3d3f5527c77de12c4 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 7 Mar 2019 11:46:55 -0600 Subject: Fixed issue where correlation results containing NaN results sorted incorrectly Set default permutations for R/qtl to 200 --- wqflask/wqflask/correlation/show_corr_results.py | 7 +++++-- wqflask/wqflask/templates/show_trait_mapping_tools.html | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 0b2875cc..c15c3579 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -33,6 +33,7 @@ import resource import json import scipy +import numpy from pprint import pformat as pf @@ -175,7 +176,6 @@ class CorrelationResults(object): self.correlation_data = collections.OrderedDict(sorted(self.correlation_data.items(), key=lambda t: -abs(t[1][0]))) - if self.target_dataset.type == "ProbeSet" or self.target_dataset.type == "Geno": #ZS: Convert min/max chromosome to an int for the location range option range_chr_as_int = None @@ -456,7 +456,10 @@ class CorrelationResults(object): sample_r, sample_p = scipy.stats.spearmanr(self.this_trait_vals, target_vals) if num_overlap > 5: - self.correlation_data[trait] = [sample_r, sample_p, num_overlap] + if numpy.isnan(sample_r): + pass + else: + self.correlation_data[trait] = [sample_r, sample_p, num_overlap] def process_samples(self, start_vars, sample_names, excluded_samples=None): if not excluded_samples: diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html index c7fd2612..b5ed1c8f 100644 --- a/wqflask/wqflask/templates/show_trait_mapping_tools.html +++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html @@ -242,7 +242,7 @@
- +
-- cgit v1.2.3