Skip to content
Permalink
ad7c3cc84b
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
16 lines (12 sloc) 432 Bytes
import csv
class Parser:
def __init__(self):
self.families = {}
def read(self, filename):
with open(filename) as csvfile:
reader = csv.DictReader(csvfile, delimiter=';')
for row in reader:
family = row['gf_id']
genes = row['genes']
if family not in self.families.keys():
self.families[family] = genes.split(',')