aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/species.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/base/species.py')
-rw-r--r--wqflask/base/species.py8
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)