aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/data_set.py
diff options
context:
space:
mode:
authorLei Yan2013-10-10 17:09:21 -0500
committerLei Yan2013-10-10 17:09:21 -0500
commit8a09358e98dbf88deb101d13107a40bac371de5c (patch)
tree1aeab22ddcf40985a5e7762caf9c128d9b709cc5 /wqflask/base/data_set.py
parent5daef1bd5e6e494b477797993bb72488b24dd8b3 (diff)
downloadgenenetwork2-8a09358e98dbf88deb101d13107a40bac371de5c.tar.gz
Almost have correlation working for non-primary strain/group
There's just some issue with parents/f1s not being included if you select non-BXD (or whatever the group is). All Samples, however does work.
Diffstat (limited to 'wqflask/base/data_set.py')
-rwxr-xr-xwqflask/base/data_set.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 20c9a24f..beb62bd7 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -436,8 +436,13 @@ class DataSet(object):
print("Dataset {} is not yet available in GeneNetwork.".format(self.name))
pass
- def get_trait_data(self):
- self.samplelist = self.group.samplelist + self.group.parlist + self.group.f1list
+ def get_trait_data(self, sample_list=None):
+ if sample_list:
+ self.samplelist = sample_list + self.group.parlist + self.group.f1list
+ else:
+ self.samplelist = self.group.samplelist + self.group.parlist + self.group.f1list
+
+
query = """
SELECT Strain.Name, Strain.Id FROM Strain, Species
WHERE Strain.Name IN {}
@@ -1085,16 +1090,8 @@ class MrnaAssayDataSet(DataSet):
ProbeSetXRef.ProbeSetId=ProbeSet.Id;
""" % (column_name, escape(str(self.id)))
results = g.db.execute(query).fetchall()
- print("in retrieve_genes results {}: {}".format(type(results), results))
return dict(results)
-
- #return {item[0]: item[1] for item in results}
-
- #symbol_dict = {}
- #for item in results:
- # symbol_dict[item[0]] = item[1]
- #return symbol_dict
#def retrieve_gene_symbols(self):
# query = """