#reads in a csv file with plasmid and other information,
#then searches through the sequence IDs and displays all the information

def make_dictionaries():
	import csv
	cr = csv.reader(open("compiled_info_plasmid.txt", "rb"))

	#make dictionaries to store csv file (keys are all ids)
	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]

#a function that will search and return the plasmid information based on id
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)