##Query genes in Recon 2 database
data("Recon2")
database <- Recon2
m1 <- buildSBMLFromGenes("8884.1", database)
m2 <- buildSBMLFromGenes(c("8884.1", "6509.1"), database)
##different databases
data(H.pylori_ilT341)
database <- H.pylori_ilT341
m3 <- buildSBMLFromGenes("HP0069", database)
data(M.barkeri_iAF692)
database <- M.barkeri_iAF692
m4 <- buildSBMLFromGenes(c("MBd0456", "MBd4814", "MBd4098"), database)
data(S.aureus_iSB619)
database <- S.aureus_iSB619
m5 <- buildSBMLFromGenes(c("SA0594", "SA1599", "SA0950", "SA0259"), database)
database <- Recon2
query <- c("218.1", "223.1")
m6 <- buildSBMLFromGenes(query, database)
m7 <- buildSBMLFromGenes(query, database, logical.fun="all")
##m6 has more reactions than m7
## because m7 has only reactions which match both genes in the query
length(m6@reactions) > length(m7@reactions)
##Custom logical function: Get model with all reactions
## which are not associated with the query gene
m8 <- buildSBMLFromGenes(query, database, logical.fun=function(x)!any(x))
Run the code above in your browser using DataLab