library(CellChat)
## Loading required package: dplyr
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## Loading required package: igraph
## 
## Attaching package: 'igraph'
## The following objects are masked from 'package:dplyr':
## 
##     as_data_frame, groups, union
## The following objects are masked from 'package:stats':
## 
##     decompose, spectrum
## The following object is masked from 'package:base':
## 
##     union
## Loading required package: ggplot2
library(patchwork)
library(Seurat)
## Registered S3 method overwritten by 'spatstat.geom':
##   method     from
##   print.boxx cli
## Attaching SeuratObject
library(SeuratObject)
library(SeuratWrappers)
library(dplyr)
library(future)
## 
## Attaching package: 'future'
## The following objects are masked from 'package:igraph':
## 
##     %->%, %<-%
library(Seurat)
library(devtools)
## Loading required package: usethis
library(NMF)
## Loading required package: pkgmaker
## Loading required package: registry
## Loading required package: rngtools
## Loading required package: cluster
## NMF - BioConductor layer [OK] | Shared memory capabilities [NO: bigmemory] | Cores 15/16
##   To enable shared memory capabilities, try: install.extras('
## NMF
## ')
## 
## Attaching package: 'NMF'
## The following object is masked from 'package:future':
## 
##     run
## The following objects are masked from 'package:igraph':
## 
##     algorithm, compare
library(ggalluvial)
pbmc <- readRDS("/mnt/nectar_volume/home/eraz0001/KELLY 2020/E11.5/Final_15_clusters.RDS")
data.input <- GetAssayData(pbmc, assay = "RNA", slot = "data")
labels <- Idents(pbmc)
meta <- data.frame(group = labels, row.names = names(labels))
cellchat <- createCellChat(object = data.input, meta = meta, group.by = "group")
## Create a CellChat object from a data matrix
## Set cell identities for the new CellChat object
## The cell groups used for CellChat analysis are  DCh Osteocytes Osteoblast HtCh Osteoblasts Endothelial Cells Hoxd13+ Chondrocytes Terminal HTCh Fibroblasts Immune cells
groupSize <- as.numeric(table(cellchat@idents))
groupSize
##  [1] 553 199 194 190 339 319 148 133 118 102  38
CellChatDB <- CellChatDB.mouse
showDatabaseCategory(CellChatDB)

dplyr::glimpse(CellChatDB$interaction)
## Rows: 2,019
## Columns: 11
## $ interaction_name   <chr> "TGFB1_TGFBR1_TGFBR2", "TGFB2_TGFBR1_TGFBR2", "TGFB…
## $ pathway_name       <chr> "TGFb", "TGFb", "TGFb", "TGFb", "TGFb", "TGFb", "TG…
## $ ligand             <chr> "Tgfb1", "Tgfb2", "Tgfb3", "Tgfb1", "Tgfb1", "Tgfb2…
## $ receptor           <chr> "TGFbR1_R2", "TGFbR1_R2", "TGFbR1_R2", "ACVR1B_TGFb…
## $ agonist            <chr> "TGFb agonist", "TGFb agonist", "TGFb agonist", "TG…
## $ antagonist         <chr> "TGFb antagonist", "TGFb antagonist", "TGFb antagon…
## $ co_A_receptor      <chr> "", "", "", "", "", "", "", "", "", "", "", "", "",…
## $ co_I_receptor      <chr> "TGFb inhibition receptor", "TGFb inhibition recept…
## $ evidence           <chr> "KEGG: mmu04350", "KEGG: mmu04350", "KEGG: mmu04350…
## $ annotation         <chr> "Secreted Signaling", "Secreted Signaling", "Secret…
## $ interaction_name_2 <chr> "Tgfb1 - (Tgfbr1+Tgfbr2)", "Tgfb2  - (Tgfbr1+Tgfbr2…
CellChatDB.use <- subsetDB(CellChatDB, search = "Secreted Signaling")

set the used database in the object

cellchat@DB <- CellChatDB.use

Preprocessing the expression data for cell-cell communication analysis

# subset the expression data of signaling genes for saving computation cost
cellchat <- subsetData(cellchat)
future::plan("multiprocess", workers = 2)
cellchat <- identifyOverExpressedGenes(cellchat, data.input)
cellchat <- identifyOverExpressedInteractions(cellchat)
cellchat <- projectData(cellchat, PPI.mouse)

Part II: Inference of cell-cell communication network

Compute the communication probability and infer cellular communication network

cellchat <- computeCommunProb(cellchat)
cellchat <- filterCommunication(cellchat, min.cells = 10)
cellchat <- computeCommunProbPathway(cellchat)
cellchat <- aggregateNet(cellchat)
groupSize <- as.numeric(table(cellchat@idents))
par(mfrow = c(1,2), xpd=TRUE)
netVisual_circle(cellchat@net$count, vertex.weight = groupSize, weight.scale = T, label.edge= T, title.name = "Number of Interactions")
netVisual_circle(cellchat@net$weight, vertex.weight = groupSize, weight.scale = T, label.edge= T, title.name = "Interaction Weights/Strength")

mat <- cellchat@net$weight
par(mfrow = c(3,4), xpd=TRUE)
for (i in 1:nrow(mat)) {
  mat2 <- matrix(0, nrow = nrow(mat), ncol = ncol(mat), dimnames = dimnames(mat))
  mat2[i, ] <- mat[i, ]
  netVisual_circle(mat2, vertex.weight = groupSize, weight.scale = T, edge.weight.max = max(mat), title.name = rownames(mat)[i])
}

cellchat@netP[["pathways"]]
##  [1] "MK"       "ANGPTL"   "PTN"      "ncWNT"    "BMP"      "MIF"     
##  [7] "PDGF"     "WNT"      "VISFATIN" "SEMA3"    "FGF"      "VEGF"    
## [13] "GALECTIN" "IGF"      "APELIN"   "CXCL"     "PROS"     "GAS"     
## [19] "GDF"      "ANGPT"    "KIT"      "EGF"      "CCL"
pathways.show <- c("MK")
vertex.receiver = seq(1,4)
netVisual_aggregate(cellchat, signaling = pathways.show,  vertex.receiver = vertex.receiver, layout = "hierarchy")

# Circle plot
par(mfrow=c(1,1))
netVisual_aggregate(cellchat, signaling = pathways.show, layout = "circle")

Heatmap

par(mfrow=c(1,1))
netVisual_heatmap(cellchat, signaling = pathways.show, color.heatmap = "Reds")
## Do heatmap based on a single object

netAnalysis_contribution(cellchat, signaling = pathways.show <- c("MK"), title = "Contribution of each L-R/all")

netAnalysis_contribution(cellchat, signaling = pathways.show <- c(cellchat@netP[["pathways"]]), title = "Contribution of each L-R/all")

pairLR1 <- extractEnrichedLR(cellchat, signaling = pathways.show, geneLR.return = FALSE)
LR.show <- pairLR1[2,] # show one ligand-receptor pair
# Hierarchy plot
vertex.receiver = seq(1,4) # a numeric vector
netVisual_individual(cellchat, signaling = pathways.show,  pairLR.use = LR.show, vertex.receiver = vertex.receiver, layout = "hierarchy")

# Circle plot
netVisual_individual(cellchat, signaling = pathways.show, pairLR.use = LR.show, layout = "circle")

## [[1]]
# Chord diagram
netVisual_individual(cellchat, signaling = pathways.show, pairLR.use = LR.show, layout = "chord")

## [[1]]
netVisual_bubble(cellchat, sources.use = 7, targets.use = c(1:11), remove.isolate = FALSE,font.size.title = 15)
## Comparing communications on a single object

netVisual_bubble(cellchat, sources.use= 7, targets.use = c(1:5,7), signaling = cellchat@netP[["pathways"]], remove.isolate = T)
## Comparing communications on a single object

pairLR.use <- extractEnrichedLR(cellchat, signaling = cellchat@netP[["pathways"]])
netVisual_bubble(cellchat, sources.use = c(1:8), targets.use = c(1:8), pairLR.use = pairLR.use, remove.isolate = TRUE)
## Comparing communications on a single object

netVisual_chord_gene(cellchat, sources.use = 6, targets.use = c(1:7), legend.pos.x = 15)

netVisual_chord_gene(cellchat, sources.use=7, targets.use = c(1:7), signaling = c("MK"), legend.pos.x = 8)
## You may try the function `netVisual_chord_cell` for visualizing individual signaling pathway

show all the significant signaling pathways from some cell groups (defined by ‘sources.use’) to other cell groups (defined by ‘targets.use’)

netVisual_chord_gene(cellchat, sources.use = 7, targets.use = c(1:11), slot.name = "netP", legend.pos.x = 10)

## Plot the signaling gene expression distribution using violin/dot plot

plotGeneExpression(cellchat, signaling = cellchat@netP[["pathways"]])
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.

plotGeneExpression(cellchat, signaling = "MK", enriched.only = FALSE)
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.

pathways.show <- cellchat@netP[["pathways"]]
cellchat <- netAnalysis_computeCentrality(cellchat, slot.name = "netP") 
netAnalysis_signalingRole_network(cellchat, signaling = pathways.show, width = 8, height = 2.5, font.size = 15, font.size.title = 12)

gg2 = # Signaling role analysis on the cell-cell communication networks of interest

gg1 <- netAnalysis_signalingRole_scatter(cellchat)
## Signaling role analysis on the aggregated cell-cell communication network from all signaling pathways
gg2 <- netAnalysis_signalingRole_scatter(cellchat, signaling = c("SEMA3", "IGF"))
## Signaling role analysis on the cell-cell communication network from user's input
gg1 + gg2

# Signaling role analysis on the aggregated cell-cell communication network from all signaling pathways
ht1 <- netAnalysis_signalingRole_heatmap(cellchat, pattern = "outgoing")
ht2 <- netAnalysis_signalingRole_heatmap(cellchat, pattern = "incoming")
ht1 + ht2

library(NMF)
library(ggalluvial)
selectK(cellchat, pattern = "outgoing")

nPatterns = 7
cellchat <- identifyCommunicationPatterns(cellchat, pattern = "outgoing", k = nPatterns)

netAnalysis_river(cellchat, pattern = "outgoing",font.size = 3)
## Please make sure you have load `library(ggalluvial)` when running this function

netAnalysis_dot(cellchat, pattern = "outgoing")

Identify and visualize incoming communication pattern of target cells

selectK(cellchat, pattern = "incoming")

#Cophenetic values begin to drop when the number of incoming patterns is 4.

nPatterns = 4
cellchat <- identifyCommunicationPatterns(cellchat, pattern = "incoming", k = nPatterns)

netAnalysis_river(cellchat, pattern = "incoming")
## Please make sure you have load `library(ggalluvial)` when running this function

session_info()
## ─ Session info ───────────────────────────────────────────────────────────────
##  setting  value
##  version  R version 4.0.2 (2020-06-22)
##  os       Ubuntu 20.04.3 LTS
##  system   x86_64, linux-gnu
##  ui       X11
##  language (EN)
##  collate  en_AU.UTF-8
##  ctype    en_AU.UTF-8
##  tz       Australia/Melbourne
##  date     2022-03-16
##  pandoc   2.11.4 @ /usr/lib/rstudio-server/bin/pandoc/ (via rmarkdown)
## 
## ─ Packages ───────────────────────────────────────────────────────────────────
##  package         * version  date (UTC) lib source
##  abind             1.4-5    2016-07-21 [1] CRAN (R 4.0.2)
##  assertthat        0.2.1    2019-03-21 [1] CRAN (R 4.0.2)
##  Biobase         * 2.50.0   2020-10-27 [1] Bioconductor
##  BiocGenerics    * 0.36.1   2021-04-16 [1] Bioconductor
##  BiocManager       1.30.16  2021-06-15 [1] CRAN (R 4.0.2)
##  brio              1.1.3    2021-11-30 [1] CRAN (R 4.0.2)
##  bslib             0.3.1    2021-10-06 [1] CRAN (R 4.0.2)
##  cachem            1.0.6    2021-08-19 [1] CRAN (R 4.0.2)
##  Cairo             1.5-14   2021-12-21 [1] CRAN (R 4.0.2)
##  callr             3.7.0    2021-04-20 [1] CRAN (R 4.0.2)
##  CellChat        * 1.1.3    2022-02-02 [1] Github (sqjin/CellChat@764ebb8)
##  circlize          0.4.14   2022-02-03 [1] Github (jokergoo/circlize@14116da)
##  cli               3.1.1    2022-01-20 [1] CRAN (R 4.0.2)
##  clue              0.3-60   2021-10-11 [1] CRAN (R 4.0.2)
##  cluster         * 2.1.0    2019-06-19 [2] CRAN (R 4.0.2)
##  coda              0.19-4   2020-09-30 [1] CRAN (R 4.0.2)
##  codetools         0.2-16   2018-12-24 [2] CRAN (R 4.0.2)
##  colorspace        2.0-2    2021-06-24 [1] CRAN (R 4.0.2)
##  ComplexHeatmap    2.6.2    2020-11-12 [1] Bioconductor
##  cowplot           1.1.1    2020-12-30 [1] CRAN (R 4.0.2)
##  crayon            1.4.2    2021-10-29 [1] CRAN (R 4.0.2)
##  data.table        1.14.2   2021-09-27 [1] CRAN (R 4.0.2)
##  DBI               1.1.2    2021-12-20 [1] CRAN (R 4.0.2)
##  deldir            1.0-6    2021-10-23 [1] CRAN (R 4.0.2)
##  desc              1.4.0    2021-09-28 [1] CRAN (R 4.0.2)
##  devtools        * 2.4.3    2021-11-30 [1] CRAN (R 4.0.2)
##  digest            0.6.29   2021-12-01 [1] CRAN (R 4.0.2)
##  doParallel      * 1.0.16   2020-10-16 [1] CRAN (R 4.0.2)
##  dplyr           * 1.0.7    2021-06-18 [1] CRAN (R 4.0.2)
##  ellipsis          0.3.2    2021-04-29 [1] CRAN (R 4.0.2)
##  evaluate          0.14     2019-05-28 [1] CRAN (R 4.0.2)
##  fansi             1.0.2    2022-01-14 [1] CRAN (R 4.0.2)
##  farver            2.1.0    2021-02-28 [1] CRAN (R 4.0.2)
##  fastmap           1.1.0    2021-01-25 [1] CRAN (R 4.0.2)
##  fitdistrplus      1.1-6    2021-09-28 [1] CRAN (R 4.0.2)
##  FNN               1.1.3    2019-02-15 [1] CRAN (R 4.0.2)
##  forcats           0.5.1    2021-01-27 [1] CRAN (R 4.0.2)
##  foreach         * 1.5.2    2022-02-02 [1] CRAN (R 4.0.2)
##  fs                1.5.2    2021-12-08 [1] CRAN (R 4.0.2)
##  future          * 1.23.0   2021-10-31 [1] CRAN (R 4.0.2)
##  future.apply      1.8.1    2021-08-10 [1] CRAN (R 4.0.2)
##  generics          0.1.2    2022-01-31 [1] CRAN (R 4.0.2)
##  GetoptLong        1.0.5    2020-12-15 [1] CRAN (R 4.0.2)
##  ggalluvial      * 0.12.3   2020-12-05 [1] CRAN (R 4.0.2)
##  ggplot2         * 3.3.5    2021-06-25 [1] CRAN (R 4.0.2)
##  ggrepel           0.9.1    2021-01-15 [1] CRAN (R 4.0.2)
##  ggridges          0.5.3    2021-01-08 [1] CRAN (R 4.0.2)
##  GlobalOptions     0.1.2    2020-06-10 [1] CRAN (R 4.0.2)
##  globals           0.14.0   2020-11-22 [1] CRAN (R 4.0.2)
##  glue              1.6.1    2022-01-22 [1] CRAN (R 4.0.2)
##  goftest           1.2-3    2021-10-07 [1] CRAN (R 4.0.2)
##  gridBase          0.4-7    2014-02-24 [1] CRAN (R 4.0.2)
##  gridExtra         2.3      2017-09-09 [1] CRAN (R 4.0.2)
##  gtable            0.3.0    2019-03-25 [1] CRAN (R 4.0.2)
##  highr             0.9      2021-04-16 [1] CRAN (R 4.0.2)
##  htmltools         0.5.2    2021-08-25 [1] CRAN (R 4.0.2)
##  htmlwidgets       1.5.4    2021-09-08 [1] CRAN (R 4.0.2)
##  httpuv            1.6.5    2022-01-05 [1] CRAN (R 4.0.2)
##  httr              1.4.2    2020-07-20 [1] CRAN (R 4.0.2)
##  ica               1.0-2    2018-05-24 [1] CRAN (R 4.0.2)
##  igraph          * 1.2.11   2022-01-04 [1] CRAN (R 4.0.2)
##  IRanges           2.24.1   2020-12-12 [1] Bioconductor
##  irlba             2.3.5    2021-12-06 [1] CRAN (R 4.0.2)
##  iterators       * 1.0.13   2020-10-15 [1] CRAN (R 4.0.2)
##  jquerylib         0.1.4    2021-04-26 [1] CRAN (R 4.0.2)
##  jsonlite          1.7.3    2022-01-17 [1] CRAN (R 4.0.2)
##  KernSmooth        2.23-17  2020-04-26 [2] CRAN (R 4.0.2)
##  knitr             1.37     2021-12-16 [1] CRAN (R 4.0.2)
##  labeling          0.4.2    2020-10-20 [1] CRAN (R 4.0.2)
##  later             1.3.0    2021-08-18 [1] CRAN (R 4.0.2)
##  lattice           0.20-41  2020-04-02 [2] CRAN (R 4.0.2)
##  lazyeval          0.2.2    2019-03-15 [1] CRAN (R 4.0.2)
##  leiden            0.3.9    2021-07-27 [1] CRAN (R 4.0.2)
##  lifecycle         1.0.1    2021-09-24 [1] CRAN (R 4.0.2)
##  listenv           0.8.0    2019-12-05 [1] CRAN (R 4.0.2)
##  lmtest            0.9-39   2021-11-07 [1] CRAN (R 4.0.2)
##  magick            2.7.3    2021-08-18 [1] CRAN (R 4.0.2)
##  magrittr          2.0.2    2022-01-26 [1] CRAN (R 4.0.2)
##  MASS              7.3-51.6 2020-04-26 [2] CRAN (R 4.0.2)
##  Matrix            1.4-0    2021-12-08 [1] CRAN (R 4.0.2)
##  matrixStats       0.61.0   2021-09-17 [1] CRAN (R 4.0.2)
##  memoise           2.0.1    2021-11-26 [1] CRAN (R 4.0.2)
##  mgcv              1.8-31   2019-11-09 [2] CRAN (R 4.0.2)
##  mime              0.12     2021-09-28 [1] CRAN (R 4.0.2)
##  miniUI            0.1.1.1  2018-05-18 [1] CRAN (R 4.0.2)
##  munsell           0.5.0    2018-06-12 [1] CRAN (R 4.0.2)
##  network           1.17.1   2021-06-14 [1] CRAN (R 4.0.2)
##  nlme              3.1-148  2020-05-24 [2] CRAN (R 4.0.2)
##  NMF             * 0.23.0   2020-08-01 [1] CRAN (R 4.0.2)
##  parallelly        1.30.0   2021-12-17 [1] CRAN (R 4.0.2)
##  patchwork       * 1.1.1    2020-12-17 [1] CRAN (R 4.0.2)
##  pbapply           1.5-0    2021-09-16 [1] CRAN (R 4.0.2)
##  pillar            1.7.0    2022-02-01 [1] CRAN (R 4.0.2)
##  pkgbuild          1.3.1    2021-12-20 [1] CRAN (R 4.0.2)
##  pkgconfig         2.0.3    2019-09-22 [1] CRAN (R 4.0.2)
##  pkgload           1.2.4    2021-11-30 [1] CRAN (R 4.0.2)
##  pkgmaker        * 0.32.2   2020-10-20 [1] CRAN (R 4.0.2)
##  plotly            4.10.0   2021-10-09 [1] CRAN (R 4.0.2)
##  plyr              1.8.6    2020-03-03 [1] CRAN (R 4.0.2)
##  png               0.1-7    2013-12-03 [1] CRAN (R 4.0.2)
##  polyclip          1.10-0   2019-03-14 [1] CRAN (R 4.0.2)
##  prettyunits       1.1.1    2020-01-24 [1] CRAN (R 4.0.2)
##  processx          3.5.2    2021-04-30 [1] CRAN (R 4.0.2)
##  promises          1.2.0.1  2021-02-11 [1] CRAN (R 4.0.2)
##  ps                1.6.0    2021-02-28 [1] CRAN (R 4.0.2)
##  purrr             0.3.4    2020-04-17 [1] CRAN (R 4.0.2)
##  R.methodsS3       1.8.1    2020-08-26 [1] CRAN (R 4.0.2)
##  R.oo              1.24.0   2020-08-26 [1] CRAN (R 4.0.2)
##  R.utils           2.11.0   2021-09-26 [1] CRAN (R 4.0.2)
##  R6                2.5.1    2021-08-19 [1] CRAN (R 4.0.2)
##  RANN              2.6.1    2019-01-08 [1] CRAN (R 4.0.2)
##  RColorBrewer      1.1-2    2014-12-07 [1] CRAN (R 4.0.2)
##  Rcpp              1.0.8    2022-01-13 [1] CRAN (R 4.0.2)
##  RcppAnnoy         0.0.19   2021-07-30 [1] CRAN (R 4.0.2)
##  registry        * 0.5-1    2019-03-05 [1] CRAN (R 4.0.2)
##  remotes           2.4.2    2021-11-30 [1] CRAN (R 4.0.2)
##  reshape2          1.4.4    2020-04-09 [1] CRAN (R 4.0.2)
##  reticulate        1.24     2022-01-26 [1] CRAN (R 4.0.2)
##  rjson             0.2.21   2022-01-09 [1] CRAN (R 4.0.2)
##  rlang             1.0.0    2022-01-26 [1] CRAN (R 4.0.2)
##  rmarkdown         2.11     2021-09-14 [1] CRAN (R 4.0.2)
##  rngtools        * 1.5.2    2021-09-20 [1] CRAN (R 4.0.2)
##  ROCR              1.0-11   2020-05-02 [1] CRAN (R 4.0.2)
##  rpart             4.1-15   2019-04-12 [2] CRAN (R 4.0.2)
##  rprojroot         2.0.2    2020-11-15 [1] CRAN (R 4.0.2)
##  RSpectra          0.16-0   2019-12-01 [1] CRAN (R 4.0.2)
##  rstudioapi        0.13     2020-11-12 [1] CRAN (R 4.0.2)
##  rsvd              1.0.5    2021-04-16 [1] CRAN (R 4.0.2)
##  Rtsne             0.15     2018-11-10 [1] CRAN (R 4.0.2)
##  S4Vectors         0.28.1   2020-12-09 [1] Bioconductor
##  sass              0.4.0    2021-05-12 [1] CRAN (R 4.0.2)
##  scales            1.1.1    2020-05-11 [1] CRAN (R 4.0.2)
##  scattermore       0.7      2020-11-24 [1] CRAN (R 4.0.2)
##  sctransform       0.3.3    2022-01-13 [1] CRAN (R 4.0.2)
##  sessioninfo       1.2.2    2021-12-06 [1] CRAN (R 4.0.2)
##  Seurat          * 4.1.0    2022-01-14 [1] CRAN (R 4.0.2)
##  SeuratObject    * 4.0.4    2021-11-23 [1] CRAN (R 4.0.2)
##  SeuratWrappers  * 0.3.0    2022-02-02 [1] Github (satijalab/seurat-wrappers@8510069)
##  shape             1.4.6    2021-05-19 [1] CRAN (R 4.0.2)
##  shiny             1.7.1    2021-10-02 [1] CRAN (R 4.0.2)
##  sna               2.6      2020-10-06 [1] CRAN (R 4.0.2)
##  spatstat.core     2.3-2    2021-11-26 [1] CRAN (R 4.0.2)
##  spatstat.data     2.1-2    2021-12-17 [1] CRAN (R 4.0.2)
##  spatstat.geom     2.3-1    2021-12-10 [1] CRAN (R 4.0.2)
##  spatstat.sparse   2.1-0    2021-12-17 [1] CRAN (R 4.0.2)
##  spatstat.utils    2.3-0    2021-12-12 [1] CRAN (R 4.0.2)
##  statnet.common    4.5.0    2021-06-05 [1] CRAN (R 4.0.2)
##  stringi           1.7.6    2021-11-29 [1] CRAN (R 4.0.2)
##  stringr           1.4.0    2019-02-10 [1] CRAN (R 4.0.2)
##  survival          3.1-12   2020-04-10 [2] CRAN (R 4.0.2)
##  svglite           2.0.0    2021-02-20 [1] CRAN (R 4.0.2)
##  systemfonts       1.0.3    2021-10-13 [1] CRAN (R 4.0.2)
##  tensor            1.5      2012-05-05 [1] CRAN (R 4.0.2)
##  testthat          3.1.2    2022-01-20 [1] CRAN (R 4.0.2)
##  tibble            3.1.6    2021-11-07 [1] CRAN (R 4.0.2)
##  tidyr             1.2.0    2022-02-01 [1] CRAN (R 4.0.2)
##  tidyselect        1.1.1    2021-04-30 [1] CRAN (R 4.0.2)
##  usethis         * 2.1.5    2021-12-09 [1] CRAN (R 4.0.2)
##  utf8              1.2.2    2021-07-24 [1] CRAN (R 4.0.2)
##  uwot              0.1.11   2021-12-02 [1] CRAN (R 4.0.2)
##  vctrs             0.3.8    2021-04-29 [1] CRAN (R 4.0.2)
##  viridisLite       0.4.0    2021-04-13 [1] CRAN (R 4.0.2)
##  withr             2.4.3    2021-11-30 [1] CRAN (R 4.0.2)
##  xfun              0.29     2021-12-14 [1] CRAN (R 4.0.2)
##  xtable            1.8-4    2019-04-21 [1] CRAN (R 4.0.2)
##  yaml              2.2.2    2022-01-25 [1] CRAN (R 4.0.2)
##  zoo               1.8-9    2021-03-09 [1] CRAN (R 4.0.2)
## 
##  [1] /mnt/nectar_volume/home/eraz0001/R/x86_64-pc-linux-gnu-library/4.0
##  [2] /mnt/nectar_volume/software/apps/R/4.0.2/lib/R/library
## 
## ──────────────────────────────────────────────────────────────────────────────