Package: brendapyrser
A python parser for the BRENDA databaseThis project provides python classes and functions to parse the text file containing the entire BRENDA enzyme database (https://www.brenda-enzymes.org)Due to BRENDA's license, BRENDA's database cannot be downloaded directly by the parser, instead, the user is asked to download the database as a text file after accepting usage conditionshere.This is an ongoing project!Installationpip install brendapyrserorGit clone project to local directory.In terminal navigate to directory and enter:python setup.py installimportnumpyasnpfrommatplotlibimportpyplotaspltfrombrendapyrserimportBRENDAdataFile='data/brenda_download.txt'1. Parsing BRENDA# Let's load the databasebrenda=BRENDA(dataFile)brendaNumber of Enzymes7609BRENDA copyrightCopyrighted by Dietmar Schomburg, Techn. University
Braunschweig, GERMANY. Distributed under the License as stated
at http:/www.brenda-enzymes.orgParser version0.0.1AuthorSemidán Robaina Estévez, 2020# Plot all Km values in the databaseBRENDA_KMs=np.array([vforrinbrenda.reactionsforvinr.KMvalues.get_values()])values=BRENDA_KMs[(BRENDA_KMs<1000)&(BRENDA_KMs>=0)]plt.hist(values)plt.title(f'Median KM value:{np.median(values)}')plt.xlabel('KM (mM)')plt.show()print(f'Minimum and maximum values in database:{values.min()}mM,{values.max()}mM')Minimum and maximum values in database: 0.0 mM, 997.0 mM# Plot all Km values in the databaseBRENDA_Kcats=np.array([vforrinbrenda.reactionsforvinr.Kcatvalues.get_values()])values=BRENDA_Kcats[(BRENDA_Kcats<1000)&(BRENDA_Kcats>=0)]plt.hist(values)plt.title(f'Median Kcat value:{np.median(values)}')plt.xlabel('Kcat (1/s)')plt.show()print(f'Minimum and maximum values in database:{values.min()}1/s,{values.max()}1/s')Minimum and maximum values in database: 5.83e-10 1/s, 997.0 1/s# Plot all enzyme optimal temperature values in the databaseBRENDA_TO=np.array([vforrinbrenda.reactionsforvinr.temperature.filter_by_condition('optimum').get_values()])values=BRENDA_TO[(BRENDA_TO>=0)]plt.hist(values)plt.title(f'Median Optimum Temperature:{np.median(values)}')plt.xlabel('TO (${}^oC$)')plt.show()print(f'Minimum and maximum values in database:{values.min()}°C,{values.max()}°C')Minimum and maximum values in database: 0.0 °C, 125.0 °CWe see that the median optimal temperature for all enzymes in the BRENDA database is 37 °C! That's interesting... perhaps all organisms have agreed to prefer that temperature over other ones... or, more likely, it could be that BRENDA database is biased towards mammals and microorganisms that live within mammals... such as human pathogens.Let's filter results for a particular species, let's try with a hyperthermophylic baterial genus,Thermotoga# Plot all enzyme optimal temperature values in the databasespecies='Thermotoga'BRENDA_TO=np.array([vforrinbrenda.reactions.filter_by_organism(species)forvinr.temperature.filter_by_condition('optimum').filter_by_organism(species).get_values()])values=BRENDA_TO[(BRENDA_TO>=0)]plt.hist(values)plt.title(f'Median Optimum Temperature:{np.median(values)}')plt.xlabel('TO (${}^oC$)')plt.show()print(f'Minimum and maximum values in database:{values.min()}°C,{values.max()}°C')Minimum and maximum values in database: 20.0 °C, 105.0 °CWe can see that the median optimal temperature among all enzymes in the genus, 80°C, is much higher than in the case of the entire database. That's consistent with the fact thatThermotogaare hyperthermophylic... alright!2. Extracting data forPyruvate kinase# We can retrieve an enzyme entry by its EC number like thisr=brenda.reactions.get_by_id('2.7.1.40')rEnzyme identifier2.7.1.40NamePyruvate kinaseSystematic nameATP:pyruvate 2-O-phosphotransferaseReaction typePhospho group transferReactionATP + pyruvate <=> ADP + phosphoenolpyruvate# Here are all the KM values for phosphoenolpyruvate associated with this enzyme classcompound='phosphoenolpyruvate'kms=r.KMvalues.filter_by_compound(compound).get_values()plt.hist(kms)plt.xlabel('KM (mM)')plt.title(f'{r.name}({compound})')plt.show()# Here are all the KM values for phosphoenolpyruvate associated with this enzyme classcompound='phosphoenolpyruvate'KMs=r.KMvalues.filter_by_compound(compound).get_values()plt.hist(KMs)plt.xlabel('KM (mM)')plt.title(f'{r.name}({compound})')plt.show()# And further filtered by organismr.KMvalues.filter_by_organism('Bos taurus').filter_by_compound('phosphoenolpyruvate').get_values()[0.051500000000000004, 0.18]# Here are all the Kcat values for phosphoenolpyruvate associated with this enzyme classcompound='phosphoenolpyruvate'kcats=r.Kcatvalues.filter_by_compound(compound).get_values()plt.hist(kcats)plt.xlabel('Kcat ($s^{-1}$)')plt.title(f'{r.name}({compound})')plt.show()3 Finding all KM values for a given substrate and organismNext, we will retrieve KM values associated to a particular substrate for all enzymes in a given species. Will t he KM values distribute around a narrow or wider concentration range? Since substrate concentration in cytoplasma is the same for all enzymes it makes sense that all cytoplasmi enzymes utilizing that substrate have similar KM values. Let's test this idea withEscherichia coliand some common substrates participating in the central carbon metabolism.species,compound='Escherichia coli','NADH'KMs=np.array([vforrinbrenda.reactions.filter_by_organism(species)forvinr.KMvalues.filter_by_compound(compound).filter_by_organism(species).get_values()])iflen(KMs)>0:plt.hist(KMs)plt.xlabel('KM (mM)')plt.title(f'{species}KMs ({compound}), median ={np.median((KMs))}')plt.show()else:print('No KM values for compound')That's interesting! typical NADH concentrations are low inEscherichia coli, e.g., fromBioNumberswe get a value of 0.083 mM. The median KM value for NADH among all enzymes binding it is lower as we see in the plot above! Hence, it looks like most enzymes are (nearly) saturated for NADH and thus fluxes are sort of independent of NADH concentration.4 Filtering reactions by specific compoundWe can also filter reactions in BRENDA by a specific compound: substrate, product or either of the two. Let's filter reactions containggeraniolas a substrate, product or both to exemplify this featuresubstrate_rxns=brenda.reactions.filter_by_substrate("phosphoenolpyruvate")substrate_rxns[2]Enzyme identifier2.5.1.19Name3-phosphoshikimate 1-carboxyvinyltransferaseSystematic namephosphoenolpyruvate:3-phosphoshikimate 5-O-(1-carboxyvinyl)-transferaseReaction typeEnolpyruvate group transfer (#3,52,55# induced-fit mechanism, formationReactionphosphoenolpyruvate + 3-phosphoshikimate <=> phosphate +5-O-compound_rxns=brenda.reactions.filter_by_compound("phosphoenolpyruvate")compound_rxns[7]Enzyme identifier2.5.1.7NameUdp-n-acetylglucosamine 1-carboxyvinyltransferaseSystematic namephosphoenolpyruvate:UDP-N-acetyl-D-glucosamineReaction typeCarboxyvinyl group transferReactionphosphoenolpyruvate + UDP-N-acetyl-alpha-D-glucosamine <=> phosphate +UDP-N-acetyl-3-O-