Welcome to the biogridr package!

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:

To 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()

Advanced queries with dplyr

library(dplyr)
example2 <- 
  src_biogridr() %>%
  filter() %>%
  select() %>%
  group_by() %>%
  summarise()


EricEdwardBryant/biogridr documentation built on May 6, 2019, 4:02 p.m.