aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/base/data_set.py4
-rw-r--r--wqflask/utility/authentication_tools.py2
-rw-r--r--wqflask/utility/svg.py2
-rw-r--r--wqflask/wqflask/ctl/ctl_analysis.py2
-rw-r--r--wqflask/wqflask/show_trait/SampleList.py2
-rw-r--r--wqflask/wqflask/show_trait/show_trait.py2
-rw-r--r--wqflask/wqflask/user_login.py2
7 files changed, 8 insertions, 8 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index b0119b58..06e1c551 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -254,7 +254,7 @@ class Markers(object):
logger.debug("length of self.markers:", len(self.markers))
logger.debug("length of p_values:", len(p_values))
- if type(p_values) is list:
+ if isinstance(p_values, list):
# THIS IS only needed for the case when we are limiting the number of p-values calculated
# if len(self.markers) > len(p_values):
# self.markers = self.markers[:len(p_values)]
@@ -270,7 +270,7 @@ class Markers(object):
marker['lod_score'] = -math.log10(marker['p_value'])
# Using -log(p) for the LRS; need to ask Rob how he wants to get LRS from p-values
marker['lrs_value'] = -math.log10(marker['p_value']) * 4.61
- elif type(p_values) is dict:
+ elif isinstance(p_values, dict):
filtered_markers = []
for marker in self.markers:
#logger.debug("marker[name]", marker['name'])
diff --git a/wqflask/utility/authentication_tools.py b/wqflask/utility/authentication_tools.py
index ece7022c..bc03eb55 100644
--- a/wqflask/utility/authentication_tools.py
+++ b/wqflask/utility/authentication_tools.py
@@ -17,7 +17,7 @@ logger = logging.getLogger(__name__ )
def check_resource_availability(dataset, trait_id=None):
#At least for now assume temporary entered traits are accessible
- if type(dataset) == str:
+ if isinstance(dataset, str):
return webqtlConfig.DEFAULT_PRIVILEGES
if dataset.type == "Temp":
return webqtlConfig.DEFAULT_PRIVILEGES
diff --git a/wqflask/utility/svg.py b/wqflask/utility/svg.py
index 872f22fe..874ada9d 100644
--- a/wqflask/utility/svg.py
+++ b/wqflask/utility/svg.py
@@ -332,7 +332,7 @@ class SVGelement:
f.write('\n'+'\t'*(level+2)+line)
f.write('\n'+'\t'*(level+1)+']]>\n')
if self.text:
- if type(self.text) == type(''): # If the text is only text
+ if isinstance(self.text, type('')): # If the text is only text
f.write(_escape(str(self.text)))
else: # If the text is a spannedtext class
f.write(str(self.text))
diff --git a/wqflask/wqflask/ctl/ctl_analysis.py b/wqflask/wqflask/ctl/ctl_analysis.py
index f0be7a98..e58a7b87 100644
--- a/wqflask/wqflask/ctl/ctl_analysis.py
+++ b/wqflask/wqflask/ctl/ctl_analysis.py
@@ -175,7 +175,7 @@ class CTL(object):
sys.stdout.flush()
# Create the interactive graph for cytoscape visualization (Nodes and Edges)
- if not type(significant) == ri.RNULLType:
+ if not isinstance(significant, ri.RNULLType):
for x in range(len(significant[0])):
logger.debug(significant[0][x], significant[1][x], significant[2][x]) # Debug to console
tsS = significant[0][x].split(':') # Source
diff --git a/wqflask/wqflask/show_trait/SampleList.py b/wqflask/wqflask/show_trait/SampleList.py
index ad78ebcc..21ba7f63 100644
--- a/wqflask/wqflask/show_trait/SampleList.py
+++ b/wqflask/wqflask/show_trait/SampleList.py
@@ -43,7 +43,7 @@ class SampleList(object):
for counter, sample_name in enumerate(sample_names, 1):
sample_name = sample_name.replace("_2nd_", "")
- if type(self.this_trait) is list: #ZS: self.this_trait will be a list if it is a Temp trait
+ if isinstance(self.this_trait, list): #ZS: self.this_trait will be a list if it is a Temp trait
if counter <= len(self.this_trait) and str(self.this_trait[counter-1]).upper() != 'X':
sample = webqtlCaseData.webqtlCaseData(name=sample_name, value=float(self.this_trait[counter-1]))
else:
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py
index c156e61b..65899ab2 100644
--- a/wqflask/wqflask/show_trait/show_trait.py
+++ b/wqflask/wqflask/show_trait/show_trait.py
@@ -625,7 +625,7 @@ def get_categorical_variables(this_trait, sample_list):
def get_genotype_scales(genofiles):
geno_scales = {}
- if type(genofiles) is list:
+ if isinstance(genofiles, list):
for the_file in genofiles:
file_location = the_file['location']
geno_scales[file_location] = get_scales_from_genofile(file_location)
diff --git a/wqflask/wqflask/user_login.py b/wqflask/wqflask/user_login.py
index cfee0079..04672b45 100644
--- a/wqflask/wqflask/user_login.py
+++ b/wqflask/wqflask/user_login.py
@@ -193,7 +193,7 @@ def login():
if user_details:
submitted_password = params['password']
pwfields = user_details['password']
- if type(pwfields) is str:
+ if isinstance(pwfields, str):
pwfields = json.loads(pwfields)
encrypted_pass_fields = encode_password(pwfields, submitted_password)
password_match = pbkdf2.safe_str_cmp(encrypted_pass_fields['password'], pwfields['password'])