In this vignette we will demonstrate how to find cis-co-accessible networks with Cicero using single-cell ATAC-seq data. Please see the Cicero website for information about Cicero.

To facilitate conversion between the Seurat (used by Signac) and CellDataSet (used by Cicero) formats, we will use a conversion function in the SeuratWrappers package available on GitHub.

Data loading

We will use a single-cell ATAC-seq dataset containing human CD34+ hematopoietic stem and progenitor cells published by Satpathy and Granja et al. (2019, Nature Biotechnology). The processed datasets are available on NCBI GEO here: https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE129785

This is the same dataset we used in the trajectory vignette, and we’ll start by loading the dataset that was created in that vignette. See the trajectory vignette for the code used to create the object from raw data.

First we will load their dataset and perform some standard preprocessing using Signac.

# load the object created in the Monocle 3 vignette
bone <- readRDS("../vignette_data/cd34.rds")

Create the Cicero object

We can find cis-co-accessible networks (CCANs) using Cicero.

The Cicero developers have developed a separate branch of the package that works with a Monocle 3 CellDataSet object. We will first make sure this branch is installed, then convert our Seurat object for the whole bone marrow dataset to CellDataSet format.

# Install Cicero
if (!requireNamespace("remotes", quietly = TRUE))
    install.packages("remotes")
remotes::install_github("cole-trapnell-lab/cicero-release", ref = "monocle3")
library(cicero)
# convert to CellDataSet format and make the cicero object
bone.cds <- as.cell_data_set(x = bone)
bone.cicero <- make_cicero_cds(bone.cds, reduced_coordinates = reducedDims(bone.cds)$UMAP)

Find Cicero connections

We’ll demonstrate running Cicero here using just one chromosome to save some time, but the same workflow can be applied to find CCANs for the whole genome.

Here we demonstrate the most basic workflow for running Cicero. This workflow can be broken down into several steps, each with parameters that can be changed from their defaults to fine-tune the Cicero algorithm depending on your data. We highly recommend that you explore the Cicero website, paper, and documentation for more information.

# get the chromosome sizes from the Seurat object
genome <- seqlengths(bone)

# use chromosome 1 to save some time
# omit this step to run on the whole genome
genome <- genome[1]

# convert chromosome sizes to a dataframe
genome.df <- data.frame("chr" = names(genome), "length" = genome)

# run cicero
conns <- run_cicero(bone.cicero, genomic_coords = genome.df, sample_num = 100)
## [1] "Starting Cicero"
## [1] "Calculating distance_parameter value"
## [1] "Running models"
## [1] "Assembling connections"
## [1] "Successful cicero models:  755"
## [1] "Other models: "
## 
##   Too many elements in range Zero or one element in range 
##                          157                           86 
## [1] "Models with errors:  0"
## [1] "Done"
head(conns)
##                      Peak1                  Peak2 coaccess
## 1 chr1-100003337-100003837 chr1-99791719-99792219        0
## 2 chr1-100003337-100003837 chr1-99828699-99829199        0
## 3 chr1-100003337-100003837 chr1-99835542-99836042        0
## 4 chr1-100003337-100003837 chr1-99836217-99836717        0
## 5 chr1-100003337-100003837 chr1-99839576-99840076        0
## 6 chr1-100003337-100003837 chr1-99840640-99841140        0

Find cis-co-accessible networks (CCANs)

Now that we’ve found pairwise co-accessibility scores for each peak, we can now group these pairwise connections into larger co-accessible networks using the generate_ccans() function from Cicero.

ccans <- generate_ccans(conns)
## [1] "Coaccessibility cutoff used: 0.19"
head(ccans)
##                                              Peak CCAN
## chr1-10009702-10010202     chr1-10009702-10010202    1
## chr1-100151188-100151688 chr1-100151188-100151688    2
## chr1-100164787-100165287 chr1-100164787-100165287    2
## chr1-100165566-100166066 chr1-100165566-100166066    2
## chr1-100202505-100203005 chr1-100202505-100203005    3
## chr1-100215491-100215991 chr1-100215491-100215991    3

We can add the co-accessible links found by Cicero to the ChromatinAssay object in Seurat. Using the ConnectionsToLinks() function in Signac we can convert the outputs of Cicero to the format needed to store in the links slot in the ChromatinAssay, and add this to the object using the Links<- assignment function.

links <- ConnectionsToLinks(conns = conns, ccans = ccans)
Links(bone) <- links

We can now visualize these links along with DNA accessibility information by running CoveragePlot() for a region:

CoveragePlot(bone, region = "chr1-40189344-40252549")

Acknowledgements

Thanks to the developers of Cicero, especially Cole Trapnell, Hannah Pliner, and members of the Trapnell lab. If you use Cicero please cite the Cicero paper.

Session Info
## R version 4.3.1 (2023-06-16)
## Platform: aarch64-apple-darwin20 (64-bit)
## Running under: macOS Sonoma 14.4.1
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib 
## LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0
## 
## locale:
## [1] C/UTF-8/C/C/C/C
## 
## time zone: Asia/Singapore
## tzcode source: internal
## 
## attached base packages:
## [1] grid      stats4    stats     graphics  grDevices utils     datasets 
## [8] methods   base     
## 
## other attached packages:
##  [1] cicero_1.3.9                Gviz_1.46.1                
##  [3] monocle3_1.3.5              SingleCellExperiment_1.24.0
##  [5] SummarizedExperiment_1.32.0 GenomicRanges_1.54.1       
##  [7] GenomeInfoDb_1.38.7         IRanges_2.36.0             
##  [9] S4Vectors_0.40.2            MatrixGenerics_1.14.0      
## [11] matrixStats_1.2.0           Biobase_2.62.0             
## [13] BiocGenerics_0.48.1         patchwork_1.2.0            
## [15] ggplot2_3.5.0               SeuratWrappers_0.3.1       
## [17] Seurat_5.0.3                SeuratObject_5.0.1         
## [19] sp_2.1-3                    Signac_1.13.0              
## 
## loaded via a namespace (and not attached):
##   [1] ProtGenerics_1.34.0      fs_1.6.3                 spatstat.sparse_3.0-3   
##   [4] bitops_1.0-7             httr_1.4.7               RColorBrewer_1.1-3      
##   [7] backports_1.4.1          tools_4.3.1              sctransform_0.4.1       
##  [10] utf8_1.2.4               R6_2.5.1                 lazyeval_0.2.2          
##  [13] uwot_0.1.16              withr_3.0.0              prettyunits_1.2.0       
##  [16] gridExtra_2.3            progressr_0.14.0         cli_3.6.2               
##  [19] textshaping_0.3.7        spatstat.explore_3.2-7   fastDummies_1.7.3       
##  [22] labeling_0.4.3           sass_0.4.9               spatstat.data_3.0-4     
##  [25] ggridges_0.5.6           pbapply_1.7-2            pkgdown_2.0.7           
##  [28] Rsamtools_2.18.0         systemfonts_1.0.6        foreign_0.8-86          
##  [31] R.utils_2.12.3           dichromat_2.0-0.1        parallelly_1.37.1       
##  [34] BSgenome_1.70.2          VGAM_1.1-10              rstudioapi_0.16.0       
##  [37] RSQLite_2.3.5            FNN_1.1.4                generics_0.1.3          
##  [40] BiocIO_1.12.0            ica_1.0-3                spatstat.random_3.2-3   
##  [43] dplyr_1.1.4              interp_1.1-6             Matrix_1.6-5            
##  [46] fansi_1.0.6              abind_1.4-5              R.methodsS3_1.8.2       
##  [49] lifecycle_1.0.4          yaml_2.3.8               SparseArray_1.2.4       
##  [52] BiocFileCache_2.10.1     Rtsne_0.17               blob_1.2.4              
##  [55] promises_1.2.1           crayon_1.5.2             miniUI_0.1.1.1          
##  [58] lattice_0.22-6           cowplot_1.1.3            GenomicFeatures_1.54.3  
##  [61] KEGGREST_1.42.0          pillar_1.9.0             knitr_1.45              
##  [64] rjson_0.2.21             boot_1.3-30              future.apply_1.11.2     
##  [67] codetools_0.2-19         fastmatch_1.1-4          leiden_0.4.3.1          
##  [70] glue_1.7.0               leidenbase_0.1.27        data.table_1.15.4       
##  [73] remotes_2.5.0            vctrs_0.6.5              png_0.1-8               
##  [76] spam_2.10-0              gtable_0.3.4             assertthat_0.2.1        
##  [79] cachem_1.0.8             xfun_0.43                S4Arrays_1.2.1          
##  [82] mime_0.12                survival_3.5-8           RcppRoll_0.3.0          
##  [85] fitdistrplus_1.1-11      ROCR_1.0-11              nlme_3.1-164            
##  [88] bit64_4.0.5              progress_1.2.3           filelock_1.0.3          
##  [91] RcppAnnoy_0.0.22         bslib_0.6.2              irlba_2.3.5.1           
##  [94] KernSmooth_2.23-22       rpart_4.1.23             colorspace_2.1-0        
##  [97] DBI_1.2.2                Hmisc_5.1-2              nnet_7.3-19             
## [100] tidyselect_1.2.1         bit_4.0.5                compiler_4.3.1          
## [103] curl_5.2.1               htmlTable_2.4.2          xml2_1.3.6              
## [106] desc_1.4.3               DelayedArray_0.28.0      plotly_4.10.4           
## [109] rtracklayer_1.62.0       checkmate_2.3.1          scales_1.3.0            
## [112] lmtest_0.9-40            rappdirs_0.3.3           stringr_1.5.1           
## [115] digest_0.6.35            goftest_1.2-3            spatstat.utils_3.0-4    
## [118] minqa_1.2.6              rmarkdown_2.26           XVector_0.42.0          
## [121] jpeg_0.1-10              htmltools_0.5.8          pkgconfig_2.0.3         
## [124] base64enc_0.1-3          lme4_1.1-35.1            highr_0.10              
## [127] ensembldb_2.26.0         dbplyr_2.5.0             fastmap_1.1.1           
## [130] rlang_1.1.3              htmlwidgets_1.6.4        shiny_1.8.1             
## [133] farver_2.1.1             jquerylib_0.1.4          zoo_1.8-12              
## [136] jsonlite_1.8.8           BiocParallel_1.36.0      R.oo_1.26.0             
## [139] VariantAnnotation_1.48.1 RCurl_1.98-1.14          magrittr_2.0.3          
## [142] Formula_1.2-5            GenomeInfoDbData_1.2.11  dotCall64_1.1-1         
## [145] munsell_0.5.0            Rcpp_1.0.12              reticulate_1.35.0       
## [148] stringi_1.8.3            zlibbioc_1.48.0          MASS_7.3-60.0.1         
## [151] plyr_1.8.9               parallel_4.3.1           listenv_0.9.1           
## [154] ggrepel_0.9.5            deldir_2.0-4             Biostrings_2.70.2       
## [157] splines_4.3.1            tensor_1.5               hms_1.1.3               
## [160] igraph_2.0.3             spatstat.geom_3.2-9      RcppHNSW_0.6.0          
## [163] reshape2_1.4.4           biomaRt_2.58.2           XML_3.99-0.16.1         
## [166] evaluate_0.23            latticeExtra_0.6-30      biovizBase_1.50.0       
## [169] BiocManager_1.30.22      tweenr_2.0.3             nloptr_2.0.3            
## [172] httpuv_1.6.15            RANN_2.6.1               tidyr_1.3.1             
## [175] purrr_1.0.2              polyclip_1.10-6          future_1.33.2           
## [178] scattermore_1.2          ggforce_0.4.2            rsvd_1.0.5              
## [181] xtable_1.8-4             AnnotationFilter_1.26.0  restfulr_0.0.15         
## [184] RSpectra_0.16-1          later_1.3.2              viridisLite_0.4.2       
## [187] ragg_1.3.0               tibble_3.2.1             memoise_2.0.1           
## [190] AnnotationDbi_1.64.1     GenomicAlignments_1.38.2 cluster_2.1.6           
## [193] globals_0.16.3