aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
authorzsloan2022-04-14 19:45:59 +0000
committerzsloan2022-04-14 19:45:59 +0000
commit7bb9067585616f2759add72c668d666c9ac73aa8 (patch)
tree666e523d4c00e10faf26fd87df0d08587825b79e /wqflask/base
parent242590edb6fa45767a8bdd53c4c24aa5dbd1137c (diff)
downloadgenenetwork2-7bb9067585616f2759add72c668d666c9ac73aa8.tar.gz
Add group code to loading pages when applicable
This adds the group code to phenotype traits on loading pages, and also sets the group code as an attribute of the dataset.group class.
Diffstat (limited to 'wqflask/base')
-rw-r--r--wqflask/base/data_set.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index d7e4e62f..a7811a30 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -333,11 +333,11 @@ class DatasetGroup:
def __init__(self, dataset, name=None):
"""This sets self.group and self.group_id"""
if name == None:
- self.name, self.id, self.genetic_type = fetchone(
+ self.name, self.id, self.genetic_type, self.code = fetchone(
dataset.query_for_group)
else:
- self.name, self.id, self.genetic_type = fetchone(
- "SELECT InbredSet.Name, InbredSet.Id, InbredSet.GeneticType FROM InbredSet where Name='%s'" % name)
+ self.name, self.id, self.genetic_type, self.code = fetchone(
+ "SELECT InbredSet.Name, InbredSet.Id, InbredSet.GeneticType, InbredSet.InbredSetCode FROM InbredSet where Name='%s'" % name)
if self.name == 'BXD300':
self.name = "BXD"
@@ -866,7 +866,7 @@ class PhenotypeDataSet(DataSet):
self.query_for_group = '''
SELECT
- InbredSet.Name, InbredSet.Id, InbredSet.GeneticType
+ InbredSet.Name, InbredSet.Id, InbredSet.GeneticType, InbredSet.InbredSetCode
FROM
InbredSet, PublishFreeze
WHERE
@@ -982,7 +982,7 @@ class GenotypeDataSet(DataSet):
self.query_for_group = '''
SELECT
- InbredSet.Name, InbredSet.Id, InbredSet.GeneticType
+ InbredSet.Name, InbredSet.Id, InbredSet.GeneticType, InbredSet.InbredSetCode
FROM
InbredSet, GenoFreeze
WHERE
@@ -1082,7 +1082,7 @@ class MrnaAssayDataSet(DataSet):
self.query_for_group = '''
SELECT
- InbredSet.Name, InbredSet.Id, InbredSet.GeneticType
+ InbredSet.Name, InbredSet.Id, InbredSet.GeneticType, InbredSet.InbredSetCode
FROM
InbredSet, ProbeSetFreeze, ProbeFreeze
WHERE