APJaccardSimKRange | R Documentation |
A function which finds the clustering solutions for cells in a Seurat object based on transformed Jaccard similarity matrices with different numbers of nearest neighbors. Can also return nmis for these solutions and the similarity matrices from which they were calculated
APJaccardSimKRange( data.dist, transformation = "default", APq = 0, kmin = 5, kmax = 50, kstep = 5, target.clust.vect = NULL, save.simmats = FALSE )
data.dist |
a distance matrix on which to calculate nearest neighbors |
transformation |
a character vector indicating the type of transformation the similarity matrix will go through before being returned. By default the similarity matrix will be returned with no transformation. Other possible values include log (returns matrix which has been log transformed), 'inverse' returns a shifted inverse of the matrix, 'stretch' returns a linear scaling of the matrix, 'tan' returns the tangent of matrix values, and 'tanh' returns the hyperbolic tangent of matrix values |
APq |
a number between 0 and 1 which indicates the quantile of the data to use to diagonalize the similarity matrix before running AP clustering. Increase if too few clusters. |
kmin |
the number of neighbors on which to calculate the first Jaccard matrix |
kmax |
the number of neighbors on which to calculate the last Jaccard matrix |
kstep |
the number of neighbors to iterate for each calculation of a new Jaccard matrix |
save.simmats |
a Boolean indicating whether or not to return the Jaccard similarity matrices along with the AP clustering solutions. |
target.clust.vec |
a named vector of cluster assignments for the cells/samples in the distance matrix. If given, the function returns the NMI values for the AP solutions for each Jaccard matrix when compared with this target vector. If null, the function returns no NMI values |
a list containing the AP clustering solutions for all the variations of the Jaccard matrix and, if there is a target vector given, the NMI values for these solutions compared with the target vector and, if save.simmat=TRUE, the similarity matrix which resulted in each AP solution
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.