readBiscuit: Read biscuit output into bsseq object

Description Usage Arguments Details Value Functions See Also Examples

View source: R/readBiscuit.R

Description

Takes BED-like format with 2 or 3 columns per sample. Unmerged CpG files have 2 columns (beta values and coverage), whereas merged CpG files have 3 columns (beta values, coverage, and context).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
readBiscuit(
  BEDfile,
  VCFfile,
  merged,
  sampleNames = NULL,
  simplify = FALSE,
  genome = "hg19",
  how = c("data.table", "readr"),
  hdf5 = FALSE,
  hdf5dir = NULL,
  sparse = FALSE,
  chunkSize = 1e+06,
  chr = NULL,
  which = NULL,
  verbose = FALSE
)

loadBiscuit(
  BEDfile,
  VCFfile,
  merged,
  sampleNames = NULL,
  simplify = FALSE,
  genome = "hg19",
  how = c("data.table", "readr"),
  hdf5 = FALSE,
  hdf5dir = NULL,
  sparse = FALSE,
  chunkSize = 1e+06,
  chr = NULL,
  which = NULL,
  verbose = FALSE
)

Arguments

BEDfile

A BED-like file - must be compressed and tabix'ed

VCFfile

A VCF file - must be compressed and tabix'ed. Only the header information is needed.

merged

Is this merged CpG data?

sampleNames

Names of samples - NULL: create names, vector: assign names, data.frame: make pData (DEFAULT: NULL)

simplify

Simplify sample names by dropping .foo.bar.hg19? (or similar) (DEFAULT: FALSE)

genome

Genome assembly the runs were aligned against (DEFAULT: "hg19")

how

How to load data - either data.table or readr (DEFAULT: "data.table")

hdf5

Make the object HDF5-backed - CURRENTLY NOT AVAILABLE (DEFAULT: FALSE)

hdf5dir

Directory to store HDF5 files if 'hdf5' = TRUE (DEFAULT: NULL)

sparse

Use sparse Matrix objects for the data? (DEFAULT: FALSE)

chunkSize

Number of rows before readr reading becomes chunked (DEFAULT: 1e6)

chr

Load a specific chromosome? (DEFAULT: NULL)

which

A GRanges of regions to load - NULL loads them all (DEFAULT: NULL)

verbose

Print extra statements? (DEFAULT: FALSE)

Details

NOTE: Assumes alignment against hg19 (use genome argument to override). NOTE: Requires header from VCF file to detect sample names

Value

1
        A bsseq::BSseq object

Functions

See Also

bsseq

checkBiscuitBED

Examples

1
2
3
4
5
6
  orig_bed <- system.file("extdata", "MCF7_Cunha_chr11p15.bed.gz",
                          package="biscuiteer")
  orig_vcf <- system.file("extdata", "MCF7_Cunha_header_only.vcf.gz",
                          package="biscuiteer")
  bisc <- readBiscuit(BEDfile = orig_bed, VCFfile = orig_vcf,
                      merged = FALSE)

biscuiteer documentation built on Nov. 8, 2020, 8:28 p.m.