read.bsmooth: Parsing output from the BSmooth alignment suite

Description Usage Arguments Value Note Author(s) See Also

View source: R/read.bsmooth.R

Description

Parsing output from the BSmooth alignment suite.

Usage

1
2
3
read.bsmooth(dirs, sampleNames = NULL, seqnames = NULL,
  returnRaw = FALSE, qualityCutoff = 20, rmZeroCov = FALSE,
  verbose = TRUE)

Arguments

dirs

Input directories. Usually each sample is in a different directory, or perhaps each (sample, lane) is a different directory.

sampleNames

sample names, based on the order of dirs. If NULL either set to basename(dirs) (if unique) or dirs.

seqnames

The default is to read all BSmooth output files in dirs. Using this argument, it is possible to restrict this to only files with names in seqnames (apart from .cpg.tsv and optionally .gz).

returnRaw

Should the function return the complete information in the output files?

qualityCutoff

Only use evidence (methylated and unmethylated evidence) for a given methylation loci, if the base in the read has a quality greater than this cutoff.

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.

verbose

Make the function verbose.

Value

Either an object of class BSseq (if returnRaw = FALSE) or a list of GRanges which each component coming from a directory.

Note

Input files can either be gzipped or not. Gzipping the input files results in much greater speed of reading (and saves space), so it is recommended.

We are working on making this function faster and less memory hungry.

Author(s)

Kasper Daniel Hansen khansen@jhsph.edu

See Also

read.umtab for parsing legacy (old) formats from the BSmooth alignment suite. collapseBSseq for collapse (merging or summing) the data in two different directories.


bsseq documentation built on Nov. 8, 2020, 7:53 p.m.