travis is a suite of tools to process, analyze, and visualize bed and bedGraph data in R. Most of travis's functions can be categorized as either operating on beds or on bedGraphs.
Functions that operate on bed files:
bedBreadth
calculates the total number of bases covered in a bed filebedCat
concatenates multiple bed files into onebedCenters
takes a bed file and outputs a bed file of the midpoints of the intervalsbedDivideMeta
divides bed intervals (and optionally surrounding region) into an equal number of windows per interval, regardless of sizebedDivide
divides equally-sized bed invervals into an equal number of windows per intervalbedEnds
takes a bed file and outputs a bed file of the ends of the intervalsbedHist
plots a histogram of interval sizesbedOverhangs
calculates frequencies of pairwise distances between the ends of intervals in a single bed filebedOverlap
calculates overlap among two sets of bed filesbedParseLengths
parses bed intervals into separate files based on interval sizesbedParseStrands
prases bed intervals into separate files based on strandbedPoissonTest
perform a poisson test of interval counts between two bed files with a given set of windowsbedRecenter
alter the coordinates of a bed filebedRemoveChrom
remove intervals on a specific chromosomebedSample
randomly sample intevals of a bed filebedSizes
load into R sizes of bed intervalsbedSort
sort a bed file by chromosome/coordinatebedStructures
break up a bed12 file into separate componentsbedWords
calculate nucleotide word frequencies for intervals in a bed file
Functions that operate on bedGraph files:
bgAcf
calculates autocorrelations of bedGraph filesbgCorMatrix
generates a matrix of pairwise correlations among a set of bedGraph filesbgHist
plots a histogram of bedGraph scoresbgIqrNorm
normalizes bedGraphs to have a specified interquartile rangebgIqr
calculate interquartile ranges of bedGraph filesbgKsTest
performs a KS test between two bedGraph filesbgLoess
loess smooths a bedGraph filesbgOps
perform various operations on single bedGraph files (e.g. transformations) or multiple bedGraph files (averages, differences, variance, ratios)bgParseScores
parses bedGraph intervals into multiple bedGraphs based on scorebgPlot
plot bedGraph scores of specified intervalsbgPoissonTest
perform a poisson test between two bedGraph filesbgQuantileNorm
normalizes bedGraphs with quantile normalizationbgQuantiles
calculates specified quantiles of bedGraph filesbgRead
reads bedGraph files into RbgScatterGrid
calculate a grid of pairwise density scatter plots using a set of bedGraph filesbgScores
read bedGraph scores into RbgSort
sort bedGraph files by scorebgThreshold
outputs bedGraphs containing intervals exceeding a specified scorebgUnify
make multiple bedGraph files share an identical set of intervalsbgZtest
perform a Z-test between two bedGraph files
There are several functions that use bam or sam files:
bamCount
counts the number of reads in bam filesbamParseLengths
parses paired-end reads into multiple files based on insert sizesamStats
calcaultes and plots summary statistics for alignment data in sam files
Finally, there are three plotting functions that operate directly on R objects:
intervalBox
draws a boxplot of data that is binned based on its score in another dimensionrageHist
plots overlayed histograms of data organized in lists or data framesscatterdens
generates a density plot of points in a scatter plot, useful for generating a scatter plot of many points
travis heavily depends on bedtools. Other programs travis uses include several GNU programs that are typically preinstalled in most Linux distributions, including awk
, sed
, sort
, shuf
, and cut
. For older linux distributions, you may need to install a more recent version of GNU core utilities that supports parallelization in sort
.
In addition, there are R dependencies. Install devtools if not installed already:
install.packages("devtools")
Then install conifur (convenience functions for R), converge (conversion tools for genomic data), gyro (wrappers for genomic tools), and travis:
devtools::install_github("dvera/conifur")
devtools::install_github("dvera/converge")
devtools::install_github("dvera/gyro")
devtools::install_github("dvera/travis")