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:
bedBreadthcalculates the total number of bases covered in a bed filebedCatconcatenates multiple bed files into onebedCenterstakes a bed file and outputs a bed file of the midpoints of the intervalsbedDivideMetadivides bed intervals (and optionally surrounding region) into an equal number of windows per interval, regardless of sizebedDividedivides equally-sized bed invervals into an equal number of windows per intervalbedEndstakes a bed file and outputs a bed file of the ends of the intervalsbedHistplots a histogram of interval sizesbedOverhangscalculates frequencies of pairwise distances between the ends of intervals in a single bed filebedOverlapcalculates overlap among two sets of bed filesbedParseLengthsparses bed intervals into separate files based on interval sizesbedParseStrandsprases bed intervals into separate files based on strandbedPoissonTestperform a poisson test of interval counts between two bed files with a given set of windowsbedRecenteralter the coordinates of a bed filebedRemoveChromremove intervals on a specific chromosomebedSamplerandomly sample intevals of a bed filebedSizesload into R sizes of bed intervalsbedSortsort a bed file by chromosome/coordinatebedStructuresbreak up a bed12 file into separate componentsbedWordscalculate nucleotide word frequencies for intervals in a bed file
Functions that operate on bedGraph files:
bgAcfcalculates autocorrelations of bedGraph filesbgCorMatrixgenerates a matrix of pairwise correlations among a set of bedGraph filesbgHistplots a histogram of bedGraph scoresbgIqrNormnormalizes bedGraphs to have a specified interquartile rangebgIqrcalculate interquartile ranges of bedGraph filesbgKsTestperforms a KS test between two bedGraph filesbgLoessloess smooths a bedGraph filesbgOpsperform various operations on single bedGraph files (e.g. transformations) or multiple bedGraph files (averages, differences, variance, ratios)bgParseScoresparses bedGraph intervals into multiple bedGraphs based on scorebgPlotplot bedGraph scores of specified intervalsbgPoissonTestperform a poisson test between two bedGraph filesbgQuantileNormnormalizes bedGraphs with quantile normalizationbgQuantilescalculates specified quantiles of bedGraph filesbgReadreads bedGraph files into RbgScatterGridcalculate a grid of pairwise density scatter plots using a set of bedGraph filesbgScoresread bedGraph scores into RbgSortsort bedGraph files by scorebgThresholdoutputs bedGraphs containing intervals exceeding a specified scorebgUnifymake multiple bedGraph files share an identical set of intervalsbgZtestperform a Z-test between two bedGraph files
There are several functions that use bam or sam files:
bamCountcounts the number of reads in bam filesbamParseLengthsparses paired-end reads into multiple files based on insert sizesamStatscalcaultes and plots summary statistics for alignment data in sam files
Finally, there are three plotting functions that operate directly on R objects:
intervalBoxdraws a boxplot of data that is binned based on its score in another dimensionrageHistplots overlayed histograms of data organized in lists or data framesscatterdensgenerates 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")