checkBiscuitBED: Inspect Biscuit VCF and BED files

Description Usage Arguments Details Value See Also Examples

View source: R/checkBiscuitBED.R

Description

A BED checker for Biscuit CpG/CpH output (BED-like format with 2 or 3 columns per sample). By default, files with more than 50 million loci will be processed iteratively, since data.table tends to run into problems with gzipped joint CpH files.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
checkBiscuitBED(
  BEDfile,
  VCFfile,
  merged,
  sampleNames = NULL,
  chunkSize = 5e+07,
  hdf5 = FALSE,
  sparse = TRUE,
  how = c("data.table", "readr"),
  chr = NULL
)

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)

chunkSize

For files longer than yieldSize number of lines long, chunk the file (DEFAULT: 5e7)

hdf5

Use HDF5 arrays for backing the data? Using HDF5-backed arrays stores the data in a HDF5 file on disk, rather than loading entire object into memory. This allows for analyses to be done on memory-limited systems at the small cost of slightly reduced return times. (DEFAULT: FALSE)

sparse

Use sparse Matrix objects for the data? If TRUE, use a Matrix object for sparse matrices (matrices with many zeroes in them) (DEFAULT: TRUE)

how

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

chr

Load a specific chromosome to rbind() later? (DEFAULT: NULL)

Details

Input BED and VCF files must be tabix'ed. No exceptions!

Value

1
        Parameters to be supplied to makeBSseq

See Also

readBiscuit

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")
  params <- checkBiscuitBED(BEDfile = orig_bed, VCFfile = orig_vcf,
                            merged = FALSE)

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