################################################### ### chunk number 1: 0] ## wantedp <- unique(unlist(wantedp)) ## ans <- unlist(mget(wantedp, hgu95av2SYMBOL)) ## }) ## length(ans) ## ans[1:10] ################################################### ### chunk number 42: schema ################################################### #line 721 "vignettes/AnnotationDbi/inst/doc/AnnotationDbi.Rnw" hgu95av2_dbschema() ################################################### ### chunk number 43: schema2 ################################################### #line 731 "vignettes/AnnotationDbi/inst/doc/AnnotationDbi.Rnw" hgu95av2ORGPKG ################################################### ### chunk number 44: schema3 ################################################### #line 737 "vignettes/AnnotationDbi/inst/doc/AnnotationDbi.Rnw" org.Hs.eg_dbschema() ################################################### ### chunk number 45: hgu95av2_org_join ################################################### #line 758 "vignettes/AnnotationDbi/inst/doc/AnnotationDbi.Rnw" orgDBLoc = system.file("extdata", "org.Hs.eg.sqlite", package="org.Hs.eg.db") attachSQL = paste("ATTACH '", orgDBLoc, "' AS orgDB;", sep = "") dbGetQuery(hgu95av2_dbconn(), attachSQL) ################################################### ### chunk number 46: complexDb ################################################### #line 771 "vignettes/AnnotationDbi/inst/doc/AnnotationDbi.Rnw" system.time({ SQL <- "SELECT DISTINCT probe_id,symbol FROM probes, orgDB.gene_info AS gi, orgDB.genes AS g, orgDB.go_bp AS bp WHERE bp._id=g._id AND gi._id=g._id AND probes.gene_id=g.gene_id AND bp.evidence IN ('IPI', 'IDA', 'IMP', 'IGI')" zz <- dbGetQuery(hgu95av2_dbconn(), SQL) }) #its a good idea to always DETACH your database when you are finished... dbGetQuery(hgu95av2_dbconn(), "DETACH orgDB" ) ################################################### ### chunk number 47: Question #6 ################################################### #line 784 "vignettes/AnnotationDbi/inst/doc/AnnotationDbi.Rnw" sql <- "SELECT gene_id, start_location, end_location, cytogenetic_location FROM genes AS g, chromosome_locations AS c, cytogenetic_locations AS cy WHERE g._id=c._id AND g._id=cy._id" dbGetQuery(org.Hs.eg_dbconn(),sql)[1:10,] ################################################### ### chunk number 48: Question #7 ################################################### #line 793 "vignettes/AnnotationDbi/inst/doc/AnnotationDbi.Rnw" orgDBLoc = system.file("extdata", "org.Hs.eg.sqlite", package="org.Hs.eg.db") attachSQL = paste("ATTACH '", orgDBLoc, "' AS orgDB;", sep = "") dbGetQuery(hgu95av2_dbconn(), attachSQL) goDBLoc = system.file("extdata", "GO.sqlite", package="GO.db") attachSQL = paste("ATTACH '", goDBLoc, "' AS goDB;", sep = "") dbGetQuery(hgu95av2_dbconn(), attachSQL) SQL <- "SELECT DISTINCT p.probe_id, gi.symbol, gt.go_id, gt.definition FROM probes AS p, orgDB.gene_info AS gi, orgDB.genes AS g, orgDB.go_bp AS bp, goDB.go_term AS gt WHERE bp._id=g._id AND gi._id=g._id AND p.gene_id=g.gene_id AND bp.evidence IN ('IPI', 'IDA', 'IMP', 'IGI') AND gt.go_id=bp.go_id" zz <- dbGetQuery(hgu95av2_dbconn(), SQL) dbGetQuery(hgu95av2_dbconn(), "DETACH orgDB") dbGetQuery(hgu95av2_dbconn(), "DETACH goDB") ################################################### ### chunk number 49: SessionInfo ################################################### #line 814 "vignettes/AnnotationDbi/inst/doc/AnnotationDbi.Rnw" sessionInfo()