calBmatCor: Check correlation of cell-by-bin matrix

View source: R/snap-utilities.R

calBmatCorR Documentation

Check correlation of cell-by-bin matrix

Description

This function takes one or two snap object as input and calculate the correlation between cell-by-bin matrix between replicates. If obj2 is NULL, obj1 will be randomly split into two pseudo replicates and the correlaion between these two pseudo-replicates will be calcualted and returned. For obj1, the cell-by-bin matrix cannot be empty. This function helps check whether the current cell-by-bin matrix is sufficient for downstream analysis. If the pearson correlation is less than 0.95 recommend to use a bigger bin.size.

Usage

calBmatCor(obj1, obj2)

Arguments

obj1

A snap object for replicate 1

obj2

A snap object for replicate 2 [NULL].

Value

Return pearson correlation between replicates.

Examples

data(demo.sp);
calBmatCor(demo.sp)


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