diff options
author | BonfaceKilz | 2021-09-27 13:59:17 +0300 |
---|---|---|
committer | GitHub | 2021-09-27 13:59:17 +0300 |
commit | 0cbb6ecde0315b7d6f021cb17406f5e5197e8a05 (patch) | |
tree | 0647dddf8b1aa4530476807bfa3a5dfd54a8119f /gn3/computations/parsers.py | |
parent | 2cf220a11936125f059dc9b6a494d0f70eac068d (diff) | |
parent | a9fc9814760d205674904f8feb700eadae480fb1 (diff) | |
download | genenetwork3-0cbb6ecde0315b7d6f021cb17406f5e5197e8a05.tar.gz |
Merge pull request #37 from genenetwork/heatmap_generation
Heatmap generation
Diffstat (limited to 'gn3/computations/parsers.py')
-rw-r--r-- | gn3/computations/parsers.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gn3/computations/parsers.py b/gn3/computations/parsers.py index 94387ff..1af35d6 100644 --- a/gn3/computations/parsers.py +++ b/gn3/computations/parsers.py @@ -14,7 +14,7 @@ def parse_genofile(file_path: str) -> Tuple[List[str], 'h': 0, 'u': None, } - genotypes, strains = [], [] + genotypes, samples = [], [] with open(file_path, "r") as _genofile: for line in _genofile: line = line.strip() @@ -22,8 +22,8 @@ def parse_genofile(file_path: str) -> Tuple[List[str], continue cells = line.split() if line.startswith("Chr"): - strains = cells[4:] - strains = [strain.lower() for strain in strains] + samples = cells[4:] + samples = [sample.lower() for sample in samples] continue values = [__map.get(value.lower(), None) for value in cells[4:]] genotype = { @@ -32,7 +32,7 @@ def parse_genofile(file_path: str) -> Tuple[List[str], "cm": cells[2], "mb": cells[3], "values": values, - "dicvalues": dict(zip(strains, values)), + "dicvalues": dict(zip(samples, values)), } genotypes.append(genotype) - return strains, genotypes + return samples, genotypes |