about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/show_trait/SampleList.py67
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"""