read.bedMethyl | R Documentation |
Parsing bedMethyl output from modkit pileup.
read.bedMethyl(files,
loci = NULL,
colData = NULL,
rmZeroCov = TRUE,
strandCollapse = TRUE,
BPPARAM = bpparam(),
BACKEND = NULL,
dir = tempfile("BSseq"),
replace = FALSE,
chunkdim = NULL,
level = NULL,
nThread = 1L,
verbose = getOption("verbose"))
files |
The path to the files created by running modkit pileup, one sample per file. See the methods section of [link to preprint] for validated output. |
loci |
|
colData |
An optional |
rmZeroCov |
A |
strandCollapse |
A |
BPPARAM |
An optional |
BACKEND |
|
dir |
Only applicable if |
replace |
Only applicable if |
chunkdim |
Only applicable if |
level |
The compression level to use for writing the data to disk. |
nThread |
The number of threads used by |
verbose |
A |
The format of each file should be similar to the examples in [link to preprint]. Files ending in .gz
, .bz2
, .xz
, or .zip
will be automatically decompressed to tempdir()
.
Modkit bedMethyl files from modkit pileup. For downstream likelihood functions we recommend running modkit pileup on output from bam files modification/basecalled using a CG context model and not using a reference genome for pileup.
Other types of output.
The genomic co-ordinates of bedMethyl files are zero-based. Since Bioconductor packages typically use one-based co-ordinates, the co-ordinates from the bedMethyl files are converted to one-based in the BSseq object.
Søren Blikdal Hansen (soren.blikdal.hansen@sund.ku.dk)
# Example: Reading bedMethyl files included in the bsseq package
# Paths to example bedMethyl files in the package's extdata directory
infiles <- c(system.file("extdata/HG002_nanopore_test.bedMethyl.gz",
package = "bsseq"),
system.file("extdata/HG002_pacbio_test.bedMethyl.gz",
package = "bsseq"))
# Run the function to import data
bsseq <- read.bedMethyl(files = infiles,
colData = DataFrame(row.names = c("test_nanopore",
"test_pacbio")),
rmZeroCov = FALSE,
strandCollapse = TRUE,
verbose = TRUE)
# View the resulting BSseq object
bsseq
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.