Author: Lambda Moses, Kayla Jackson

# Overview of concordexR

Lambda Moses, Kayla Jackson

#### Apr 28, 2026

The goal of concordexR is to identify spatial homogeneous regions (SHRs) as defined in the recent manuscrpt“Identification of spatial homogenous regions in tissues with concordex”. Briefly, SHRs are are domains that are homogeneous with respect to cell type composition. concordex relies on the the k-nearest-neighbor (kNN) graph to representing similarities between cells and uses common clustering algorithms to identify SHRs.

## 1 Installation

This package is under active development will be available in the Bioconductor version 3.20 release.

Until then, please install the package from Github or from the Bioconductor devel branch.

    if (!requireNamespace("BiocManager", quietly=TRUE))
        install.packages("BiocManager")

    #BiocManager::install("concordexR", version="devel")
    devtools::install_github("pachterlab/concordexR")

## 2 Example of main functionality

This is a basic example which shows you how to solve a common problem:

    library(concordexR)
    library(SFEData)

    sfe <- McKellarMuscleData("small")
    #> see ?SFEData and browseVignettes('SFEData') for documentation
    #> loading from cache
    #> require("SpatialFeatureExperiment")
    #> There appears to be a problem with the PROJ installation

    res <- calculateConcordex(sfe, labels=colData(sfe)[["in_tissue"]])

## 3 SessionInfo

    sessionInfo()
    #> R version 4.6.0 Patched (2026-04-24 r89963)
    #> Platform: aarch64-apple-darwin23
    #> Running under: macOS Tahoe 26.3.1
    #>
    #> Matrix products: default
    #> BLAS:   /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libRblas.0.dylib
    #> LAPACK: /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.1
    #>
    #> locale:
    #> [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
    #>
    #> time zone: America/New_York
    #> tzcode source: internal
    #>
    #> attached base packages:
    #> [1] stats4    stats     graphics  grDevices utils     datasets  methods
    #> [8] base
    #>
    #> other attached packages:
    #>  [1] SpatialFeatureExperiment_1.14.0 SFEData_1.13.0
    #>  [3] patchwork_1.3.2                 scater_1.40.0
    #>  [5] ggplot2_4.0.3                   scuttle_1.22.0
    #>  [7] bluster_1.22.0                  BiocNeighbors_2.6.0
    #>  [9] TENxPBMCData_1.29.0             HDF5Array_1.40.0
    #> [11] h5mread_1.4.0                   rhdf5_2.56.0
    #> [13] DelayedArray_0.38.0             SparseArray_1.12.0
    #> [15] S4Arrays_1.12.0                 abind_1.4-8
    #> [17] Matrix_1.7-5                    SingleCellExperiment_1.34.0
    #> [19] SummarizedExperiment_1.42.0     Biobase_2.72.0
    #> [21] GenomicRanges_1.64.0            Seqinfo_1.2.0
    #> [23] IRanges_2.46.0                  S4Vectors_0.50.0
    #> [25] BiocGenerics_0.58.0             generics_0.1.4
    #> [27] MatrixGenerics_1.24.0           matrixStats_1.5.0
    #> [29] concordexR_1.12.0               BiocStyle_2.40.0
    #>
    #> loaded via a namespace (and not attached):
    #>   [1] splines_4.6.0             bitops_1.0-9
    #>   [3] filelock_1.0.3            tibble_3.3.1
    #>   [5] R.oo_1.27.1               lifecycle_1.0.5
    #>   [7] httr2_1.2.2               sf_1.1-0
    #>   [9] edgeR_4.10.0              lattice_0.22-9
    #>  [11] MASS_7.3-65               backports_1.5.1
    #>  [13] magrittr_2.0.5            limma_3.68.0
    #>  [15] sass_0.4.10               rmarkdown_2.31
    #>  [17] jquerylib_0.1.4           yaml_2.3.12
    #>  [19] otel_0.2.0                sp_2.2-1
    #>  [21] cowplot_1.2.0             DBI_1.3.0
    #>  [23] RColorBrewer_1.1-3        multcomp_1.4-30
    #>  [25] spatialreg_1.4-3          purrr_1.2.2
    #>  [27] R.utils_2.13.0            RCurl_1.98-1.18
    #>  [29] TH.data_1.1-5             sandwich_3.1-1
    #>  [31] rappdirs_0.3.4            ggrepel_0.9.8
    #>  [33] irlba_2.3.7               terra_1.9-11
    #>  [35] units_1.0-1               dqrng_0.4.1
    #>  [37] DelayedMatrixStats_1.34.0 codetools_0.2-20
    #>  [39] DropletUtils_1.32.0       tidyselect_1.2.1
    #>  [41] farver_2.1.2              ScaledMatrix_1.20.0
    #>  [43] viridis_0.6.5             BiocFileCache_3.2.0
    #>  [45] jsonlite_2.0.0            e1071_1.7-17
    #>  [47] survival_3.8-6            tools_4.6.0
    #>  [49] Rcpp_1.1.1-1.1            glue_1.8.1
    #>  [51] gridExtra_2.3             xfun_0.57
    #>  [53] EBImage_4.54.0            dplyr_1.2.1
    #>  [55] withr_3.0.2               BiocManager_1.30.27
    #>  [57] fastmap_1.2.0             boot_1.3-32
    #>  [59] rhdf5filters_1.24.0       spData_2.3.4
    #>  [61] digest_0.6.39             rsvd_1.0.5
    #>  [63] R6_2.6.1                  wk_0.9.5
    #>  [65] LearnBayes_2.15.2         jpeg_0.1-11
    #>  [67] dichromat_2.0-0.1         RSQLite_2.4.6
    #>  [69] R.methodsS3_1.8.2         data.table_1.18.2.1
    #>  [71] FNN_1.1.4.1               class_7.3-23
    #>  [73] httr_1.4.8                htmlwidgets_1.6.4
    #>  [75] spdep_1.4-2               uwot_0.2.4
    #>  [77] pkgconfig_2.0.3           gtable_0.3.6
    #>  [79] blob_1.3.0                S7_0.2.2
    #>  [81] XVector_0.52.0            htmltools_0.5.9
    #>  [83] bookdown_0.46             fftwtools_0.9-11
    #>  [85] scales_1.4.0              png_0.1-9
    #>  [87] SpatialExperiment_1.22.0  knitr_1.51
    #>  [89] rjson_0.2.23              nlme_3.1-169
    #>  [91] coda_0.19-4.1             curl_7.1.0
    #>  [93] zoo_1.8-15                proxy_0.4-29
    #>  [95] cachem_1.1.0              BiocVersion_3.23.1
    #>  [97] KernSmooth_2.23-26        parallel_4.6.0
    #>  [99] vipor_0.4.7               AnnotationDbi_1.74.0
    #> [101] s2_1.1.9                  pillar_1.11.1
    #> [103] grid_4.6.0                vctrs_0.7.3
    #> [105] BiocSingular_1.28.0       dbplyr_2.5.2
    #> [107] beachmat_2.28.0           sfheaders_0.4.5
    #> [109] cluster_2.1.8.2           beeswarm_0.4.0
    #> [111] evaluate_1.0.5            zeallot_0.2.0
    #> [113] isoband_0.3.0             tinytex_0.59
    #> [115] magick_2.9.1              mvtnorm_1.3-7
    #> [117] cli_3.6.6                 locfit_1.5-9.12
    #> [119] compiler_4.6.0            rlang_1.2.0
    #> [121] crayon_1.5.3              labeling_0.4.3
    #> [123] classInt_0.4-11           ggbeeswarm_0.7.3
    #> [125] viridisLite_0.4.3         deldir_2.0-4
    #> [127] BiocParallel_1.46.0       Biostrings_2.80.0
    #> [129] tiff_0.1-12               marginaleffects_0.32.0
    #> [131] ExperimentHub_3.2.0       sparseMatrixStats_1.24.0
    #> [133] bit64_4.8.0               Rhdf5lib_2.0.0
    #> [135] KEGGREST_1.52.0           statmod_1.5.1
    #> [137] AnnotationHub_4.2.0       igraph_2.3.0
    #> [139] memoise_2.0.1             bslib_0.10.0
    #> [141] bit_4.6.0