% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/snap-utilities.R
\name{calBmatCor}
\alias{calBmatCor}
\title{Check correlation of cell-by-bin matrix}
\usage{
calBmatCor(obj1, obj2)
}
\arguments{
\item{obj1}{A snap object for replicate 1}

\item{obj2}{A snap object for replicate 2 [NULL].}
}
\value{
Return pearson correlation between replicates.
}
\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.
}
\examples{
data(demo.sp);
calBmatCor(demo.sp)

}
