Learn R Programming

bsseq (version 1.8.2)

read.umtab: Parsing UM tab files (legacy output) containing output from the BSmooth aligner.

Description

Parsing UM tab files containing output from the bisulfite aligner Merman. This is two different legacy formats, which we keep around. These functions are likely to be deprecated in the future.

Usage

read.umtab(dirs, sampleNames = NULL, rmZeroCov = FALSE, pattern = NULL, keepU = c("U10", "U20", "U30", "U40"), keepM = c("M10", "M20", "M30", "M40"), verbose = TRUE)
read.umtab2(dirs, sampleNames = NULL, rmZeroCov = FALSE, readCycle = FALSE, keepFilt = FALSE, pattern = NULL, keepU, keepM, verbose = TRUE)

Arguments

dirs
Input directories. Usually each sample is in a different directory.
pattern
An optional pattern, see list.files in the base package.
sampleNames
sample names, based on the order of dirs.
rmZeroCov
Should methylation loci that have zero coverage in all samples be removed. This will result in a much smaller object if the data originates from (targeted) capture bisulfite sequencing.
keepU
A vector of U columns which are kept.
keepM
A vector of M columns which are kept.
readCycle
Should the cycle columns be returned?
keepFilt
Should the filter columns be returned?
verbose
Make the function verbose.

Value

Both functions returns lists, the components are
BSdata
An object of class BSseq containing the methylation evidence.
GC
A vector of local GC content values.
Map
A vector of local mapability values.
Mcy
A matrix of the number of unique M cycles.
Ucy
A matrix of the number of unique U cycles.
chr
A vector of chromosome names.
pos
A vector of genomic positions.
M
A matrix representing methylation evidence.
U
A matrix representing un-methylation evidence.
csums
Description of 'comp2'

Details

read.umtab2 is newer than read.umtab and both process output from older versions of the BSmooth alignment suite (versions older than 0.6.1). These functions are likely to be deprecated in the future. Newer output from the BSmooth alignment suite can be parsed using read.bsmooth.

A script using this function can be found in the bsseqData package, in the file ‘scripts/create_BS.cancer.R’.

See Also

read.bsmooth.

Examples

Run this code
## Not run: 
# require(bsseqData)
# umDir <- system.file("umtab", package = "bsseqData")
# sampleNames <- list.files(umDir)
# dirs <- file.path(umDir, sampleNames, "umtab")
# umData <- read.umtab(dirs, sampleNames)
# ## End(Not run)

Run the code above in your browser using DataLab