## ---- include = FALSE--------------------------------------------------------- library(knitr) knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ----setup-------------------------------------------------------------------- suppressMessages(library(synaptome.db)) suppressMessages(library(dplyr)) library(pander) ## ----gene_info---------------------------------------------------------------- t <- getGeneInfoByEntrez(1742) head(t) t <- getGeneInfoByName("CASK") head(t) t <- getGeneInfoByName(c("CASK", "DLG2")) head(t) ## ----findIDs------------------------------------------------------------------ t <- findGenesByEntrez(c(1742, 1741, 1739, 1740)) head(t) t <- findGenesByName(c("SRC", "SRCIN1", "FYN")) head(t) ## ----disease------------------------------------------------------------------ t <- getGeneDiseaseByName (c("CASK", "DLG2", "DLG1")) head(t) t <- getGeneDiseaseByEntres (c(8573, 1742, 1739)) head(t) ## ----PPI---------------------------------------------------------------------- t <- getPPIbyName( c("CASK", "DLG4", "GRIN2A", "GRIN2B","GRIN1"), type = "limited") head(t) t <- getPPIbyEntrez(c(1739, 1740, 1742, 1741), type='induced') head(t) ## ----compPPI------------------------------------------------------------------ #getting the list of compartment comp <- getCompartments() pander(comp) #getting all genes for postsynaptic compartment gns <- getAllGenes4Compartment(compartmentID = 1) head(gns) #getting full PPI network for postsynaptic compartment ppi <- getPPIbyIDs4Compartment(gns$GeneID,compartmentID =1, type = "induced") head(ppi) ## ----regPPI------------------------------------------------------------------- #getting the full list of brain regions reg <- getBrainRegions() pander(reg) #getting all genes for mouse Striatum gns <- getAllGenes4BrainRegion(brainRegion = "Striatum",taxID = 10090) head(gns) #getting full PPI network for postsynaptic compartment ppi <- getPPIbyIDs4BrainRegion( gns$GeneID, brainRegion = "Striatum", taxID = 10090, type = "limited") head(ppi) ## ----PPI_igraph,fig.width=7,fig.height=7,out.width="70%",fig.align = "center"---- library(igraph) g<-getIGraphFromPPI( getPPIbyIDs(c(48, 129, 975, 4422, 5715, 5835), type='lim')) plot(g,vertex.label=V(g)$RatName,vertex.size=25) ## ----PPI_table---------------------------------------------------------------- tbl<-getTableFromPPI(getPPIbyIDs(c(48, 585, 710), type='limited')) tbl ## ----sessionInfo, echo=FALSE, results='asis', class='text', warning=FALSE----- c<-devtools::session_info() pander::pander(t(data.frame(c(c$platform)))) pander::pander(as.data.frame(c$packages)[,-c(4,5,10,11)])