addBmatToSnap: Add cell-by-bin matrix

View source: R/snap-utilities.R

addBmatToSnapR Documentation

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

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);


r3fang/SnapATAC documentation built on March 29, 2022, 4:33 p.m.