Learn R Programming

sccore

Core utilities for single-cell RNA-seq data analysis. Contained within are utility functions for working with differential expression (DE) matrices and count matrices, a collection of functions for manipulating and plotting data via 'ggplot2', and functions to work with cell graphs and cell embeddings. Graph-based methods include embedding kNN cell graphs into a UMAP, collapsing vertices of each cluster in the graph, and propagating graph labels.

Installation

To install the stable version from CRAN, use:

install.packages('sccore')

To install the latest version, use:

install.packages('devtools')
devtools::install_github('kharchenkolab/sccore')

Citation

If you find sccore useful for your publication, please cite:

Viktor Petukhov, Rasmus Rydbirk, Peter Kharchenko and Evan Biederstedt
(2021). sccore: Core Utilities for Single-Cell RNA-Seq. R package
version 1.0.6. https://github.com/kharchenkolab/sccore

Copy Link

Version

Install

install.packages('sccore')

Monthly Downloads

1,576

Version

1.0.6

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Evan Biederstedt

Last Published

April 13th, 2025

Functions in sccore (1.0.6)

collapseGraphSum

Collapse Graph By Sum
fac2col

Utility function to translate a factor into colors
fac2palette

Encodes logic of how to handle named-vector and functional palettes. Used primarily within embeddingGroupPlot()
graphToAdjList

Convert igraph graph into an adjacency list
embedKnnGraph

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.
embedGraphUmap

Embed a graph into a UMAP, Uniform Manifold Approximation and Projection for Dimension Reduction, <https://github.com/lmcinnes/umap>, <doi:10.21105/joss.00861>
propagateLabels

Estimate labeling distribution for each vertex, based on provided labels.
heatFilter

Graph filter with the heat kernel: \(f(x) = exp(-\beta |x / \lambda_m - a|^b)\)
propagateLabelsSolver

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>
getClusterGraph

Collapse vertices belonging to each cluster in a graph
styleEmbeddingPlot

Set plot.theme, legend, ticks for embedding plot. Used primarily in embeddingPlot().
get_nearest_neighbors

Get nearest neighbors method on graph
splitVectorByNodes

splitVectorByNodes
propagate_labels

Label propagation
propagateLabelsDiffusion

Estimate labeling distribution for each vertex, based on provided labels using a Random Walk on graph
computeChebyshevCoeffs

Compute Chebyshev Coefficients
extendMatrix

Extend matrix to include new columns in matrix
as_factor

convert character vector into a factor with names "values" and "levels"
appendSpecificityMetricsToDE

Append specificity metrics to DE
embeddingPlot

embeddingPlot generic Plot embedding with provided labels / colors using ggplot2
conosClusterList

Conos clusters list
saveDeAsJson

Save DE results as JSON tables for viewing in browser
jsDist

Jensen–Shannon distance metric (i.e. the square root of the Jensen–Shannon divergence) between the columns of a dense matrix m
embeddingGroupPlot

Plotting function for cluster labels, names contain cell names. Used primarily in embeddingPlot().
smooth_count_matrix

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))
sn

Set names equal to values, a stats::setNames wrapper function
mergeCountMatrices

Merge list of count matrices into a common matrix, entering 0s for the missing entries
umapEmbedding

UMAP embedding
val2col

Utility function to translate values into colors.
setMinMax

Set range for values in object. Changes values outside of range to min or max. Adapted from Seurat::MinMax
smoothSignalOnGraph

Smooth Signal on Graph
val2ggcol

Helper function to return a ggplot color gradient for a numeric vector ggplot(aes(color=x, ...), ...) + val2ggcol(x)
multi2dend

Translate multilevel segmentation into a dendrogram, with the lowest level of the dendrogram listing the cells
smoothChebyshev

Smooth with Chebyshev Polynomials
plapply

Parallel, optionally verbose lapply. See ?parallel::mclapply for more info.
collapseGraphPaga

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>
adjacentVertices

List of adjacent vertices from igraph object
colSumByFactor

Calculates factor-stratified sums for each column
adjacent_vertex_weights

List of adjacent vertex weights from igraph object
cellAnnotations

Conos cell annotations
collapseCellsByType

Collapse count matrices by cell type, given min/max number of cells
checkPackageInstalled

Check whether a package is installed and suggest how to install from CRAN, Bioconductor, or other external source
embeddingColorsPlot

Set colors for embedding plot. Used primarily in embeddingPlot().
dotPlot

Dot plot adapted from Seurat:::DotPlot, see ?Seurat:::DotPlot for details
conosGraph

Conos graph