Title: | Identify Spatial Homogeneous Regions with concordex |
---|---|
Description: | Spatial homogeneous regions (SHRs) in tissues are domains that are homogenous with respect to cell type composition. We present a method for identifying SHRs using spatial transcriptomics data, and demonstrate that it is efficient and effective at finding SHRs for a wide variety of tissue types. concordex relies on analysis of k-nearest-neighbor (kNN) graphs. The tool is also useful for analysis of non-spatial transcriptomics data, and can elucidate the extent of concordance between partitions of cells derived from clustering algorithms, and transcriptomic similarity as represented in kNN graphs. |
Authors: | Kayla Jackson [aut, cre] , A. Sina Booeshaghi [aut] , Angel Galvez-Merchan [aut] , Lambda Moses [aut] , Alexandra Kim [ctb], Laura Luebbert [ctb] , Lior Pachter [aut, rev, ths] |
Maintainer: | Kayla Jackson <[email protected]> |
License: | Artistic-2.0 |
Version: | 1.7.0 |
Built: | 2024-10-31 06:32:20 UTC |
Source: | https://github.com/bioc/concordexR |
Compute the neighborhood consolidation matrix and identify spatial homogeneous regions.
calculateConcordex(x, ...) ## S4 method for signature 'ANY' calculateConcordex( x, labels, ..., n_neighbors = 30, compute_similarity = FALSE, BLUSPARAM, BNINDEX, BNPARAM = KmknnParam(), BPPARAM = SerialParam() ) ## S4 method for signature 'SummarizedExperiment' calculateConcordex(x, labels, ..., assay.type = "logcounts") ## S4 method for signature 'SingleCellExperiment' calculateConcordex(x, labels, ..., use.dimred = NULL) ## S4 method for signature 'SpatialExperiment' calculateConcordex(x, labels, ..., use.spatial = TRUE)
calculateConcordex(x, ...) ## S4 method for signature 'ANY' calculateConcordex( x, labels, ..., n_neighbors = 30, compute_similarity = FALSE, BLUSPARAM, BNINDEX, BNPARAM = KmknnParam(), BPPARAM = SerialParam() ) ## S4 method for signature 'SummarizedExperiment' calculateConcordex(x, labels, ..., assay.type = "logcounts") ## S4 method for signature 'SingleCellExperiment' calculateConcordex(x, labels, ..., use.dimred = NULL) ## S4 method for signature 'SpatialExperiment' calculateConcordex(x, labels, ..., use.spatial = TRUE)
x |
A Otherwise, a numeric matrix-like object containing counts for observations (e.g. cells/spots) on the rows and features on the columns. |
... |
Other parameters passed to default method |
labels |
Observation labels used to compute the neighborhood consolidation matrix. Continuous or discrete labels are allowed, and typically, integer labels are assumed to be discrete. Labels can be specified as follows:
|
n_neighbors |
Number of neighbors to expect for each observation. Defaults to 30. |
compute_similarity |
Logical. Whether to return the label similarity matrix. Only useful if discrete labels are provided. |
BLUSPARAM |
A |
BNINDEX |
A |
BNPARAM |
A |
BPPARAM |
A |
assay.type |
String or integer scalar indicating the assay of |
use.dimred |
Integer or string specifying the reduced dimensions to use
for construction of the k-nearest neighbor graph. Note that if this is not
|
use.spatial |
Logical, should the spatial coordinates be used to compute the k-nearest neighbor graph? |
A sparse matrix
example(read10xVisium, "SpatialExperiment") library(bluster) ## Setting BLUSPARAM clusters the consolidation ## matrix into SHRs cdx <- calculateConcordex( spe, "in_tissue", n_neighbors=10, BLUSPARAM=KmeansParam(3) ) ## SHRs are an attribute of the result shr <- attr(cdx, "shr") ## The label similarity matrix can be computed ## with `compute_similarity=TRUE` cdx <- calculateConcordex( spe, "in_tissue", n_neighbors=10, compute_similarity=TRUE, BLUSPARAM=KmeansParam(3) )
example(read10xVisium, "SpatialExperiment") library(bluster) ## Setting BLUSPARAM clusters the consolidation ## matrix into SHRs cdx <- calculateConcordex( spe, "in_tissue", n_neighbors=10, BLUSPARAM=KmeansParam(3) ) ## SHRs are an attribute of the result shr <- attr(cdx, "shr") ## The label similarity matrix can be computed ## with `compute_similarity=TRUE` cdx <- calculateConcordex( spe, "in_tissue", n_neighbors=10, compute_similarity=TRUE, BLUSPARAM=KmeansParam(3) )