Skip to content

BushmanLab/intSiteRetriever

 
 

Repository files navigation

Travis-CI Build Status

codecov.io

Get integration sites from Database

For a given sample name gets integration site and matched random controls(MRCs).

Installation

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)

Connection to Database

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)

Testing of the library components

Run in the R console:

library(devtools)
devtools::test()

Schema

Database schema is from file integration_site_schema.sql.

Continuous Integration

Travis is used for testing on each commit and Codecov used for code coverage metrics.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • R 100.0%