This package contains a SQLite database of BioGRID interactions. This vignette will demonstrate how to access this data.
library(biogridr) # Connect to the local BioGRID database src_biogridr()
The database contains four tables:
interactions
: Interaction data in an edge list structurelog
: contains the BioGRID version number and download dateorganisms
: A mapping of organism names to NCBI identifierssystems
: Experimental systems (interaction classes) and their descriptionsTo access a table you can use the tbl
function. Don't be scared by all those
%>%
s (pronounced 'pipe')! Using x %>% y
is equivalent to f(x, y)
and just
makes the syntax easier to read as a procedure, or 'pipeline', instead of a
bunch of nested function calls, or a bunch of temporary variable assignments.
You can use collect
when you want to get your query returned as a data.frame
(rather than a SQL query).
# Some example genes of interest genes <- c('CTF4', 'TOF1', 'MRC1', 'CSM3', 'RAD17', 'MEC3', 'DDC1') yeast <- organism('cerevisiae')
# Inner network example example1 <- src_biogridr() %>% inner_net(genes, yeast) %>% aggregate example1 example1 %>% plot() example1 %>% plot('physical', bounds = c(-5,5), method = 'complete')
# Outer network example example2 <- src_biogridr() %>% outer_net(genes, yeast) %>% aggregate example2 example2 %>% plot()
dplyr
library(dplyr) example2 <- src_biogridr() %>% filter() %>% select() %>% group_by() %>% summarise()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.