diff options
author | zsloan | 2020-09-16 13:54:11 -0500 |
---|---|---|
committer | zsloan | 2020-09-16 13:54:11 -0500 |
commit | 07959c86e235072eaa46974ada5ea9c0432f49e7 (patch) | |
tree | 7d622dc7499f04324910d5f7b2b1d3c287b89c6c /wqflask | |
parent | a224594125a88b75dcebc125e5e4b2394acedebb (diff) | |
download | genenetwork2-07959c86e235072eaa46974ada5ea9c0432f49e7.tar.gz |
Applied PEP8 and removed commented out code
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/show_trait/SampleList.py | 67 |
1 files changed, 10 insertions, 57 deletions
diff --git a/wqflask/wqflask/show_trait/SampleList.py b/wqflask/wqflask/show_trait/SampleList.py index ad78ebcc..10157558 100644 --- a/wqflask/wqflask/show_trait/SampleList.py +++ b/wqflask/wqflask/show_trait/SampleList.py @@ -1,21 +1,20 @@ from __future__ import absolute_import, print_function, division -from flask import Flask, g - -from base import webqtlCaseData -from utility import webqtlUtil, Plot, Bunch -from base.trait import GeneralTrait +import itertools import numpy as np -from scipy import stats +from flask import Flask, g from pprint import pformat as pf +from scipy import stats -import simplejson as json - -import itertools +from base import webqtlCaseData +from base.trait import GeneralTrait +from utility import logger +from utility import webqtlUtil +from utility import Plot +from utility import Bunch -import utility.logger -logger = utility.logger.getLogger(__name__ ) +logger = logger.getLogger(__name__ ) class SampleList(object): def __init__(self, @@ -35,8 +34,6 @@ class SampleList(object): self.get_attributes() - #self.sample_qnorm = get_transform_vals(self.dataset, this_trait) - if self.this_trait and self.dataset: self.get_extra_attribute_values() @@ -70,8 +67,6 @@ class SampleList(object): self.sample_list.append(sample) - #logger.debug("attribute vals are", pf(self.sample_attribute_values)) - self.do_outliers() def __repr__(self): @@ -156,48 +151,6 @@ class SampleList(object): return any(sample.variance for sample in self.sample_list) -# def get_transform_vals(dataset, trait): -# es = get_elasticsearch_connection(for_user=False) - -# logger.info("DATASET NAME:", dataset.name) - -# query = '{"bool": {"must": [{"match": {"name": "%s"}}, {"match": {"dataset": "%s"}}]}}' % (trait.name, dataset.name) - -# es_body = { -# "query": { -# "bool": { -# "must": [ -# { -# "match": { -# "name": "%s" % (trait.name) -# } -# }, -# { -# "match": { -# "dataset": "%s" % (dataset.name) -# } -# } -# ] -# } -# } -# } - -# response = es.search( index = "traits", doc_type = "trait", body = es_body ) -# logger.info("THE RESPONSE:", response) -# results = response['hits']['hits'] - -# if len(results) > 0: -# samples = results[0]['_source']['samples'] - -# sample_dict = {} -# for sample in samples: -# sample_dict[sample['name']] = sample['qnorm'] - -# #logger.info("SAMPLE DICT:", sample_dict) -# return sample_dict -# else: -# return None - def natural_sort_key(x): """Get expected results when using as a key for sort - ints or strings are sorted properly""" |