Learn R Programming

SnapATAC (version 1.0.0)

calBmatCor: 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

Run this code
# NOT RUN {
data(demo.sp);
calBmatCor(demo.sp)

# }

Run the code above in your browser using DataLab