Learn R Programming

SnapATAC (version 1.0.0)

addBmatToSnap: Add cell-by-bin matrix

Description

This function takes a snap object as input and add the cell-by-bin matrix to the existing snap object.

Usage

addBmatToSnap(obj, bin.size, do.par, num.cores)

Arguments

obj

A snap object to add cell-by-bin matrix.

bin.size

Cell-by-bin matrix with bin size of bin.size will be added to snap object.

do.par

A logical variable indicates whether use multiple processors [FALSE].

num.cores

Number of processors to use [1].

Value

Return a snap object

Examples

Run this code
# NOT RUN {
file.name = system.file("extdata", "demo.snap", package = "SnapATAC");
demo.sp = createSnap(file.name, sample="demo", do.par=FALSE);
showBinSizes(file.name);
demo.sp = addBmatToSnap(demo.sp, bin.size=100000, do.par=FALSE);

# }

Run the code above in your browser using DataLab