aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/comparison_bar_chart/comparison_bar_chart.py18
-rw-r--r--wqflask/wqflask/correlation/show_corr_results.py12
-rw-r--r--wqflask/wqflask/correlation_matrix/show_corr_matrix.py11
-rw-r--r--wqflask/wqflask/heatmap/heatmap.py37
-rw-r--r--wqflask/wqflask/network_graph/network_graph.py20
5 files changed, 9 insertions, 89 deletions
diff --git a/wqflask/wqflask/comparison_bar_chart/comparison_bar_chart.py b/wqflask/wqflask/comparison_bar_chart/comparison_bar_chart.py
index 3e5daa50..16832621 100644
--- a/wqflask/wqflask/comparison_bar_chart/comparison_bar_chart.py
+++ b/wqflask/wqflask/comparison_bar_chart/comparison_bar_chart.py
@@ -19,34 +19,16 @@
# This module is used by GeneNetwork project (www.genenetwork.org)
from __future__ import absolute_import, print_function, division
-
-import sys
-# sys.path.append(".") Never do this in a webserver!
-
-import string
-import pickle
-import os
-import time
-import pp
-import math
-import collections
-import resource
-
-
from pprint import pformat as pf
from base.trait import create_trait
from base import data_set
from utility import webqtlUtil, helper_functions, corr_result_helpers
-from db import webqtlDatabaseFunction
import utility.webqtlUtil #this is for parallel computing only.
from wqflask.correlation import correlation_functions
-from utility.benchmark import Bench
from MySQLdb import escape_string as escape
-from pprint import pformat as pf
-
from flask import Flask, g
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py
index 233a3a03..5ced30b6 100644
--- a/wqflask/wqflask/correlation/show_corr_results.py
+++ b/wqflask/wqflask/correlation/show_corr_results.py
@@ -29,24 +29,16 @@ import rpy2.robjects as ro # R Objects
from rpy2.robjects.packages import importr
utils = importr("utils")
-from pprint import pformat as pf
-
-from base import webqtlConfig
-from utility.THCell import THCell
-from utility.TDCell import TDCell
-from base.trait import create_trait
from base import data_set
from utility import webqtlUtil, helper_functions, corr_result_helpers, hmac
from db import webqtlDatabaseFunction
-import utility.webqtlUtil #this is for parallel computing only.
+import utility.webqtlUtil #this is for parallel computing only.
from wqflask.correlation import correlation_functions
from utility.benchmark import Bench
import utility.webqtlUtil
-from utility.type_checking import is_float, is_int, is_str, get_float, get_int, get_string
-
+from utility.type_checking import is_str, get_float, get_int, get_string
from MySQLdb import escape_string as escape
-from pprint import pformat as pf
from flask import Flask, g
diff --git a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
index ea786289..bd5aca1f 100644
--- a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
+++ b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
@@ -20,19 +20,8 @@
from __future__ import absolute_import, print_function, division
-import sys
-# sys.path.append(".") Never do this in a webserver!
-
-import string
-import pickle
-import os
import datetime
-import time
-import pp
import math
-import collections
-import resource
-
import numpy as np
import scipy
diff --git a/wqflask/wqflask/heatmap/heatmap.py b/wqflask/wqflask/heatmap/heatmap.py
index 4fdc1f13..1f1cdb90 100644
--- a/wqflask/wqflask/heatmap/heatmap.py
+++ b/wqflask/wqflask/heatmap/heatmap.py
@@ -1,46 +1,19 @@
from __future__ import absolute_import, print_function, division
-import sys
-# sys.path.append(".") Never in a running webserver
-
import string
-import pickle
import os
-import datetime
-import time
-import pp
-import math
import random
-import collections
-import resource
-
-import scipy
-import numpy as np
-
-from pprint import pformat as pf
-
-from base.trait import GeneralTrait
-from base import data_set
from base import species
from base import webqtlConfig
from utility import helper_functions
-from utility import Plot, Bunch
-from utility import temp_data
-from utility.tools import flat_files, REAPER_COMMAND, TEMPDIR
-
-from MySQLdb import escape_string as escape
-
-import pickle as pickle
-import simplejson as json
-
-from pprint import pformat as pf
+from utility.tools import flat_files, REAPER_COMMAND, TEMPDIR
from redis import Redis
-Redis = Redis()
-
from flask import Flask, g
-
from utility.logger import getLogger
+
+Redis = Redis()
+
logger = getLogger(__name__ )
class Heatmap(object):
@@ -205,4 +178,4 @@ def parse_reaper_output(gwa_filename):
marker['additive'] = float(line.split("\t")[6])
marker_obs.append(marker)
- return marker_obs \ No newline at end of file
+ return marker_obs
diff --git a/wqflask/wqflask/network_graph/network_graph.py b/wqflask/wqflask/network_graph/network_graph.py
index 7916651f..2a4c4a93 100644
--- a/wqflask/wqflask/network_graph/network_graph.py
+++ b/wqflask/wqflask/network_graph/network_graph.py
@@ -20,27 +20,11 @@
from __future__ import absolute_import, print_function, division
-import sys
-
-import string
-import pickle
-import os
-import time
-import pp
-import math
-import collections
-import resource
-
import scipy
-
import simplejson as json
-
-from rpy2.robjects.packages import importr
-import rpy2.robjects as robjects
-
from pprint import pformat as pf
-from utility.THCell import THCell
+
from utility.TDCell import TDCell
from base.trait import create_trait
from base import data_set
@@ -218,4 +202,4 @@ class NetworkGraph(object):
trait_ob = create_trait(dataset=dataset_ob,
name=trait_name,
cellid=None)
- self.trait_list.append((trait_ob, dataset_ob)) \ No newline at end of file
+ self.trait_list.append((trait_ob, dataset_ob))