diff options
author | BonfaceKilz | 2021-05-04 23:46:00 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-05-05 12:26:04 +0300 |
commit | 7c6a60d62389fa945f5a7264cde31cf00ddf9fc4 (patch) | |
tree | 7e7e95f1034afbbe048eb5f8d80f08f236865c3f | |
parent | 151cbec41a9466f8f716f24ae85c7a5b09919e01 (diff) | |
download | genenetwork2-7c6a60d62389fa945f5a7264cde31cf00ddf9fc4.tar.gz |
base: species: Rewrite IndChromosome using a dataclass
-rw-r--r-- | wqflask/base/species.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/wqflask/base/species.py b/wqflask/base/species.py index ce646538..628bcc56 100644 --- a/wqflask/base/species.py +++ b/wqflask/base/species.py @@ -20,14 +20,15 @@ class TheSpecies: self.chromosomes = Chromosomes(dataset=self.dataset) +@dataclass class IndChromosome: - def __init__(self, name, length): - self.name = name - self.length = length + """Data related to IndChromosome""" + name: str + length: int @property def mb_length(self): - """Chromosome length in megabases""" + """Chromosome length in mega-bases""" return self.length / 1000000 |