Aim to cluster cells, we try a two round clustering strategy:
First round: based on 500 bp tile matrix
Second round: based on union peak sets merged from cluster peaks
Both rounds use the iterative LSI
21.2 Set env and load arrow project
## Section: set default para##################################################addArchRThreads(threads =16) # setting default number of parallel threads## Section: load object##################################################proj <-loadArchRProject(path ="data/ArchR/ArrowProject/Merged/")
21.3 LSI, clustering and embedding
proj %>%addIterativeLSI(# first round iterative LSI based on tilematrix, with default para, it will carry out estimated LSIArchRProj = .,useMatrix ="TileMatrix",name ="IterativeLSI_tile",force =TRUE ) %>%addClusters(# add cluster based on LSI using seuratinput = .,reducedDims ="IterativeLSI_tile",force =TRUE) %>%addUMAP(# add embeddingArchRProj = .,reducedDims ="IterativeLSI_tile",name ="UMAP_tile",nNeighbors =30,force =TRUE )
## Checking Inputs...
## ArchR logging to : ArchRLogs/ArchR-addIterativeLSI-131c165a8193-Date-2021-11-12_Time-14-54-13.log
## If there is an issue, please report to github with logFile!
## 2021-11-12 14:54:16 : Computing Total Across All Features, 0.003 mins elapsed.
## 2021-11-12 14:54:25 : Computing Top Features, 0.152 mins elapsed.
## ###########
## 2021-11-12 14:54:27 : Running LSI (1 of 2) on Top Features, 0.176 mins elapsed.
## ###########
## 2021-11-12 14:54:27 : Creating Partial Matrix, 0.177 mins elapsed.
## 2021-11-12 14:54:34 : Computing LSI, 0.301 mins elapsed.
## 2021-11-12 14:54:47 : Identifying Clusters, 0.511 mins elapsed.
## 2021-11-12 14:54:58 : Identified 6 Clusters, 0.703 mins elapsed.
## 2021-11-12 14:54:58 : Saving LSI Iteration, 0.703 mins elapsed.
## 2021-11-12 14:55:14 : Creating Cluster Matrix on the total Group Features, 0.97 mins elapsed.
## 2021-11-12 14:57:08 : Computing Variable Features, 2.858 mins elapsed.
## ###########
## 2021-11-12 14:57:08 : Running LSI (2 of 2) on Variable Features, 2.863 mins elapsed.
## ###########
## 2021-11-12 14:57:08 : Creating Partial Matrix, 2.863 mins elapsed.
## 2021-11-12 14:57:22 : Computing LSI, 3.093 mins elapsed.
## 2021-11-12 14:57:35 : Finished Running IterativeLSI, 3.322 mins elapsed.
## ArchR logging to : ArchRLogs/ArchR-addClusters-131c4451f2d7-Date-2021-11-12_Time-14-57-35.log
## If there is an issue, please report to github with logFile!
## Overriding previous entry for Clusters
## 2021-11-12 14:57:36 : Running Seurats FindClusters (Stuart et al. Cell 2019), 0.003 mins elapsed.
## Computing nearest neighbor graph
## Computing SNN
## Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
##
## Number of nodes: 3000
## Number of edges: 135042
##
## Running Louvain algorithm...
## Maximum modularity in 10 random starts: 0.7866
## Number of communities: 10
## Elapsed time: 0 seconds
## 2021-11-12 14:57:43 : Testing Outlier Clusters, 0.111 mins elapsed.
## 2021-11-12 14:57:43 : Assigning Cluster Names to 10 Clusters, 0.111 mins elapsed.
## 2021-11-12 14:57:43 : Finished addClusters, 0.114 mins elapsed.
## 14:57:43 UMAP embedding parameters a = 0.7669 b = 1.223
## 14:57:43 Read 3000 rows and found 30 numeric columns
## 14:57:43 Using Annoy for neighbor search, n_neighbors = 30
## 14:57:43 Building Annoy index with metric = cosine, n_trees = 50