diff options
Diffstat (limited to 'wqflask/base/data_set.py')
-rw-r--r-- | wqflask/base/data_set.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index 918932fa..06e02b02 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) |