Learn R Programming

⚠️There's a newer version (1.0.6) of this package.Take me there.

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, Ramus Rydbirk, Peter Kharchenko and Evan Biederstedt
(2021). sccore: Core Utilities for Single-Cell RNA-Seq. R package
version 0.1.2. https://github.com/kharchenkolab/sccore

Copy Link

Version

Install

install.packages('sccore')

Monthly Downloads

2,151

Version

0.1.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Evan Biederstedt

Last Published

February 23rd, 2021

Functions in sccore (0.1.2)

conosGraph

Conos graph
dotPlot

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

Extend matrix to include new columns in matrix
embeddingPlot

Plot embedding with provided labels / colors using ggplot2
propagateLabelsDiffusion

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

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

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

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

Collapse vertices belonging to each cluster in a graph
setMinMax

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

Get nearest neighbors method on graph
smoothChebyshev

Smooth with Chebyshev Polynomials
sn

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

Utility function to translate a factor into colors
colSumByFac

Calculates factor-stratified sums for each column
heatFilter

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

Convert igraph graph into an adjacency list
jsDist

Jensen<U+2013>Shannon distance metric (i.e. the square root of the Jensen<U+2013>Shannon divergence) between the columns of a dense matrix m
mergeCountMatrices

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

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

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

UMAP embedding
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>
propagate_labels

Label propagation
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>
splitVectorByNodes

splitVectorByNodes
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.
multi2dend

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

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

Utility function to translate values into colors.
plapply

Parallel, optionally verbose lapply. See ?parallel::mclapply for more info.
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))
smoothSignalOnGraph

Smooth Signal on Graph
collapseGraphSum

Collapse Graph By Sum
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>
as_factor

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

Conos cell annotations
adjacent_vertex_weights

List of adjacent vertex weights from igraph object
adjacentVertices

List of adjacent vertices from igraph object
appendSpecificityMetricsToDE

Append specificity metrics to DE
conosClusterList

Conos clusters list
computeChebyshevCoeffs

Compute Chebyshev Coefficients