Created
January 16, 2019 19:38
-
-
Save abloom/2bc6935ff422f5f8a95582a459dad73c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Gene | |
def init(line = ""): | |
for pair in line.split(";"): | |
splits = pair.split(" ") | |
if len(splits) == 2: | |
key = pair.split(" ")[0] | |
value = pair.split(" ")[1] # TODO add some code to remove the quotes from the result | |
self.data[key] = data | |
def get(field): | |
return self.data[field] | |
# Load the file and create genes | |
genes = [] | |
with open('path/to/gene-file') as fp: | |
for count, line in enumerate(fp): | |
genes.append(Gene(line)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment