For a given sample name gets integration site and matched random controls(MRCs).
From the R terminal or RStudio console run:
devtools::install_github("BushmanLab/intSiteRetriever")
If source is required, first get source from github(from bash):
git clone https://github.com/BushmanLab/intSiteRetriever.git
and from R terminal:
devtools::document()
devtools::install()
library(intSiteRetriever)
For MySQL database config file should be in home directory and called .my.cnf.
.my.cnf file format is:
[GROUP_NAME]
user=YYYYYYY
password=XXXXXX
host=microbYYYY.med.upenn.edu
port=3309
database=intsites_miseq
We can establish connection in R:
dbConn <- dbConnect(MySQL(), group='GROUP_NAME')
info <- dbGetInfo(dbConn)
dbConn <- src_sql("mysql", dbConn, info = info)
The group should be the same as group in .my.cnf
file.
Note that by default connection will expire in about 5 minutes for MySQL.
#Interface
After connection is established we can get sites:
sample_ref <- data_frame(
sampleName=c("sample1", "sample2"),
refGenome=c("hg18", "hg18")
)
sites <- getUniqueSites(sample_ref, dbConn)
Public functions are:
- setNameExists
- getUniqueSites
- getUniqueSiteCounts
- getUniqueSiteReadCounts
- getUniquePCRbreaks
- getMultihitLengths
- getMRCs
- get_N_MRCs
- get_random_positions
- get_reference_genome
Documentation for functions:
?getUniqueSites
#Dependencies
Dependencies can be loaded with:
library(GenomicRanges)
library(BSgenome)
library(RMySQL)
library(dplyr)
Run in the R console:
library(devtools)
devtools::test()
Database schema is from file integration_site_schema.sql
.
Travis is used for testing on each commit and Codecov used for code coverage metrics.