% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/normJaccard.R
\name{runNormJaccard}
\alias{runNormJaccard}
\title{Normalize Jaccard Index Matrix}
\usage{
runNormJaccard(obj, tmp.folder, method, row.center, row.scale, low.threshold,
  high.threshold, do.par, ncell.chunk, num.cores, seed.use)
}
\arguments{
\item{obj}{A snap obj}

\item{tmp.folder}{A non-empty character vector giving the directory name to save temp files.}

\item{method}{A character class that indicates the normalization method to be used. This must be one of c("residual", "zscore").}

\item{row.center}{A logical value indicating whether rows of the normalized jaccard inex matrix should be centered by subtracting the layer means (omitting 'NA's).}

\item{row.scale}{A logical value indicating whether rows of the normalized jaccard index matrix should be scaled by dividing the (centered) layers of 'x' by their standard deviations if 'center' is 'TRUE'.}

\item{low.threshold}{A numeric class that indicates the min value for normalized jaccard index [-5].}

\item{high.threshold}{A numeric class that indicates the max value for normalized jaccard index [5].}

\item{do.par}{A logical variable indicates if to run this in parallel using multiple processors [TRUE].}

\item{ncell.chunk}{A numeric class that indicates number of cells to process per CPU node}

\item{num.cores}{A numeric class that indicates the number of cores to use for calculation [1].}

\item{seed.use}{A numeric class that indicates random seeding number [10].}
}
\description{
This function takes a Snap obj as input with jmat slot and normalize 
for read depth effect.
}
\details{
In theory, the entries in the jaccard index calculated by calJaccard() should 
reflects the true similarity between two cells, however, that is not the case. 
We observed that a cell of higher coverage tends to have a higher similarity 
with another cell regardless whether these two cells are similar or not.
These biases, we termed as “coverage bias” also observed in other studies, 
can later result in misleading cell grouping. Therefore, it is cruicial to 
normalize the bias.
}
\examples{
data(demo.sp);
demo.sp = makeBinary(demo.sp);
demo.sp = runJaccard(obj=demo.sp, mat="bmat", do.par=FALSE, tmp.folder=tempdir());
demo.sp = runNormJaccard(obj=demo.sp, do.par=FALSE, tmp.folder=tempdir());

}
