aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/data_set.py
diff options
context:
space:
mode:
authorzsloan2016-12-15 15:13:02 -0600
committerGitHub2016-12-15 15:13:02 -0600
commit7ea8ee22074c297925335cc048777f0ce8cb3912 (patch)
treec499ba97a0dcffe4383a0b7a6adc4efa6919ac34 /wqflask/base/data_set.py
parent45c7ffe78337e0ef051ee96a751d4ee8cf809acb (diff)
parentb88eb7fcbd24462efb34fd3e30bfb64483223935 (diff)
downloadgenenetwork2-7ea8ee22074c297925335cc048777f0ce8cb3912.tar.gz
Merge pull request #234 from zsloan/master
Various changes
Diffstat (limited to 'wqflask/base/data_set.py')
-rw-r--r--wqflask/base/data_set.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index ae7fdcb5..e1d7e2f9 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -271,7 +271,8 @@ class DatasetGroup(object):
self.f1list = None
self.parlist = None
self.get_f1_parent_strains()
- #logger.debug("parents/f1s: {}:{}".format(self.parlist, self.f1list))
+
+ self.accession_id = self.get_accession_id()
self.species = webqtlDatabaseFunction.retrieve_species(self.name)
@@ -280,6 +281,20 @@ class DatasetGroup(object):
self._datasets = None
self.genofile = None
+ def get_accession_id(self):
+ results = g.db.execute("""select InfoFiles.GN_AccesionId from InfoFiles, PublishFreeze, InbredSet where
+ InbredSet.Name = %s and
+ PublishFreeze.InbredSetId = InbredSet.Id and
+ InfoFiles.InfoPageName = PublishFreeze.Name and
+ PublishFreeze.public > 0 and
+ PublishFreeze.confidentiality < 1 order by
+ PublishFreeze.CreateTime desc""", (self.name)).fetchone()
+
+ if results != None:
+ return str(results[0])
+ else:
+ return "None"
+
def get_specified_markers(self, markers = []):
self.markers = HumanMarkers(self.name, markers)