Conos clusters list
Convert igraph graph into an adjacency list
Utility function to translate a factor into colors
Encodes logic of how to handle named-vector and functional palettes. Used primarily within embeddingGroupPlot()
Set range for values in object. Changes values outside of range to min or max. Adapted from Seurat::MinMax
Save DE results as JSON tables for viewing in browser
Label propagation
Propagate labels using Zhu, Ghahramani, Lafferty (2003) algorithm, "Semi-Supervised Learning Using Gaussian Fields and Harmonic Functions" <http://mlg.eng.cam.ac.uk/zoubin/papers/zgl.pdf>
Graph filter with the heat kernel: \(f(x) = exp(-\beta |x / \lambda_m - a|^b)\)
Smooth with Chebyshev Polynomials
Parallel, optionally verbose lapply. See ?parallel::mclapply for more info.
Translate multilevel segmentation into a dendrogram, with the lowest level of the dendrogram listing the cells
Smooth Signal on Graph
Get nearest neighbors method on graph
Set plot.theme, legend, ticks for embedding plot. Used primarily in embeddingPlot().
Estimate labeling distribution for each vertex, based on provided labels using a Random Walk on graph
Collapse vertices belonging to each cluster in a graph
Smooth gene expression, used primarily within conos::correctGenes. Used to smooth gene expression values in order to better represent the graph structure.
Use diffusion of expression on graph with the equation dv = exp(-a * (v + b))
splitVectorByNodes
Estimate labeling distribution for each vertex, based on provided labels.
Merge list of count matrices into a common matrix, entering 0s for the missing entries
Jensen–Shannon distance metric (i.e. the square root of the Jensen–Shannon divergence) between the columns of a dense matrix m
Helper function to return a ggplot color gradient for a numeric vector
ggplot(aes(color=x, ...), ...) + val2ggcol(x)
UMAP embedding
Set names equal to values, a stats::setNames wrapper function
Utility function to translate values into colors.
appendSpecificityMetricsToDE
Append specificity metrics to DE
convert character vector into a factor with names "values" and "levels"
Check whether a package is installed and suggest how to install from CRAN, Bioconductor, or other external source
List of adjacent vertex weights from igraph object
List of adjacent vertices from igraph object
Conos cell annotations
Embed a graph into a UMAP, Uniform Manifold Approximation and Projection for Dimension Reduction, <https://github.com/lmcinnes/umap>, <doi:10.21105/joss.00861>
Embed a k-nearest neighbor (kNN) graph within a UMAP. Used within embedGraphUmap(). Please see McInnes et al <doi:10.21105/joss.00861> for the UMAP description and implementation.
Compute Chebyshev Coefficients
Collapse count matrices by cell type, given min/max number of cells
Plot embedding with provided labels / colors using ggplot2
Calculates factor-stratified sums for each column
Extend matrix to include new columns in matrix
Collapse Graph By Sum
Collapse graph using PAGA 1.2 algorithm, Wolf et al 2019, Genome Biology (2019) <https://genomebiology.biomedcentral.com/articles/10.1186/s13059-019-1663-x>
Dot plot adapted from Seurat:::DotPlot, see ?Seurat:::DotPlot for details
Conos graph
Plotting function for cluster labels, names contain cell names. Used primarily in embeddingPlot().
Set colors for embedding plot. Used primarily in embeddingPlot().