diff options
author | zsloan | 2021-04-30 18:40:13 +0000 |
---|---|---|
committer | zsloan | 2021-04-30 18:40:13 +0000 |
commit | 21b2e2a552b8b6bedb789263543a4d6d039ac8a9 (patch) | |
tree | fe55511b99a522198c1b840909d7b91c9b45ab22 /wqflask/base/species.py | |
parent | 699b952c7bda5426f3f3e947454f656a4ec7538b (diff) | |
parent | 799b25481fffc97e2adb07004adf502096bf371c (diff) | |
download | genenetwork2-21b2e2a552b8b6bedb789263543a4d6d039ac8a9.tar.gz |
Merge branch 'testing' of github.com:genenetwork/genenetwork2 into testing
Diffstat (limited to 'wqflask/base/species.py')
-rw-r--r-- | wqflask/base/species.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/wqflask/base/species.py b/wqflask/base/species.py index eae3325a..e3c29916 100644 --- a/wqflask/base/species.py +++ b/wqflask/base/species.py @@ -4,7 +4,8 @@ from flask import Flask, g from utility.logger import getLogger -logger = getLogger(__name__ ) +logger = getLogger(__name__) + class TheSpecies: def __init__(self, dataset=None, species_name=None): @@ -15,6 +16,7 @@ class TheSpecies: self.dataset = dataset self.chromosomes = Chromosomes(dataset=self.dataset) + class IndChromosome: def __init__(self, name, length): self.name = name @@ -25,6 +27,7 @@ class IndChromosome: """Chromosome length in megabases""" return self.length / 1000000 + class Chromosomes: def __init__(self, dataset=None, species=None): self.chromosomes = collections.OrderedDict() @@ -52,4 +55,5 @@ class Chromosomes: results = g.db.execute(query).fetchall() for item in results: - self.chromosomes[item.OrderId] = IndChromosome(item.Name, item.Length) + self.chromosomes[item.OrderId] = IndChromosome( + item.Name, item.Length) |