Package ‘RbioRXN’ May 19, 2015 Type Package Title Process Rhea, KEGG, MetaCyc, Unipathway Biochemical Reaction Data Version 1.5.1 Date 2015-05-19 Author Byoungnam Min, Byeonghyeok Park, Kyoung Heon Kim and In-Geol Choi Maintainer Byoungnam Min <mbnmbn00@gmail.com> Description To facilitate retrieving and processing biochemical reaction data such as Rhea, MetaCyc, KEGG and Unipathway, the package provides the functions to download and parse data, instantiate generic reaction and check mass-balance. The package aims to construct an integrated metabolic network and genome-scale metabolic model. License GPL (>= 2) Depends R (>= 3.0.3), fmcsR, ChemmineR Imports plyr, RCurl, gdata, KEGGREST, data.table, stringr NeedsCompilation no Repository CRAN Date/Publication 2015-05-19 13:07:25 R topics documented: RbioRXN-package . . . build.subtable . . . . . . check.mass.balance . . . example . . . . . . . . . get.chebi.all . . . . . . . get.kegg.all . . . . . . . get.kegg.byId . . . . . . get.metacyc.all . . . . . get.metacyc.reaction.byId get.rhea.all . . . . . . . . get.rhea.byCompound . . get.rhea.byId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 3 4 5 6 8 9 10 11 13 14 2 build.subtable get.unipathway.all . . . . instantiate.metacyc . . . instantiate.rhea . . . . . is.generic.metacyc . . . . is.generic.rhea . . . . . . parse.metacyc.compound parse.metacyc.reaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index RbioRXN-package 15 17 18 19 21 22 24 27 RbioRXN - Process Rhea, KEGG, MetaCyc, Unipathway Biochemical Reaction Data Description To facilitate gaining and processing biochemical reaction such as Rhea, MetaCyc, KEGG and UniPathway, the package provides the functions to download and parse raw data, instantiate generic reaction, and check mass balance. The package aims to construct an integrated metabolic network and genome-scale metabolic model. Details Package: Type: Version: Date: License: RbioRXN Package 1.5.1 2015-05-19 GPL (>=2) Author(s) Byoungnam Min, Byeonghyeok Park, Kyoung Heon Kim and In-Geol Choi Maintainer: Byoungnam Min <mbnmbn00@gmail.com> References http://compbio.korea.ac.kr build.subtable Build sub-table for the entries with multiple values check.mass.balance 3 Description When you download biochemical reaction data with functions such as get.kegg.all(), get.metacyc.all(), get.rhea.all(), etc, some entries have multiple values such as "synonyms". This function allows to build sub-table that separates multiple values in different rows. Usage build.subtable(table, column1, column2, separator = "///") Arguments table data.frame object where multiple entries exist column1 It is usually first column name for unique ID column2 The column name where the column contains multiple values (e.g., synonyms) separator Separator symbol (default is "///") Value data.frame() object Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi Examples data(example) # load example data chebi = example$chebi # sample ChEBI chebi.sub = build.subtable(table = chebi, column1 = "chebi", column2 = "synonyms", separator="///") head(chebi.sub) check.mass.balance Check given biochemical reaction is mass-balanced Description Using molecular formula of reaction participants, check given reaction equation is mass-balanced. Note that some reaction participants don’t have molecular formula (e.g., polymer or generic compound), so these reactions cannot be checked. Usage check.mass.balance(equation, chemical_table, id_col="chebi", formula_col="formula", direction_type=c(" <=> ", " => ", " <\\?> ")) 4 example Arguments equation Reaction equation usually from get.rhea.all() or get.metacyc.all() function. chemical_table Chemial table (data.frame) containing molecular formula id_col In chemical table, choose the column name which contains chemical ID (usually first column) formula_col In chemical table, choose the column name which contains molecular formula direction_type In reaction equation, provide reaction direction symbols. Default value is c(" <=> ", " => ", " <\\?> ") Value Character values (not logical) TRUE FALSE Not available Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi Examples data(example) chebi = example$chebi # sample ChEBI ## Check mass balance for example reactions Rm = example$rhea_massbal # sample Rhea data check.mass.balance(Rm, chebi, "chebi", "formula", c(" <\\?> ", " <=> ", " => ")) example Description Example data for Rbiorxn Usage data(example) Rbiorxn example data get.chebi.all get.chebi.all 5 Download and parse current ChEBI Description Download all ChEBI in BioPAX level 2 (ftp://ftp.ebi.ac.uk/pub/databases/chebi/ontology/chebi.owl) and parse to generate data.frame() object Usage get.chebi.all() Value data.frame() object where data fields include ChEBI Unique ChEBI identifier name Chemical standard name synonyms If entity has multiple synonyms, they are separated by "///" smiles SMILES representation of chemical structure inchi InChI representation of chemical structure kegg Cross-link to KEGG COMPOUND database parent Parent compound if available formula Chemical formula Author(s) Byoungnam Min, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi <mbnmbn00@gmail.com> References ChEBI web address: http://www.ebi.ac.uk/chebi/ \ BioPAX.org: http://www.biopax.org Examples # Not run: it will take several minutes (5-7 mins) ## ## chebi = get.chebi.all() head(chebi) 6 get.kegg.all get.kegg.all Download current KEGG REACTION and KEGG COMPOUND database using KEGGREST package Description By implementing KEGGREST package in Bioconductor (http://www.bioconductor.org/packages/release/bioc/html/KEGGRE gather all KEGG REACTION and KEGG COMPOUND datain data.frame() object. Usage get.kegg.all() Value R list object. The list contains two data.frame() objects (reaction and comopund) where data fields include, ENTRY KEGG ID (R number) NAME Enzyme name DEFINITION Reaction equation with standard compound name EQUATION Reaction equation with KEGG ID ENZYME E.C number COMMENT Comment RPAIR KEGG RPAIR is a collection of substrate-product pairs (reactant pairs) defined for each reaction in KEGG REACTION PATHWAY KEGG PATHWAY that this reaction participates ORTHOLOGY Cross-link to KEGG ORTHOLOGY database REMARK Usually this column indicates glycan reaction-chemical reaction pair REFERENCE Publication info with PMID, title, and journal name KEGG COMPOUND, ENTRY KEGG ID (C number) NAME Compound name FORMULA Molecular formula EXACT_MASS Molecular mass MOL_WEIGHT Molecular weight REMARK REACTION KEGG REACTION entries where the compound particiaptes PATHWAY KEGG PATHWAY entries where the compound participates get.kegg.all ENZYME 7 KEGG ENZYME entries where the compound is related ATOM BOND CAS Cross-link to CAS database PubChem Cross-link to PubChem database ChEBI Cross-link to ChEBI database PDB.CCD Cross-link to Chemical Component Dictionary X3DMET NIKKAJI BRITE KNApSAcK COMMENT BRACKET LIPIDMAPS LipidBank SEQUENCE REFERENCE Note Because ’KEGGREST’ package has not been deposited in CRAN, you need to manually install this package by typing: > source("http://bioconductor.org/biocLite.R") > biocLite("KEGGREST") For details, http://www.bioconductor.org/packages/release/bioc/html/KEGGREST.html Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi References KEGGREST package: http://www.bioconductor.org/packages/release/bioc/html/KEGGREST.html KEGG API: http://www.kegg.jp/kegg/docs/keggapi.html See Also get.kegg.byId 8 get.kegg.byId Examples # Not run: (it will take 30-40 minutes) ## ## ## keggAll = get.kegg.all() head(keggAll$reaction) head(keggAll$comound) get.kegg.byId Download given KEGG REACTION entry using KEGGREST package Description By implementing KEGGREST package in Bioconductor (http://www.bioconductor.org/packages/release/bioc/html/KEGGRE retrieve given KEGG REACTION in data.frame() object. Usage get.kegg.byId(keggId) Arguments keggId single KEGG REACTION ID (R number) or multiple IDs in vector Value data.frame() object where data fields include, ENTRY KEGG ID NAME Enzyme name DEFINITION Reaction equation with standard compound name EQUATION Reaction equation with KEGG ID ENZYME E.C number COMMENT Comment RPAIR KEGG RPAIR is a collection of substrate-product pairs (reactant pairs) defined for each reaction in KEGG REACTION PATHWAY KEGG PATHWAY that this reaction participates ORTHOLOGY Cross-link to KEGG ORTHOLOGY database REMARK Usually this column indicates glycan reaction-chemical reaction pair REFERENCE Publication with PMID, title, and journal name get.metacyc.all 9 Note Because "KEGGREST" package has not been deposited in CRAN, you need to manually install this package by typing: > source("http://bioconductor.org/biocLite.R") > biocLite("KEGGREST") For details, http://www.bioconductor.org/packages/release/bioc/html/KEGGREST.html Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi References KEGGREST package: http://www.bioconductor.org/packages/release/bioc/html/KEGGREST.html KEGG API: http://www.kegg.jp/kegg/docs/keggapi.html See Also get.kegg.all Examples # Not run: ## ## get.kegg.byId("R00001") # single KEGG ID get.kegg.byId(c("R00001", "R00002", "R00005", "R00006")) # mutiple KEGG IDs get.metacyc.all Download current MetaCyc via BioCyc Web Services Description This function first retrieves all MetaCyc reaction IDs and download BioPAX level 3 for each reaction, then parse to generate data.frame() object. Note that because this function interacts with BioCyc web service for every reaction, it will take many hours depending on your network speed. Thus, we strongly recommend to use parse.metacyc.reaction() and parse.metacyc.compound() functions in this package after manually downloading MetaCyc from http://biocyc.org/download.shtml NOTE: The MetaCyc server is occasionally unavailable, so this function accesses our own server as additional resource after trying original server. Our server may not contain latest data. Usage get.metacyc.all() 10 get.metacyc.reaction.byId Value R data.frame() object where data fields indclude MetaCyc MetaCyc ID name Reaction equation with chemical standard name ec_number E.C number name_id Reaction equation with MetaCyc compound ID Note We strongly recommend using parse.metacyc.reaction() and parse.metacyc.reaction() functions because of long running process. These two functions need "dat" files downloaded from MetaCyc. See http://biocyc.org/download.shtml Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi References MetaCyc download page: http://biocyc.org/download.shtml MetaCyc web services: http://biocyc.org/web-services.shtml See Also parse.metacyc.reaction parse.metacyc.compound Examples # Not run: ## ## metacycAll = get.metacyc.all() head(metacycAll) get.metacyc.reaction.byId Download given MetaCyc reaction via BioCyc web services Description This function downloads and parses given MetaCyc reaction in BioPAX level 3 via MetaCyc web services (http://biocyc.org/web-services.shtml), and generate data.frame() object NOTE: The MetaCyc server is occasionally unavailable, so this function accesses our own server as additional resource after trying original server. Our server may not contain latest data. get.rhea.all 11 Usage get.metacyc.reaction.byId(metacycId) Arguments metacycId MetaCyc ID: single or multiple entries in vector Value data.frame() object where data fields include MetaCyc MetaCyc ID name Reaction equation with chemical standard name ec_number E.C. number name_id Reaction equation with MetaCyc compound ID Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi References MetaCyc download page: http://biocyc.org/download.shtml MetaCyc web services: http://biocyc.org/web-services.shtml Examples # Not run: ## ## ## ## ## ## get.metacyc.reaction.byId("RXN-13970") get.metacyc.reaction.byId("SERINE--PYRUVATE-AMINOTRANSFERASE-RXN") get.metacyc.reaction.byId("RXN-13759") get.metacyc.reaction.byId("RXN-14352") get.metacyc.reaction.byId("TRANS-RXN-220") get.metacyc.reaction.byId("RXN-12549") get.rhea.all Download current Rhea in data.frame() object Description Download current Rhea in BioPAX level 2 and parse to generate data.frame() object Usage get.rhea.all() 12 get.rhea.all Value data.frame() object where data fields include rheaId Rhea ID reactionType BiochemicalReaction or transportReaction equationWithCommonName Textual reaction equation (compound standard names) sameParticipant Reactions with the same reactants and products, but different directionalities mapped formuled polymerization chemicallyBalanced status transport direction classOfReactions At least one reaction participant is class compound described in ChEBI equationWithChebi Reaction equation with ChEBI equationParticipant crossLinks If reaction has cross-link to other databases, new columns are generated such as "MetaCyc", "KEGG" etc Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi References Rhea database: http://www.ebi.ac.uk/rhea/home.xhtml Examples # Not run: it takes about 20 minutes ## ## ## rhea = get.rhea.all() dim(rhea) # The number of downloaded reactions head(rhea) get.rhea.byCompound 13 get.rhea.byCompound Download Rhea reaction by compound Description Download and parse Rhea database with given keyword Usage get.rhea.byCompound(rheaCompound) Arguments rheaCompound e.g., caffeine Value data.frame() object where data fields include rheaId Rhea ID reactionType BiochemicalReaction or transportReaction equationWithCommonName Textual reaction equation (compound standard names) sameParticipant Reactions with same reactants and products, but different directionalities mapped formuled polymerization chemicallyBalanced status transport direction classOfReactions At least one reaction participant is class compound described in ChEBI equationWithChebi Reaction equation with ChEBI equationParticipant crossLinks if reaction has cross-link to other databases, new columns are generated such as "MetaCyc", "KEGG" etc 14 get.rhea.byId Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi References Rhea database: http://www.ebi.ac.uk/rhea/home.xhtml Examples # Not run: ## get.rhea.byCompound("caffeine") get.rhea.byId Download Rhea by Rhea ID Description Download and parse Rhea with given Rhea ID Usage get.rhea.byId(rheaId) Arguments rheaId Single Rhea ID or multiple Rhea IDs in vector Value data.frame() object where data fields include rheaId Rhea ID reactionType BiochemicalReaction or transportReaction equationWithCommonName Textual reaction equation (compound standard names) sameParticipant Reactions with same reactants and products, but different directionalities mapped formuled polymerization chemicallyBalanced status get.unipathway.all 15 transport direction classOfReactions At least one participant is class compounds described in ChEBI equationWithChebi Reaction equation with ChEBI equationParticipant crossLinks If the reaction has cross-link to other databases, new columns are generated such as "MetaCyc", "KEGG" etc Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi References Rhea database: http://www.ebi.ac.uk/rhea/home.xhtml Examples # Not run: ## get.rhea.byId(c('10000', '10377')) get.unipathway.all Download current Unipathway Description Download Unipathway in OBO, then parse and generate data.frame() object Usage get.unipathway.all(oboPath = "") Arguments oboPath Unipathway in OBO from http://www.grenoble.prabi.fr/obiwarehouse/unipathway. If you don’t provide the file, the function tries to download from web 16 get.unipathway.all Value R list object. The list() contains two data.frame() objects (reaction and compound) where data fields of each data.frame() include, reaction includes id Unipathway ID enzName It usually indicates substrate and product in the reaction equation Reaction equation with compound standard name KEGG Cross-link to KEGG RHEA Cross-link to Rhea METACYC Cross-link to MetaCyc EC EC number each reaction assigned GO GO term UNIPROT Cross-link to UniProt compoundId Compound ID of each reaction participant compoundName Compound standard name of each reaction participant compound includes id Unipathway ID type Compound type name Compound name KEGG Cross-link to KEGG CHEBI Cross-link to ChEBI formula Molecular formula inchi InChI code synonym.kegg Synonyms to KEGG Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi References UniPathway: http://www.grenoble.prabi.fr/obiwarehouse/unipathway Examples # Not run: ## ## unipathway = get.unipathway.all() dim(unipathway) # The number of downloaded reaction entries instantiate.metacyc 17 instantiate.metacyc Instantiate MetaCyc generic reaction Description Generic reaction is a reaction with at least one compound class. This function gains instance reactions from given generic reaction Usage instantiate.metacyc(equation, chemical_table, id_col = "UNIQUE.ID", parent_col = "TYPES", formula_col = "CHEMICAL.FORMULA", smiles_col = "SMILES", inchi_col = "INCHI", direction_type = c(" => ", " <=> ")) Arguments equation MetaCyc generic reaction equation with MetaCyc ID (not compound name) chemical_table Chemical table containing UNIQUE.ID, TYPES, CEHEMICAL.FORMULA, SMILES and InChI columns. This table can be generated by parse.metacyc.compound() function id_col In chemical table, choose the column name which contains chemical ID (usually first column) parent_col In chemical table, choose the column name which contains parent compound ("TYPES" in MetaCyc) formula_col In chemical table, choose the column name which contains molecular formula smiles_col In chemical table, choose the column name which contains SMILES code inchi_col In chemical table, choose the column name which contains InChI code direction_type In reaction equation, provide reaction direction charaters. Default is c(" <=> ", " => ") Value List object containing instance reactions Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi References Bioinformatics (Oxford, England) 2012, 28(3):388-396. Construction and completion of flux balance models from pathway databases O’Boyle NM, Banck M, James CA, Morley C, Vandermeersch T, Hutchison GR. Open Babel: An open chemical toolbox. J Cheminform. 2011 Oct 7;3:33. doi: 10.1186/1758-2946-3-33. PubMed PMID: 21982300; PubMed Central PMCID: PMC3198950. 18 instantiate.rhea See Also parse.metacyc.compound Examples # You need to load 'ChemmineOB' package before running this function. data(example) # Load example rdata Mc = example$metacyc.c Mg = example$metacyc_generic$equation names(Mc) # Check chemical table columns # Instantiate: Not run #instanceM = instantiate.metacyc(Mg, Mc, id_col = "UNIQUE.ID", # parent_col = "TYPES", formula_col = "CHEMICAL.FORMULA", smiles_col # = "SMILES", inchi_col = "INCHI", direction_type = c(" => ", " <=> ")) #print(instanceM) instantiate.rhea Instantiate Rhea generic reaction Description Generic reaction is a reaction with at least one compound class. This function gains instance reactions from given generic reaction Usage instantiate.rhea(equation, chemical_table, id_col='chebi', parent_col='parent', formula_col='formula', smiles_col='smiles', inchi_col='inchi', direction_type=c(' <\\?> ', ' <=> ', ' => ')) Arguments equation Rhea generic reaction equation with ChEBI ID (not compound name) chemical_table Chemical table containing chebi, parent, formula, smiles and inchi columns. This table can be generated by get.chebi.all() function id_col In chemical table, choose the column name which contains chemical id (usually first column) parent_col In chemical table, choose the column name which contains parent compound ("TYPES" in MetaCyc) formula_col In chemical table, choose the column name which contains molecular formula smiles_col In chemical table, choose the column name which contains SMILES code is.generic.metacyc inchi_col 19 In chemical table, choose the column name which contains InChI code direction_type In reaction equation, provide reaction direction charaters. Default is c(’ <\\?> ’, ’ <=> ’, ’ => ’) Value List object containing instance reactions Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi References Rhea: http://www.ebi.ac.uk/rhea ChEBI: http://www.ebi.ac.uk/chebi Open babel: O’Boyle NM, Banck M, James CA, Morley C, Vandermeersch T, Hutchison GR. Open Babel: An open chemical toolbox. J Cheminform. 2011 Oct 7;3:33. doi: 10.1186/1758-2946-3-33. PubMed PMID: 21982300; PubMed Central PMCID: PMC3198950. See Also get.chebi.all Examples # You need to load 'ChemmineOB' package before running this function. data(example) # Load example data chebi = example$chebi # Sample ChEBI Rg = example$rhea_generic$equationWithChebi # Sample Rhea generic reaction ## Instantiate: Not run #instanceR = instantiate.rhea(Rg, chebi, id_col = "chebi", parent_col="parent", # formula_col="formula", smiles_col="smiles", inchi_col="inchi", # direction_type=c(" <\\?> ", " <=> ", " => ")) #print(instanceR) is.generic.metacyc Check given reaction is generic reaction Description Generic reaction is a reaction with at least one compound class as reaction participant (e.g., a primary alcohol + NADP -> an aldehyde + H(+) + NADPH). This function check if given reaction is generic reaction 20 is.generic.metacyc Usage is.generic.metacyc(equation,compound_df,id_col,smiles_col,parent_col,direction_type) Arguments equation Reaction equation usually from get.metacyc.all() function. compound_df Chemial table (data.frame) containing SMILES code of each compound in reaction equation id_col In chemical table, choose the column name which contains chemical id (usually first column) smiles_col In chemical table, choose the column name which contains SMILES code parent_col In chemical table, choose the column name which contains TYPES direction_type In reaction equation, provide reaction direction charaters. Default is c(" <=> ", " => ") Value Logical TRUE/FALSE Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi References MetaCyc: http://metacyc.org Examples data(example) # Load sample data metacyc.c = metacyc.r.1 metacyc.r.2 metacyc.r = example$metacyc.c = example$metacyc_generic$equation = example$metacyc_massbal c(metacyc.r.1, metacyc.r.2) names(metacyc.c) # Print column names # Check generic reaction is.generic.metacyc(metacyc.r,metacyc.c,'UNIQUE.ID','SMILES','TYPES',c(' <=> ', ' => ')) is.generic.rhea 21 is.generic.rhea Check given reaction is generic reaction Description Generic reaction is a reaction with at least one compound class as reaction participant (e.g., a primary alcohol + NADP -> an aldehyde + H(+) + NADPH). This function checks if given reaction is generic reaction Usage is.generic.rhea(equation,chebi_df,id_col,parent_col,formula_col,direction_type) Arguments equation Reaction equation usually generated by get.rhea.all() function. chebi_df Chemial table data.frame() containing molecular formula and parent compound id_col In chemical table, choose the column name which contains chemical id (usually first column) parent_col In chemical table, choose the column name which contains parent compound ("parent" in chebi) formula_col In chemical table, choose the column name which contains molecular formula direction_type In reaction equation, provide reaction direction symbols. Default is c(’ <\\?> ’, ’ <=> ’, ’ => ’) Value Logical TRUE/FALSE Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi References Rhea: http://www.ebi.ac.uk/rhea ChEBI: http://www.ebi.ac.uk/chebi Examples data(example) # Load example chebi = example$chebi rhea_generic = example$rhea_generic$equationWithChebi rhea_massbal = example$rhea_massbal rhea = c(rhea_generic, rhea_massbal) 22 parse.metacyc.compound # Check generic reaction is.generic.rhea(rhea, chebi, id_col='chebi', parent_col='parent', formula_col='formula', direction_type=c(' <=> ', ' <\\?> ', ' => ')) parse.metacyc.compound Parse MetaCyc compound data (compounds.dat in attribute-value format) Description Parse MetaCyc compounds.dat file in attribute-value format. The output includes compound name, synonyms, ChEBI ID, PubChem ID, KEGG ID, CAS ID, types, molecular formula, SMILES code and InChI Usage parse.metacyc.compound(datPath) Arguments datPath Path to compounds.dat file from MetaCyc (BioCyc and EcoCyc also applicable) Value data.frame() object where data fields include UNIQUE.ID TYPES COMMON.NAME CHEMICAL.FORMULA INCHI MOLECULAR.WEIGHT MONOISOTOPIC.MW NON.STANDARD.INCHI SMILES ATOM.CHARGES SYNONYMS CREDITS SUPERATOMS parse.metacyc.compound REGULATES CITATIONS COMMENT.INTERNAL COMMENT SYSTEMATIC.NAME HAS.NO.STRUCTURE. COMPONENT.OF ABBREV.NAME TAUTOMERS PKA1 COFACTORS.OF PKA2 PKA3 N.1.NAME.1 N.NAME N.1.NAME SPECIES IN.MIXTURE INTERNALS.OF.GROUP COMPONENTS GROUP.COORDS.2D STRUCTURE.GROUPS STRUCTURE.LINKS RADICAL.ATOMS CFG.ICON.COLOR GROUP.INTERNALS COFACTORS.OR.PROSTHETIC.GROUPS.OFCHEMSPIDER PUBCHEM CHEBI LIGAND.CPD NCI CAS 23 24 parse.metacyc.reaction X.Wikipedia. UM.BBD.CPD KNAPSACK BRENDA.COMPOUND LIPID_MAPS LIGAND Note BioCyc and EcoCyc also applicable Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi References MetaCyc: http://metacyc.org/ Examples ## parse.metacyc.compound: Not run #url = 'http://bioinformatics.ai.sri.com/ptools/flatfile-samples/compounds.dat' #tmpdest = tempfile(pattern = "compounds") #download.file(url, destfile=tmpdest) #sample.compounds = parse.metacyc.compound(datPath=tmpdest) parse.metacyc.reaction Parse MetaCyc reaction data (reactions.dat in attribute-value format) Description Parse MetaCyc reactions.dat file in attribute-value format. The output includes reaction ID, enzyme, EC number, pathway and equation Usage parse.metacyc.reaction(datPath) Arguments datPath Path to reactions.dat from MetaCyc (BioCyc or EcoCyc data also applicable) parse.metacyc.reaction Value data.frame() object where data fields include UNIQUE.ID TYPES ATOM.MAPPINGS CITATIONS COMMENT CREDITS DBLINKS IN.PATHWAY LEFT PHYSIOLOGICALLY.RELEVANT. REACTION.DIRECTION RIGHT CANNOT.BALANCE. ENZYMATIC.REACTION ORPHAN. SPONTANEOUS. RXN.LOCATIONS EC.NUMBER COMMON.NAME TEMPLATE.FILE SYNONYMS SYSTEMATIC.NAME DELTAG0 COMMENT.INTERNAL ENZYMES.NOT.USED REACTION.LIST MEMBER.SORT.FN STD.REDUCTION.POTENTIAL PREDECESSORS PRIMARIES 25 26 parse.metacyc.reaction SIGNAL equation LIGAND.RXN PLANTCYC METACYC RHEA UNIPROT PIR LIGAND BRENDA superNode Author(s) Byoungnam Min <mbnmbn00@gmail.com>, Byeonghyuk Park, Kyoung Heon Kim and In-Geol Choi Examples url = "http://bioinformatics.ai.sri.com/ptools/flatfile-samples/reactions.dat" tmpdest = tempfile(pattern = "reactions") download.file(url, destfile=tmpdest) direction = "LEFT-TO-RIGHT" # sample data is old, so don't mind this code. sample.reactions = parse.metacyc.reaction(datPath=tmpdest) print(sample.reactions) Index ∗Topic BioPAX level 3 get.metacyc.all, 9 get.metacyc.reaction.byId, 10 ∗Topic BioPAX get.chebi.all, 5 ∗Topic Biochemical reaction database RbioRXN-package, 2 ∗Topic Biochemical reaction mass ∗Topic Metacyc web services get.metacyc.all, 9 get.metacyc.reaction.byId, 10 ∗Topic Rhea get.rhea.all, 11 get.rhea.byCompound, 13 get.rhea.byId, 14 instantiate.rhea, 18 is.generic.rhea, 21 RbioRXN-package, 2 ∗Topic UniPathway get.unipathway.all, 15 RbioRXN-package, 2 balance check.mass.balance, 3 ∗Topic ChEBI get.chebi.all, 5 instantiate.rhea, 18 is.generic.rhea, 21 ∗Topic Generic reaction is.generic.metacyc, 19 is.generic.rhea, 21 RbioRXN-package, 2 ∗Topic Instantiation RbioRXN-package, 2 ∗Topic KEGG API get.kegg.all, 6 get.kegg.byId, 8 ∗Topic KEGG COMPOUND get.kegg.all, 6 ∗Topic KEGG REACTION get.kegg.all, 6 get.kegg.byId, 8 ∗Topic KEGG REST get.kegg.all, 6 get.kegg.byId, 8 ∗Topic KEGG RbioRXN-package, 2 ∗Topic MetaCyc instantiate.metacyc, 17 is.generic.metacyc, 19 parse.metacyc.compound, 22 parse.metacyc.reaction, 24 RbioRXN-package, 2 build.subtable, 2 check.mass.balance, 3 example, 4 example (example), 4 get.chebi.all, 5, 19 get.kegg.all, 6, 9 get.kegg.byId, 7, 8 get.metacyc.all, 9 get.metacyc.reaction.byId, 10 get.rhea.all, 11 get.rhea.byCompound, 13 get.rhea.byId, 14 get.unipathway.all, 15 instantiate.metacyc, 17 instantiate.rhea, 18 is.generic.metacyc, 19 is.generic.rhea, 21 parse.metacyc.compound, 10, 18, 22 parse.metacyc.reaction, 10, 24 RbioRXN (RbioRXN-package), 2 RbioRXN-package, 2 27