def make_dictionaries():
import csv
cr = csv.reader(open("compiled_info_plasmid.txt", "rb"))
description = {}
selection = {}
sequence = {}
promoter = {}
gene = {}
fluorophore = {}
for row in cr:
str_id = str(row[0])
description[str_id] = row[1].lower()
selection[str_id] = row[2].lower()
sequence[str_id] = row[3].lower()
promoter[str_id] = row[4].lower()
gene[str_id] = row[5].lower()
fluorophore[str_id] = row[6].lower()
return [description, selection, sequence, promoter, gene, fluorophore]
def match_id(input, description, selection, sequence, promoter, gene, fluorophore):
if input in description.keys():
return [description[input], selection[input], sequence[input], promoter[input], gene[input], fluorophore[input]]
if __name__ == '__main__':
test = match_id("JSO676", description, selection, sequence, promoter, gene, fluorophore)
print type(test)