├── .gitattributes ├── CellChat.Rproj ├── CellChat_Logo.png ├── DESCRIPTION ├── LICENSE ├── NAMESPACE ├── NEWS.md ├── R ├── CellChat-package.R ├── CellChat_class.R ├── RcppExports.R ├── analysis.R ├── app.R ├── data.R ├── database.R ├── modeling.R ├── utilities.R └── visualization.R ├── README.md ├── data ├── CellChatDB.human.rda ├── CellChatDB.mouse.rda ├── CellChatDB.zebrafish.rda ├── PPI.human.rda └── PPI.mouse.rda ├── man ├── AnyMatrix-class.Rd ├── CellChat-class.Rd ├── CellChatDB.human.Rd ├── CellChatDB.mouse.Rd ├── CellChatDB.zebrafish.Rd ├── CellChat_theme_opts.Rd ├── PPI.human.Rd ├── PPI.mouse.Rd ├── StackedVlnPlot.Rd ├── addMeta.Rd ├── addReduction.Rd ├── aggregateNet.Rd ├── alpha_centrality.Rd ├── barPlot.Rd ├── barplot_internal.Rd ├── buildSNN.Rd ├── checkGeneSymbol.Rd ├── colorRamp3.Rd ├── compareInteractions.Rd ├── computeAveExpr.Rd ├── computeCellDistance.Rd ├── computeCentralityLocal.Rd ├── computeCommunProb.Rd ├── computeCommunProbPathway.Rd ├── computeEigengap.Rd ├── computeEnrichmentScore.Rd ├── computeExprGroup_agonist.Rd ├── computeExprGroup_antagonist.Rd ├── computeExpr_LR.Rd ├── computeExpr_agonist.Rd ├── computeExpr_antagonist.Rd ├── computeExpr_complex.Rd ├── computeExpr_coreceptor.Rd ├── computeLaplacian.Rd ├── computeNetD_structure.Rd ├── computeNetSimilarity.Rd ├── computeNetSimilarityPairwise.Rd ├── computeRegionDistance.Rd ├── createCellChat.Rd ├── dotPlot.Rd ├── entropia.Rd ├── extractEnrichedLR.Rd ├── extractEnrichedLR_internal.Rd ├── extractGene.Rd ├── extractGeneSubset.Rd ├── extractGeneSubsetFromPair.Rd ├── extractLRfromGenes.Rd ├── extract_max.Rd ├── filterCommunication.Rd ├── findEnrichedSignaling.Rd ├── geometricMean.Rd ├── getMaxWeight.Rd ├── ggPalette.Rd ├── identifyCommunicationPatterns.Rd ├── identifyEnrichedInteractions.Rd ├── identifyOverExpressedGenes.Rd ├── identifyOverExpressedInteractions.Rd ├── identifyOverExpressedLigandReceptor.Rd ├── l1NormalizeColumns.Rd ├── l1NormalizeRows.Rd ├── liftCellChat.Rd ├── mergeCellChat.Rd ├── mergeInteractions.Rd ├── modify_vlnplot.Rd ├── mycircle.Rd ├── netAnalysis_computeCentrality.Rd ├── netAnalysis_contribution.Rd ├── netAnalysis_diff_signalingRole_scatter.Rd ├── netAnalysis_dot.Rd ├── netAnalysis_river.Rd ├── netAnalysis_signalingChanges_scatter.Rd ├── netAnalysis_signalingRole_heatmap.Rd ├── netAnalysis_signalingRole_network.Rd ├── netAnalysis_signalingRole_scatter.Rd ├── netClustering.Rd ├── netEmbedding.Rd ├── netMappingDEG.Rd ├── netVisual.Rd ├── netVisual_aggregate.Rd ├── netVisual_barplot.Rd ├── netVisual_bubble.Rd ├── netVisual_chord_cell.Rd ├── netVisual_chord_cell_internal.Rd ├── netVisual_chord_gene.Rd ├── netVisual_circle.Rd ├── netVisual_diffInteraction.Rd ├── netVisual_embedding.Rd ├── netVisual_embeddingPairwise.Rd ├── netVisual_embeddingPairwiseZoomIn.Rd ├── netVisual_embeddingZoomIn.Rd ├── netVisual_heatmap.Rd ├── netVisual_hierarchy1.Rd ├── netVisual_hierarchy2.Rd ├── netVisual_individual.Rd ├── netVisual_spatial.Rd ├── nnd.Rd ├── node_distance.Rd ├── normalizeData.Rd ├── pieChart.Rd ├── plotGeneExpression.Rd ├── preProcMultiomics.Rd ├── projectAndRecombine.Rd ├── projectFromNetworkRecombine.Rd ├── projectOnNetwork.Rd ├── randomWalkBySolve.Rd ├── rankNet.Rd ├── rankNetPairwise.Rd ├── rankSimilarity.Rd ├── runCellChatApp.Rd ├── runPCA.Rd ├── runUMAP.Rd ├── scPalette.Rd ├── scaleData.Rd ├── scaleMat.Rd ├── searchPair.Rd ├── selectK.Rd ├── setIdent.Rd ├── show-CellChat-method.Rd ├── showDatabaseCategory.Rd ├── sketchData.Rd ├── smoothData.Rd ├── spatialDimPlot.Rd ├── spatialFeaturePlot.Rd ├── subsetCellChat.Rd ├── subsetCommunication.Rd ├── subsetCommunication_internal.Rd ├── subsetDB.Rd ├── subsetData.Rd ├── thresholdedMean.Rd ├── triMean.Rd ├── updateCCC_score.Rd ├── updateCellChat.Rd ├── updateCellChatDB.Rd └── updateClusterLabels.Rd ├── overview_CellChat.png ├── src ├── CellChat.so ├── CellChat_Rcpp.cpp ├── CellChat_Rcpp.o ├── RcppExports.cpp └── RcppExports.o └── tutorial ├── CellChat-vignette.Rmd ├── CellChat-vignette.html ├── CellChat_analysis_of_multiple_spatial_transcriptomics_datasets.Rmd ├── CellChat_analysis_of_multiple_spatial_transcriptomics_datasets.html ├── CellChat_analysis_of_spatial_multiomics_data.Rmd ├── CellChat_analysis_of_spatial_multiomics_data.html ├── CellChat_analysis_of_spatial_transcriptomics_data.Rmd ├── CellChat_analysis_of_spatial_transcriptomics_data.html ├── Comparison_analysis_of_multiple_datasets.Rmd ├── Comparison_analysis_of_multiple_datasets.html ├── Comparison_analysis_of_multiple_datasets_with_different_cellular_compositions.Rmd ├── Comparison_analysis_of_multiple_datasets_with_different_cellular_compositions.html ├── FAQ_on_applying_CellChat_to_spatial_transcriptomics_data.Rmd ├── FAQ_on_applying_CellChat_to_spatial_transcriptomics_data.html ├── Interface_with_other_single-cell_analysis_toolkits.Rmd ├── Interface_with_other_single-cell_analysis_toolkits.html ├── Update-CellChatDB.Rmd └── Update-CellChatDB.html /.gitattributes: -------------------------------------------------------------------------------- 1 | *.html -linguist-detectable 2 | -------------------------------------------------------------------------------- /CellChat.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | AutoAppendNewline: Yes 16 | StripTrailingWhitespace: Yes 17 | 18 | BuildType: Package 19 | PackageUseDevtools: Yes 20 | PackageInstallArgs: --no-multiarch --with-keep.source 21 | -------------------------------------------------------------------------------- /CellChat_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jinworks/CellChat/346fb615aaefa3c1a2830ec2fe3a933c5f723c83/CellChat_Logo.png -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: CellChat 2 | Type: Package 3 | Title: Inference and analysis of cell-cell communication from single-cell and spatially resolved transcriptomics data 4 | Version: 2.2.0 5 | Author: Suoqin Jin 6 | Maintainer: Suoqin Jin 7 | Description: an open source R tool that infers, visualizes and analyzes the cell-cell communication networks from scRNA-seq and spatially resolved transcriptomics data. 8 | Depends: R (>= 3.6.0),dplyr,igraph,ggplot2 9 | License: GPL-3 10 | Encoding: UTF-8 11 | LazyData: TRUE 12 | Imports: 13 | future, 14 | future.apply, 15 | pbapply, 16 | irlba, 17 | NMF (>= 0.23.0), 18 | ggalluvial, 19 | stringr, 20 | svglite, 21 | Matrix, 22 | ggrepel, 23 | circlize (>= 0.4.12), 24 | RColorBrewer, 25 | cowplot, 26 | methods, 27 | ComplexHeatmap, 28 | RSpectra, 29 | Rcpp, 30 | reticulate, 31 | scales, 32 | sna, 33 | reshape2, 34 | FNN, 35 | shape, 36 | BiocGenerics, 37 | magrittr, 38 | patchwork, 39 | colorspace, 40 | plyr, 41 | ggpubr, 42 | ggnetwork, 43 | BiocNeighbors, 44 | plotly,shiny,bslib 45 | LinkingTo: Rcpp, RcppEigen 46 | Suggests: 47 | rmarkdown, knitr, roxygen2, Seurat (>= 4.0.0), SingleCellExperiment, SummarizedExperiment, purrr,uwot,gg.gap,wordcloud,bsicons,presto,tidyverse,tidyr,rlang 48 | RoxygenNote: 7.3.1 49 | VignetteBuilder: knitr 50 | -------------------------------------------------------------------------------- /R/CellChat-package.R: -------------------------------------------------------------------------------- 1 | ## usethis namespace: start 2 | #' @useDynLib CellChat, .registration = TRUE 3 | ## usethis namespace: end 4 | NULL 5 | 6 | ## usethis namespace: start 7 | #' @importFrom Rcpp sourceCpp 8 | ## usethis namespace: end 9 | NULL 10 | -------------------------------------------------------------------------------- /R/RcppExports.R: -------------------------------------------------------------------------------- 1 | # Generated by using Rcpp::compileAttributes() -> do not edit by hand 2 | # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 3 | 4 | ComputeSNN <- function(nn_ranked, prune) { 5 | .Call(`_CellChat_ComputeSNN`, nn_ranked, prune) 6 | } 7 | 8 | -------------------------------------------------------------------------------- /R/data.R: -------------------------------------------------------------------------------- 1 | #' Ligand-receptor interactions in CellChat database for mouse 2 | #' 3 | #' The ligand-receptor interaction database curated in CellChat tool 4 | #' 5 | #' @format A list includes the ligand-receptor interactions 6 | #' @source \url{https://github.com/sqjin/CellChat/} 7 | "CellChatDB.mouse" 8 | 9 | #' Ligand-receptor interactions in CellChat database for human 10 | #' 11 | #' The ligand-receptor interaction database curated in CellChat tool 12 | #' 13 | #' @format A list includes the ligand-receptor interactions 14 | #' @source \url{https://github.com/sqjin/CellChat/} 15 | "CellChatDB.human" 16 | 17 | #' Mouse Protein-Protein interactions 18 | #' 19 | #' An adjacency matrix of the high confidence known experimental interactions 20 | #' between mouse proteins on STRINGdb. 21 | #' 22 | #' @format A square matrix where A_{ij}=1 if protein i interacts with protein j 23 | #' @source \url{http://www.string-db.org/} 24 | "PPI.mouse" 25 | 26 | #' Ligand-receptor interactions in CellChat database for Zebrafish 27 | #' 28 | #' The ligand-receptor interaction database curated in CellChat tool 29 | #' 30 | #' @format A list includes the ligand-receptor interactions 31 | #' @source \url{https://github.com/sqjin/CellChat/} 32 | "CellChatDB.zebrafish" 33 | 34 | #' Human Protein-Protein interactions 35 | #' 36 | #' An adjacency matrix of the high confidence known experimental interactions 37 | #' between human proteins on STRINGdb. 38 | #' 39 | #' @format A square matrix where A_{ij}=1 if protein i interacts with protein j 40 | #' @source \url{http://www.string-db.org/} 41 | "PPI.human" 42 | -------------------------------------------------------------------------------- /data/CellChatDB.human.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jinworks/CellChat/346fb615aaefa3c1a2830ec2fe3a933c5f723c83/data/CellChatDB.human.rda -------------------------------------------------------------------------------- /data/CellChatDB.mouse.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jinworks/CellChat/346fb615aaefa3c1a2830ec2fe3a933c5f723c83/data/CellChatDB.mouse.rda -------------------------------------------------------------------------------- /data/CellChatDB.zebrafish.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jinworks/CellChat/346fb615aaefa3c1a2830ec2fe3a933c5f723c83/data/CellChatDB.zebrafish.rda -------------------------------------------------------------------------------- /data/PPI.human.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jinworks/CellChat/346fb615aaefa3c1a2830ec2fe3a933c5f723c83/data/PPI.human.rda -------------------------------------------------------------------------------- /data/PPI.mouse.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jinworks/CellChat/346fb615aaefa3c1a2830ec2fe3a933c5f723c83/data/PPI.mouse.rda -------------------------------------------------------------------------------- /man/AnyMatrix-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CellChat_class.R 3 | \docType{class} 4 | \name{AnyMatrix-class} 5 | \alias{AnyMatrix-class} 6 | \title{The CellChat Class} 7 | \description{ 8 | The CellChat object is created from a single-cell transcriptomic data matrix, Seurat V3 or SingleCellExperiment object. 9 | When inputting an data matrix, it takes a digital data matrices as input. Genes should be in rows and cells in columns. rownames and colnames should be included. 10 | The class provides functions for data preprocessing, intercellular communication network inference, communication network analysis, and visualization. 11 | } 12 | \details{ 13 | # Class definitions 14 | } 15 | -------------------------------------------------------------------------------- /man/CellChat-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CellChat_class.R 3 | \docType{class} 4 | \name{CellChat-class} 5 | \alias{CellChat-class} 6 | \alias{CellChat} 7 | \title{The key slots used in the CellChat object are described below.} 8 | \description{ 9 | The key slots used in the CellChat object are described below. 10 | } 11 | \section{Slots}{ 12 | 13 | \describe{ 14 | \item{\code{data.raw}}{raw count data matrix} 15 | 16 | \item{\code{data}}{normalized data matrix for CellChat analysis (Genes should be in rows and cells in columns)} 17 | 18 | \item{\code{data.signaling}}{a subset of normalized matrix only containing signaling genes} 19 | 20 | \item{\code{data.scale}}{scaled data matrix} 21 | 22 | \item{\code{data.smooth}}{smoothed data} 23 | 24 | \item{\code{images}}{a list of information of spatial transcriptomics data} 25 | 26 | \item{\code{net}}{a three-dimensional array P (K×K×N), where K is the number of cell groups and N is the number of ligand-receptor pairs. Each row of P indicates the communication probability originating from the sender cell group to other cell groups.} 27 | 28 | \item{\code{netP}}{a three-dimensional array representing cel-cell communication networks on a signaling pathway level} 29 | 30 | \item{\code{DB}}{ligand-receptor interaction database used in the analysis (a subset of CellChatDB)} 31 | 32 | \item{\code{LR}}{a list of information related with ligand-receptor pairs} 33 | 34 | \item{\code{meta}}{data frame storing the information associated with each cell} 35 | 36 | \item{\code{idents}}{a factor defining the cell identity used for all analysis. It becomes a list for a merged CellChat object} 37 | 38 | \item{\code{var.features}}{A list: one element is a vector consisting of the identified over-expressed signaling genes; one element is a data frame returned from the differential expression analysis} 39 | 40 | \item{\code{dr}}{List of the reduced 2D coordinates, one per method, e.g., umap/tsne/dm} 41 | 42 | \item{\code{options}}{List of miscellaneous data, such as parameters used throughout analysis, and a indicator whether the CellChat object is a single or merged} 43 | }} 44 | 45 | -------------------------------------------------------------------------------- /man/CellChatDB.human.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{CellChatDB.human} 5 | \alias{CellChatDB.human} 6 | \title{Ligand-receptor interactions in CellChat database for human} 7 | \format{ 8 | A list includes the ligand-receptor interactions 9 | } 10 | \source{ 11 | \url{https://github.com/sqjin/CellChat/} 12 | } 13 | \usage{ 14 | CellChatDB.human 15 | } 16 | \description{ 17 | The ligand-receptor interaction database curated in CellChat tool 18 | } 19 | \keyword{datasets} 20 | -------------------------------------------------------------------------------- /man/CellChatDB.mouse.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{CellChatDB.mouse} 5 | \alias{CellChatDB.mouse} 6 | \title{Ligand-receptor interactions in CellChat database for mouse} 7 | \format{ 8 | A list includes the ligand-receptor interactions 9 | } 10 | \source{ 11 | \url{https://github.com/sqjin/CellChat/} 12 | } 13 | \usage{ 14 | CellChatDB.mouse 15 | } 16 | \description{ 17 | The ligand-receptor interaction database curated in CellChat tool 18 | } 19 | \keyword{datasets} 20 | -------------------------------------------------------------------------------- /man/CellChatDB.zebrafish.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{CellChatDB.zebrafish} 5 | \alias{CellChatDB.zebrafish} 6 | \title{Ligand-receptor interactions in CellChat database for Zebrafish} 7 | \format{ 8 | A list includes the ligand-receptor interactions 9 | } 10 | \source{ 11 | \url{https://github.com/sqjin/CellChat/} 12 | } 13 | \usage{ 14 | CellChatDB.zebrafish 15 | } 16 | \description{ 17 | The ligand-receptor interaction database curated in CellChat tool 18 | } 19 | \keyword{datasets} 20 | -------------------------------------------------------------------------------- /man/CellChat_theme_opts.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{CellChat_theme_opts} 4 | \alias{CellChat_theme_opts} 5 | \title{ggplot theme in CellChat} 6 | \usage{ 7 | CellChat_theme_opts() 8 | } 9 | \description{ 10 | ggplot theme in CellChat 11 | } 12 | -------------------------------------------------------------------------------- /man/PPI.human.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{PPI.human} 5 | \alias{PPI.human} 6 | \title{Human Protein-Protein interactions} 7 | \format{ 8 | A square matrix where A_{ij}=1 if protein i interacts with protein j 9 | } 10 | \source{ 11 | \url{http://www.string-db.org/} 12 | } 13 | \usage{ 14 | PPI.human 15 | } 16 | \description{ 17 | An adjacency matrix of the high confidence known experimental interactions 18 | between human proteins on STRINGdb. 19 | } 20 | \keyword{datasets} 21 | -------------------------------------------------------------------------------- /man/PPI.mouse.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{PPI.mouse} 5 | \alias{PPI.mouse} 6 | \title{Mouse Protein-Protein interactions} 7 | \format{ 8 | A square matrix where A_{ij}=1 if protein i interacts with protein j 9 | } 10 | \source{ 11 | \url{http://www.string-db.org/} 12 | } 13 | \usage{ 14 | PPI.mouse 15 | } 16 | \description{ 17 | An adjacency matrix of the high confidence known experimental interactions 18 | between mouse proteins on STRINGdb. 19 | } 20 | \keyword{datasets} 21 | -------------------------------------------------------------------------------- /man/StackedVlnPlot.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{StackedVlnPlot} 4 | \alias{StackedVlnPlot} 5 | \title{Stacked Violin plot} 6 | \usage{ 7 | StackedVlnPlot( 8 | object, 9 | features, 10 | idents = NULL, 11 | split.by = NULL, 12 | color.use = NULL, 13 | colors.ggplot = FALSE, 14 | angle.x = 90, 15 | vjust.x = NULL, 16 | hjust.x = NULL, 17 | show.text.y = TRUE, 18 | line.size = NULL, 19 | pt.size = 0, 20 | plot.margin = margin(0, 0, 0, 0, "cm"), 21 | ... 22 | ) 23 | } 24 | \arguments{ 25 | \item{object}{seurat object} 26 | 27 | \item{features}{Features to plot (gene expression, metrics)} 28 | 29 | \item{idents}{Which classes to include in the plot (default is all)} 30 | 31 | \item{split.by}{Name of a metadata column to split plot by;} 32 | 33 | \item{color.use}{defining the color for each cell group} 34 | 35 | \item{colors.ggplot}{whether use ggplot color scheme; default: colors.ggplot = FALSE} 36 | 37 | \item{angle.x}{angle for x-axis text rotation} 38 | 39 | \item{vjust.x}{adjust x axis text} 40 | 41 | \item{hjust.x}{adjust x axis text} 42 | 43 | \item{show.text.y}{whther show y-axis text} 44 | 45 | \item{line.size}{line width in the violin plot} 46 | 47 | \item{pt.size}{size of the dots} 48 | 49 | \item{plot.margin}{adjust the white space between each plot} 50 | 51 | \item{...}{Extra parameters passed to VlnPlot from Seurat package} 52 | } 53 | \value{ 54 | ggplot2 object 55 | } 56 | \description{ 57 | Stacked Violin plot 58 | } 59 | -------------------------------------------------------------------------------- /man/addMeta.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{addMeta} 4 | \alias{addMeta} 5 | \title{Add the cell information into meta slot} 6 | \usage{ 7 | addMeta(object, meta, meta.name = NULL) 8 | } 9 | \arguments{ 10 | \item{object}{CellChat object} 11 | 12 | \item{meta}{cell information to be added} 13 | 14 | \item{meta.name}{the name of column to be assigned} 15 | } 16 | \description{ 17 | Add the cell information into meta slot 18 | } 19 | -------------------------------------------------------------------------------- /man/addReduction.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{addReduction} 4 | \alias{addReduction} 5 | \title{Add a reduced space of the data into CellChat object} 6 | \usage{ 7 | addReduction( 8 | object, 9 | dr = NULL, 10 | dr.name = NULL, 11 | seu.obj = NULL, 12 | dr.use = NULL, 13 | force.add = FALSE 14 | ) 15 | } 16 | \arguments{ 17 | \item{object}{CellChat object from a single dataset} 18 | 19 | \item{dr}{A data frame (rows are cells with rownames) consisting of a low-dimensional space for visualization} 20 | 21 | \item{dr.name}{A char name of the reduction method for the input `dr`} 22 | 23 | \item{seu.obj}{A Seurat object with the reduced space of the data} 24 | 25 | \item{dr.use}{A char name of the reduction method to use when taking `seu.obj` as input. By default, all reduced space in `seu.obj` will be added in `object@dr`} 26 | 27 | \item{force.add}{Whether to force to add a new reduced space when a reduced space exists in `object@dr`} 28 | } 29 | \description{ 30 | Add a reduced space of the data into CellChat object 31 | } 32 | \examples{ 33 | \dontrun{ 34 | cellChat <- addReduction(object = cellchat, dr = cell.embeddings, dr.name = "umap") 35 | 36 | cellChat <- addReduction(object = cellchat, seu.obj = seu.obj) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /man/aggregateNet.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{aggregateNet} 4 | \alias{aggregateNet} 5 | \title{Calculate the aggregated network by counting the number of links or summarizing the communication probability} 6 | \usage{ 7 | aggregateNet( 8 | object, 9 | sources.use = NULL, 10 | targets.use = NULL, 11 | signaling = NULL, 12 | pairLR.use = NULL, 13 | remove.isolate = TRUE, 14 | thresh = 0.05, 15 | return.object = TRUE 16 | ) 17 | } 18 | \arguments{ 19 | \item{object}{CellChat object} 20 | 21 | \item{sources.use, targets.use, signaling, pairLR.use}{Please check the description in function \code{\link{subsetCommunication}}} 22 | 23 | \item{remove.isolate}{whether removing the isolate cell groups without any interactions when applying \code{\link{subsetCommunication}}} 24 | 25 | \item{thresh}{threshold of the p-value for determining significant interaction} 26 | 27 | \item{return.object}{whether return an updated CellChat object} 28 | } 29 | \value{ 30 | Return an updated CellChat object: 31 | 32 | `object@net$count` is a matrix: rows and columns are sources and targets respectively, and elements are the number of interactions between any two cell groups. USER can convert a matrix to a data frame using the function `reshape2::melt()` 33 | 34 | `object@net$weight` is also a matrix containing the interaction weights between any two cell groups 35 | 36 | `object@net$sum` is deprecated. Use `object@net$weight` 37 | } 38 | \description{ 39 | Calculate the aggregated network by counting the number of links or summarizing the communication probability 40 | } 41 | -------------------------------------------------------------------------------- /man/alpha_centrality.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{alpha_centrality} 4 | \alias{alpha_centrality} 5 | \title{compute alpha centrality} 6 | \usage{ 7 | alpha_centrality(g) 8 | } 9 | \arguments{ 10 | \item{g}{a graph objecct} 11 | } 12 | \description{ 13 | compute alpha centrality 14 | } 15 | -------------------------------------------------------------------------------- /man/barPlot.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{barPlot} 4 | \alias{barPlot} 5 | \title{Bar plot for average gene expression} 6 | \usage{ 7 | barPlot( 8 | object, 9 | features, 10 | group.by = NULL, 11 | split.by = NULL, 12 | color.use = NULL, 13 | method = c("truncatedMean", "triMean", "median"), 14 | trim = 0.1, 15 | assay = "RNA", 16 | x.lab.rot = FALSE, 17 | ncol = 1, 18 | ... 19 | ) 20 | } 21 | \arguments{ 22 | \item{object}{seurat object} 23 | 24 | \item{features}{Features to plot (gene expression, metrics)} 25 | 26 | \item{group.by}{Name of one or more metadata columns to group (color) cells by 27 | (for example, orig.ident); pass 'ident' to group by identity class} 28 | 29 | \item{split.by}{Name of a metadata column to split plot by;} 30 | 31 | \item{color.use}{defining the color for each condition/dataset} 32 | 33 | \item{method}{methods for computing the average gene expression per cell group. By default = "truncatedMean", where a value should be assigned to 'trim;} 34 | 35 | \item{trim}{the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed.} 36 | 37 | \item{assay}{Name of assay to use, defaults to the active assay} 38 | 39 | \item{x.lab.rot}{whether do rotation for the x.tick.label} 40 | 41 | \item{ncol}{number of columns to show in the plot} 42 | 43 | \item{...}{Extra parameters passed to barplot_internal} 44 | } 45 | \value{ 46 | ggplot2 object 47 | } 48 | \description{ 49 | Please check \code{\link{barplot_internal}}for detailed description of the arguments. 50 | } 51 | -------------------------------------------------------------------------------- /man/barplot_internal.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{barplot_internal} 4 | \alias{barplot_internal} 5 | \title{Bar plot for dataframe} 6 | \usage{ 7 | barplot_internal( 8 | df, 9 | x = "cellType", 10 | y = "value", 11 | fill = "condition", 12 | legend.title = NULL, 13 | width = 0.6, 14 | title.name = NULL, 15 | xlabel = NULL, 16 | ylabel = NULL, 17 | color.use = NULL, 18 | remove.xtick = FALSE, 19 | stat.add = FALSE, 20 | stat.method = "wilcox.test", 21 | percent.y = FALSE, 22 | label.x = 1.5, 23 | show.legend = TRUE, 24 | x.lab.rot = FALSE, 25 | size.text = 10 26 | ) 27 | } 28 | \arguments{ 29 | \item{df}{a dataframe} 30 | 31 | \item{x}{Name of one column to show on the x-axis} 32 | 33 | \item{y}{Name of one column to show on the y-axis} 34 | 35 | \item{fill}{Name of one column to compare the values} 36 | 37 | \item{legend.title}{Name of legend} 38 | 39 | \item{width}{bar width} 40 | 41 | \item{title.name}{Name of the main title} 42 | 43 | \item{xlabel}{Name of x label} 44 | 45 | \item{ylabel}{Name of y label} 46 | 47 | \item{color.use}{defining the color of bar plot;} 48 | 49 | \item{remove.xtick}{whether remove x tick} 50 | 51 | \item{stat.add}{whether adding statistical test} 52 | 53 | \item{stat.method, label.x}{parameters for ggpubr::stat_compare_means} 54 | 55 | \item{percent.y}{whether showing y-values as percentage} 56 | 57 | \item{show.legend}{Whether show the legend} 58 | 59 | \item{x.lab.rot}{Whether rorate the xtick labels} 60 | 61 | \item{size.text}{font size} 62 | } 63 | \value{ 64 | ggplot2 object 65 | } 66 | \description{ 67 | Bar plot for dataframe 68 | } 69 | -------------------------------------------------------------------------------- /man/buildSNN.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{buildSNN} 4 | \alias{buildSNN} 5 | \title{Build SNN matrix} 6 | \usage{ 7 | buildSNN(data.use, k = 10, k.scale = 10, prune.SNN = 1/15) 8 | } 9 | \arguments{ 10 | \item{data.use}{Features x samples matrix to use to build the SNN} 11 | 12 | \item{k}{Defines k for the k-nearest neighbor algorithm} 13 | 14 | \item{k.scale}{Granularity option for k.param} 15 | 16 | \item{prune.SNN}{Sets the cutoff for acceptable Jaccard distances when 17 | computing the neighborhood overlap for the SNN construction.} 18 | } 19 | \value{ 20 | Returns similarity matrix in sparse matrix format 21 | } 22 | \description{ 23 | Build SNN matrix 24 | } 25 | -------------------------------------------------------------------------------- /man/checkGeneSymbol.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/database.R 3 | \name{checkGeneSymbol} 4 | \alias{checkGeneSymbol} 5 | \title{check the official Gene Symbol} 6 | \usage{ 7 | checkGeneSymbol(geneSet, geneIfo) 8 | } 9 | \arguments{ 10 | \item{geneSet}{gene set to check} 11 | 12 | \item{geneIfo}{official Gene Symbol} 13 | } 14 | \description{ 15 | check the official Gene Symbol 16 | } 17 | -------------------------------------------------------------------------------- /man/colorRamp3.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{colorRamp3} 4 | \alias{colorRamp3} 5 | \title{Color interpolation} 6 | \usage{ 7 | colorRamp3(breaks, colors, transparency = 0, space = "LAB") 8 | } 9 | \arguments{ 10 | \item{breaks}{A vector indicating numeric breaks} 11 | 12 | \item{colors}{A vector of colors which correspond to values in ``breaks``} 13 | 14 | \item{transparency}{A single value in ``[0, 1]``. 0 refers to no transparency and 1 refers to full transparency} 15 | 16 | \item{space}{color space in which colors are interpolated. Value should be one of "RGB", "HSV", "HLS", "LAB", "XYZ", "sRGB", "LUV", see `colorspace::color-class` for detail.} 17 | } 18 | \value{ 19 | It returns a function which accepts a vector of numeric values and returns interpolated colors. 20 | } 21 | \description{ 22 | This function is modified from https://rdrr.io/cran/circlize/src/R/utils.R 23 | Colors are linearly interpolated according to break values and corresponding colors through CIE Lab color space (`colorspace::LAB`) by default. 24 | Values exceeding breaks will be assigned with corresponding maximum or minimum colors. 25 | } 26 | \examples{ 27 | \dontrun{ 28 | col_fun = colorRamp3(c(-1, 0, 1), c("green", "white", "red")) 29 | col_fun(c(-2, -1, -0.5, 0, 0.5, 1, 2)) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /man/compareInteractions.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{compareInteractions} 4 | \alias{compareInteractions} 5 | \title{Comparing the number of inferred communication links between different datasets} 6 | \usage{ 7 | compareInteractions( 8 | object, 9 | measure = c("count", "weight"), 10 | color.use = NULL, 11 | group = NULL, 12 | group.levels = NULL, 13 | group.facet = NULL, 14 | group.facet.levels = NULL, 15 | n.row = 1, 16 | color.alpha = 1, 17 | legend.title = NULL, 18 | width = 0.6, 19 | title.name = NULL, 20 | digits = 3, 21 | xlabel = NULL, 22 | ylabel = NULL, 23 | remove.xtick = FALSE, 24 | show.legend = TRUE, 25 | x.lab.rot = FALSE, 26 | angle.x = 45, 27 | vjust.x = NULL, 28 | hjust.x = 1, 29 | size.text = 10 30 | ) 31 | } 32 | \arguments{ 33 | \item{object}{A merged CellChat object} 34 | 35 | \item{measure}{"count" or "weight". "count": comparing the number of interactions; "weight": comparing the total interaction weights (strength)} 36 | 37 | \item{color.use}{defining the color for each group of datasets} 38 | 39 | \item{group}{a vector giving the groups of different datasets to define colors of the bar plot. Default: only one group and a single color} 40 | 41 | \item{group.levels}{the factor level in the defined group} 42 | 43 | \item{group.facet}{Name of one metadata column defining faceting groups} 44 | 45 | \item{group.facet.levels}{the factor level in the defined group.facet} 46 | 47 | \item{n.row}{Number of rows in facet_grid()} 48 | 49 | \item{color.alpha}{transparency} 50 | 51 | \item{legend.title}{legend title} 52 | 53 | \item{width}{bar width} 54 | 55 | \item{title.name}{main title of the plot} 56 | 57 | \item{digits}{integer indicating the number of decimal places (round) to be used when `measure` is `weight`.} 58 | 59 | \item{xlabel}{label of x-axis} 60 | 61 | \item{ylabel}{label of y-axis} 62 | 63 | \item{remove.xtick}{whether remove xtick} 64 | 65 | \item{show.legend}{whether show the legend} 66 | 67 | \item{x.lab.rot, angle.x, vjust.x, hjust.x}{adjusting parameters if rotating xtick.labels when x.lab.rot = TRUE} 68 | 69 | \item{size.text}{font size of the text} 70 | } 71 | \value{ 72 | A ggplot object 73 | } 74 | \description{ 75 | Comparing the number of inferred communication links between different datasets 76 | } 77 | -------------------------------------------------------------------------------- /man/computeAveExpr.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{computeAveExpr} 4 | \alias{computeAveExpr} 5 | \title{Compute averaged expression values for each cell group} 6 | \usage{ 7 | computeAveExpr( 8 | object, 9 | features = NULL, 10 | group.by = NULL, 11 | type = c("triMean", "truncatedMean", "median"), 12 | trim = NULL, 13 | slot.name = c("data.signaling", "data"), 14 | data.use = NULL 15 | ) 16 | } 17 | \arguments{ 18 | \item{object}{CellChat object} 19 | 20 | \item{features}{a char vector giving the used features. default use all features} 21 | 22 | \item{group.by}{cell group information; default is `object@idents` when input is a single object and `object@idents$joint` when input is a merged object; otherwise it should be one of the column names of the meta slot} 23 | 24 | \item{type}{methods for computing the average gene expression per cell group. 25 | 26 | By default = "triMean", defined as a weighted average of the distribution's median and its two quartiles (https://en.wikipedia.org/wiki/Trimean); 27 | 28 | When setting `type = "truncatedMean"`, a value should be assigned to 'trim'. See the function `base::mean`.} 29 | 30 | \item{trim}{the fraction (0 to 0.25) of observations to be trimmed from each end of x before the mean is computed.} 31 | 32 | \item{slot.name}{the data in the slot.name to use} 33 | 34 | \item{data.use}{a customed data matrix. Default: data.use = NULL and the expression matrix in the 'slot.name' is used} 35 | } 36 | \value{ 37 | Returns a matrix with genes as rows, cell groups as columns. 38 | } 39 | \description{ 40 | Compute averaged expression values for each cell group 41 | } 42 | -------------------------------------------------------------------------------- /man/computeCellDistance.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{computeCellDistance} 4 | \alias{computeCellDistance} 5 | \title{Compute cell-cell distance based on the spatial coordinates} 6 | \usage{ 7 | computeCellDistance( 8 | coordinates, 9 | interaction.range = NULL, 10 | ratio = NULL, 11 | tol = NULL 12 | ) 13 | } 14 | \arguments{ 15 | \item{coordinates}{a data matrix in which each row gives the spatial locations/coordinates of each cell/spot} 16 | 17 | \item{interaction.range}{The maximum interaction/diffusion range of ligands. This hard threshold is used to filter out the connections between spatially distant cells} 18 | 19 | \item{ratio}{The conversion factor when converting spatial coordinates from Pixels or other units to Micrometers (i.e.,Microns). 20 | 21 | For example, setting `ratio = 0.18` indicates that 1 pixel equals 0.18um in the coordinates. 22 | For 10X visium, it is the ratio of the theoretical spot size (i.e., 65um) over the number of pixels that span the diameter of a theoretical spot size in the full-resolution image (i.e., 'spot.size.fullres' in the 'scalefactors_json.json' file).} 23 | 24 | \item{tol}{The tolerance factor to increase the robustness when comparing the center-to-center distance against the `interaction.range`. This can be the half value of cell/spot size in the unit of um. 25 | 26 | For example, for 10X visium, `tol` can be set as `65/2`; for slide-seq, `tol` can be set as `10/2`. 27 | If the cell/spot size is not known, we provide a function `computeCellDistance` to compute the center-to-center distance. `tol` can be the the half value of the minimum center-to-center distance.} 28 | } 29 | \value{ 30 | an object of class "dist" giving the pairwise cell-cell distance 31 | } 32 | \description{ 33 | Compute cell-cell distance based on the spatial coordinates 34 | } 35 | -------------------------------------------------------------------------------- /man/computeCentralityLocal.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{computeCentralityLocal} 4 | \alias{computeCentralityLocal} 5 | \title{Compute Centrality measures for a signaling network} 6 | \usage{ 7 | computeCentralityLocal(net) 8 | } 9 | \arguments{ 10 | \item{net}{compute the centrality measures on a specific signaling network given by a 2 or 3 dimemsional array net} 11 | } 12 | \description{ 13 | Compute Centrality measures for a signaling network 14 | } 15 | -------------------------------------------------------------------------------- /man/computeCommunProbPathway.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{computeCommunProbPathway} 4 | \alias{computeCommunProbPathway} 5 | \title{Compute the communication probability on signaling pathway level by summarizing all related ligands/receptors} 6 | \usage{ 7 | computeCommunProbPathway( 8 | object = NULL, 9 | net = NULL, 10 | pairLR.use = NULL, 11 | thresh = 0.05 12 | ) 13 | } 14 | \arguments{ 15 | \item{object}{CellChat object} 16 | 17 | \item{net}{A list from object@net; If net = NULL, net = object@net} 18 | 19 | \item{pairLR.use}{A dataframe giving the ligand-receptor interactions; If pairLR.use = NULL, pairLR.use = object@LR$LRsig} 20 | 21 | \item{thresh}{threshold of the p-value for determining significant interaction} 22 | } 23 | \value{ 24 | A CellChat object with updated slot 'netP': 25 | 26 | object@netP$prob is the communication probability array on signaling pathway level; USER can convert this array to a data frame using the function 'reshape2::melt()', 27 | 28 | e.g., `df.netP <- reshape2::melt(object@netP$prob, value.name = "prob"); colnames(df.netP)[1:3] <- c("source","target","pathway_name")` or access all significant interactions using the function \code{\link{subsetCommunication}} 29 | 30 | object@netP$pathways list all the signaling pathways with significant communications. 31 | 32 | From version >= 1.1.0, pathways are ordered based on the total communication probabilities. NB: pathways with small total communication probabilities might be also very important since they might be specifically activated between only few cell types. 33 | } 34 | \description{ 35 | Compute the communication probability on signaling pathway level by summarizing all related ligands/receptors 36 | } 37 | -------------------------------------------------------------------------------- /man/computeEigengap.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{computeEigengap} 4 | \alias{computeEigengap} 5 | \title{Compute the eigengap of a given matrix for inferring the number of clusters} 6 | \usage{ 7 | computeEigengap(CM, tau = NULL, tol = 0.01) 8 | } 9 | \arguments{ 10 | \item{CM}{consensus matrix} 11 | 12 | \item{tau}{truncated consensus matrix} 13 | 14 | \item{tol}{tolerance} 15 | } 16 | \description{ 17 | Compute the eigengap of a given matrix for inferring the number of clusters 18 | } 19 | -------------------------------------------------------------------------------- /man/computeEnrichmentScore.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{computeEnrichmentScore} 4 | \alias{computeEnrichmentScore} 5 | \title{Compute and visualize the enrichment score of ligand-receptor pairs in one condition compared to another condition} 6 | \usage{ 7 | computeEnrichmentScore( 8 | df, 9 | measure = c("ligand", "signaling", "LR-pair"), 10 | variable.both = TRUE, 11 | species = c("mouse", "human"), 12 | db = NULL, 13 | color.use = NULL, 14 | color.name = "Dark2", 15 | n.color = 8, 16 | scale = c(4, 0.8), 17 | min.freq = 0, 18 | max.words = 200, 19 | random.order = FALSE, 20 | rot.per = 0, 21 | return.data = FALSE, 22 | seed = 1, 23 | ... 24 | ) 25 | } 26 | \arguments{ 27 | \item{df}{a dataframe} 28 | 29 | \item{measure}{compute the enrichment score in terms of "ligand", "signaling",or "LR-pair"} 30 | 31 | \item{variable.both}{variable.both = TRUE will require that both ligand and receptor from one pair are over-expressed; 32 | variable.both = FALSE will only require that either ligand or receptor from one pair is over-expressed.} 33 | 34 | \item{species}{define the species as one of the c('mouse','human') to extract the CellChatDB; For other species, users need to provide a ligand-receptor database `db`} 35 | 36 | \item{db}{a customized ligand-receptor database `db`} 37 | 38 | \item{color.use}{defining the color for each group of datasets} 39 | 40 | \item{color.name}{the color names in RColorBrewer::brewer.pal} 41 | 42 | \item{n.color}{the number of colors} 43 | 44 | \item{scale}{A vector of length 2 indicating the range of the size of the words.} 45 | 46 | \item{min.freq}{words with frequency below min.freq will not be plotted} 47 | 48 | \item{max.words}{Maximum number of words to be plotted. least frequent terms dropped} 49 | 50 | \item{random.order}{plot words in random order. If false, they will be plotted in decreasing frequency} 51 | 52 | \item{rot.per}{proportion words with 90 degree rotation} 53 | 54 | \item{return.data}{whether return the data frame for plotting wordcloud} 55 | 56 | \item{seed}{set a seed} 57 | 58 | \item{...}{Other parameters passing to wordcloud::wordcloud} 59 | } 60 | \value{ 61 | A ggplot object 62 | } 63 | \description{ 64 | Compute and visualize the enrichment score of ligand-receptor pairs in one condition compared to another condition 65 | } 66 | -------------------------------------------------------------------------------- /man/computeExprGroup_agonist.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{computeExprGroup_agonist} 4 | \alias{computeExprGroup_agonist} 5 | \title{Modeling the effect of agonist on the ligand-receptor interaction} 6 | \usage{ 7 | computeExprGroup_agonist( 8 | data.use, 9 | pairLRsig, 10 | cofactor_input, 11 | group, 12 | index.agonist, 13 | Kh, 14 | FunMean, 15 | n 16 | ) 17 | } 18 | \arguments{ 19 | \item{data.use}{data matrix} 20 | 21 | \item{pairLRsig}{the L-R interactions} 22 | 23 | \item{cofactor_input}{the cofactor_input from CellChatDB} 24 | 25 | \item{group}{a factor defining the cell groups} 26 | 27 | \item{index.agonist}{the index of agonist in the database} 28 | 29 | \item{Kh}{a parameter in Hill function} 30 | 31 | \item{FunMean}{the function for computing mean expression per group} 32 | 33 | \item{n}{Hill coefficient} 34 | } 35 | \description{ 36 | Modeling the effect of agonist on the ligand-receptor interaction 37 | } 38 | -------------------------------------------------------------------------------- /man/computeExprGroup_antagonist.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{computeExprGroup_antagonist} 4 | \alias{computeExprGroup_antagonist} 5 | \title{Modeling the effect of antagonist on the ligand-receptor interaction} 6 | \usage{ 7 | computeExprGroup_antagonist( 8 | data.use, 9 | pairLRsig, 10 | cofactor_input, 11 | group, 12 | index.antagonist, 13 | Kh, 14 | FunMean, 15 | n 16 | ) 17 | } 18 | \arguments{ 19 | \item{data.use}{data matrix} 20 | 21 | \item{pairLRsig}{the L-R interactions} 22 | 23 | \item{cofactor_input}{the cofactor_input from CellChatDB} 24 | 25 | \item{group}{a factor defining the cell groups} 26 | 27 | \item{index.antagonist}{the index of antagonist in the database} 28 | 29 | \item{Kh}{a parameter in Hill function} 30 | 31 | \item{FunMean}{the function for computing mean expression per group} 32 | 33 | \item{n}{Hill coefficient} 34 | } 35 | \description{ 36 | Modeling the effect of antagonist on the ligand-receptor interaction 37 | } 38 | -------------------------------------------------------------------------------- /man/computeExpr_LR.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{computeExpr_LR} 4 | \alias{computeExpr_LR} 5 | \title{Compute the expression of ligands or receptors using geometric mean} 6 | \usage{ 7 | computeExpr_LR(geneLR, data.use, complex_input) 8 | } 9 | \arguments{ 10 | \item{geneLR}{a char vector giving a set of ligands or receptors} 11 | 12 | \item{data.use}{data matrix (row are genes and columns are cells or cell groups)} 13 | 14 | \item{complex_input}{the complex_input from CellChatDB} 15 | } 16 | \description{ 17 | Compute the expression of ligands or receptors using geometric mean 18 | } 19 | -------------------------------------------------------------------------------- /man/computeExpr_agonist.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{computeExpr_agonist} 4 | \alias{computeExpr_agonist} 5 | \title{Modeling the effect of agonist on the ligand-receptor interaction} 6 | \usage{ 7 | computeExpr_agonist(data.use, pairLRsig, cofactor_input, index.agonist, Kh, n) 8 | } 9 | \arguments{ 10 | \item{data.use}{data matrix} 11 | 12 | \item{pairLRsig}{the L-R interactions} 13 | 14 | \item{cofactor_input}{the cofactor_input from CellChatDB} 15 | 16 | \item{index.agonist}{the index of agonist in the database} 17 | 18 | \item{Kh}{a parameter in Hill function} 19 | 20 | \item{n}{Hill coefficient} 21 | } 22 | \description{ 23 | Modeling the effect of agonist on the ligand-receptor interaction 24 | } 25 | -------------------------------------------------------------------------------- /man/computeExpr_antagonist.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{computeExpr_antagonist} 4 | \alias{computeExpr_antagonist} 5 | \title{Modeling the effect of antagonist on the ligand-receptor interaction} 6 | \usage{ 7 | computeExpr_antagonist( 8 | data.use, 9 | pairLRsig, 10 | cofactor_input, 11 | index.antagonist, 12 | Kh, 13 | n 14 | ) 15 | } 16 | \arguments{ 17 | \item{data.use}{data matrix} 18 | 19 | \item{pairLRsig}{the L-R interactions} 20 | 21 | \item{cofactor_input}{the cofactor_input from CellChatDB} 22 | 23 | \item{index.antagonist}{the index of antagonist in the database} 24 | 25 | \item{Kh}{a parameter in Hill function} 26 | 27 | \item{n}{Hill coefficient} 28 | } 29 | \description{ 30 | Modeling the effect of antagonist on the ligand-receptor interaction 31 | } 32 | -------------------------------------------------------------------------------- /man/computeExpr_complex.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{computeExpr_complex} 4 | \alias{computeExpr_complex} 5 | \title{Compute the expression of complex in individual cells using geometric mean} 6 | \usage{ 7 | computeExpr_complex(complex_input, data.use, complex) 8 | } 9 | \arguments{ 10 | \item{complex_input}{the complex_input from CellChatDB} 11 | 12 | \item{data.use}{data matrix (row are genes and columns are cells or cell groups)} 13 | 14 | \item{complex}{the names of complex} 15 | } 16 | \description{ 17 | Compute the expression of complex in individual cells using geometric mean 18 | } 19 | -------------------------------------------------------------------------------- /man/computeExpr_coreceptor.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{computeExpr_coreceptor} 4 | \alias{computeExpr_coreceptor} 5 | \title{Modeling the effect of coreceptor on the ligand-receptor interaction} 6 | \usage{ 7 | computeExpr_coreceptor(cofactor_input, data.use, pairLRsig, type = c("A", "I")) 8 | } 9 | \arguments{ 10 | \item{cofactor_input}{the cofactor_input from CellChatDB} 11 | 12 | \item{data.use}{data matrix} 13 | 14 | \item{pairLRsig}{a data frame giving ligand-receptor interactions} 15 | 16 | \item{type}{when type == "A", computing expression of co-activation receptor; when type == "I", computing expression of co-inhibition receptor.} 17 | } 18 | \description{ 19 | Modeling the effect of coreceptor on the ligand-receptor interaction 20 | } 21 | -------------------------------------------------------------------------------- /man/computeLaplacian.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{computeLaplacian} 4 | \alias{computeLaplacian} 5 | \title{Compute eigenvalues of associated Laplacian matrix of a given matrix} 6 | \usage{ 7 | computeLaplacian(CM, tol = 0.01) 8 | } 9 | \arguments{ 10 | \item{CM}{consensus matrix} 11 | 12 | \item{tol}{tolerance} 13 | } 14 | \description{ 15 | Compute eigenvalues of associated Laplacian matrix of a given matrix 16 | } 17 | -------------------------------------------------------------------------------- /man/computeNetD_structure.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{computeNetD_structure} 4 | \alias{computeNetD_structure} 5 | \title{Compute the structural distance between two signaling networks} 6 | \usage{ 7 | computeNetD_structure(g, h, w1 = 0.45, w2 = 0.45, w3 = 0.1) 8 | } 9 | \arguments{ 10 | \item{g}{a graph object of one signaling network} 11 | 12 | \item{h}{a graph object of another signaling network} 13 | 14 | \item{w1}{parameter} 15 | 16 | \item{w2}{parameter} 17 | 18 | \item{w3}{parameter} 19 | } 20 | \description{ 21 | Compute the structural distance between two signaling networks 22 | } 23 | -------------------------------------------------------------------------------- /man/computeNetSimilarity.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{computeNetSimilarity} 4 | \alias{computeNetSimilarity} 5 | \title{Compute signaling network similarity for any pair of signaling networks} 6 | \usage{ 7 | computeNetSimilarity( 8 | object, 9 | slot.name = "netP", 10 | type = c("functional", "structural"), 11 | k = NULL, 12 | thresh = NULL 13 | ) 14 | } 15 | \arguments{ 16 | \item{object}{CellChat object} 17 | 18 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 19 | 20 | \item{type}{"functional","structural"} 21 | 22 | \item{k}{the number of nearest neighbors} 23 | 24 | \item{thresh}{the fraction (0 to 0.25) of interactions to be trimmed before computing network similarity} 25 | } 26 | \description{ 27 | Compute signaling network similarity for any pair of signaling networks 28 | } 29 | -------------------------------------------------------------------------------- /man/computeNetSimilarityPairwise.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{computeNetSimilarityPairwise} 4 | \alias{computeNetSimilarityPairwise} 5 | \title{Compute signaling network similarity for any pair of datasets} 6 | \usage{ 7 | computeNetSimilarityPairwise( 8 | object, 9 | slot.name = "netP", 10 | type = c("functional", "structural"), 11 | comparison = NULL, 12 | k = NULL, 13 | thresh = NULL 14 | ) 15 | } 16 | \arguments{ 17 | \item{object}{A merged CellChat object} 18 | 19 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 20 | 21 | \item{type}{"functional","structural"} 22 | 23 | \item{comparison}{a numerical vector giving the datasets for comparison} 24 | 25 | \item{k}{the number of nearest neighbors} 26 | 27 | \item{thresh}{the fraction (0 to 0.25) of interactions to be trimmed before computing network similarity} 28 | } 29 | \description{ 30 | Compute signaling network similarity for any pair of datasets 31 | } 32 | -------------------------------------------------------------------------------- /man/computeRegionDistance.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{computeRegionDistance} 4 | \alias{computeRegionDistance} 5 | \title{Compute the region distance based on the spatial locations of each splot/cell of the spatial transcriptomics} 6 | \usage{ 7 | computeRegionDistance( 8 | coordinates, 9 | meta, 10 | interaction.range = NULL, 11 | ratio = NULL, 12 | tol = NULL, 13 | k.min = 10, 14 | contact.dependent = TRUE, 15 | contact.range = NULL, 16 | contact.knn.k = NULL, 17 | do.symmetric = TRUE 18 | ) 19 | } 20 | \arguments{ 21 | \item{coordinates}{a data matrix in which each row gives the spatial locations/coordinates of each cell/spot} 22 | 23 | \item{meta}{a data frame including at least two columns named `group` and `samples`. `meta$group` is a factor vector defining the regions/labels of each cell/spot. `meta$samples` is a factor vector defining the sample labels of each dataset.} 24 | 25 | \item{interaction.range}{The maximum interaction/diffusion range of ligands. This hard threshold is used to filter out the connections between spatially distant regions} 26 | 27 | \item{ratio}{a numerical vector giving the conversion factor when converting spatial coordinates from Pixels or other units to Micrometers (i.e.,Microns). 28 | 29 | For example, setting `ratio = 0.18` indicates that 1 pixel equals 0.18um in the coordinates. 30 | For 10X visium, it is the ratio of the theoretical spot size (i.e., 65um) over the number of pixels that span the diameter of a theoretical spot size in the full-resolution image (i.e., 'spot.size.fullres' in the 'scalefactors_json.json' file).} 31 | 32 | \item{tol}{a numerical vector giving the tolerance factor to increase the robustness when comparing the center-to-center distance against the `interaction.range`. This can be the half value of cell/spot size in the unit of um. 33 | 34 | For example, for 10X visium, `tol` can be set as `65/2`; for slide-seq, `tol` can be set as `10/2`. 35 | If the cell/spot size is not known, we provide a function `computeCellDistance` to compute the center-to-center distance. `tol` can be the the half value of the minimum center-to-center distance.} 36 | 37 | \item{k.min}{the minimum number of interacting cell pairs required for defining adjacent cell groups} 38 | 39 | \item{contact.dependent}{Whether determining spatially proximal cell groups based on either the contact.range or the k-nearest neighbors (knn). By default `contact.dependent = TRUE` when inferring contact-dependent and juxtacrine signaling (including ECM-Receptor and Cell-Cell Contact signaling classified in CellChatDB$interaction$annotation). 40 | If only focusing on `Secreted Signaling`, the `contact.dependent` will be automatically set as FALSE except for `contact.dependent.forced = TRUE`.} 41 | 42 | \item{contact.range}{The interaction range (Unit: microns) to restrict the contact-dependent signaling. 43 | For spatial transcriptomics in a single-cell resolution, `contact.range` is approximately equal to the estimated cell diameter (i.e., the cell center-to-center distance), which means that contact-dependent and juxtacrine signaling can only happens when the two cells are contact to each other. 44 | 45 | Typically, `contact.range = 10`, which is a typical human cell size. However, for low-resolution spatial data such as 10X visium, it should be the cell center-to-center distance (i.e., `contact.range = 100` for visium data). The function `computeCellDistance` can compute the center-to-center distance.} 46 | 47 | \item{contact.knn.k}{Number of neighbors to restrict the contact-dependent signaling within the neatest neighbors. By default, CellChat uses `contact.range` to restrict the contact-dependent signaling; however, users can also provide a value of `contact.knn.k`, in order to determine spatially proximal cell groups based on the k-nearest neighbors (knn). 48 | For 10X visium, contact.knn.k = 6. For other spatial technologies, this value may be hard to determine because the sequenced cells/spots are usually not regularly arranged.} 49 | 50 | \item{do.symmetric}{Whether converting the adjacent matrix into symmetric one when determining spatially proximal cell groups. Default is TRUE, indicating that if adj(i,j) or adj(j,i) is zero, then both are zeros.} 51 | } 52 | \value{ 53 | A list including a square matrix giving the pairwise region distances and an adjacent matrix indicating physically contacting cell groups based on either the contact.range or the k-nearest neighbors 54 | } 55 | \description{ 56 | Compute the region distance based on the spatial locations of each splot/cell of the spatial transcriptomics 57 | } 58 | -------------------------------------------------------------------------------- /man/createCellChat.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CellChat_class.R 3 | \name{createCellChat} 4 | \alias{createCellChat} 5 | \title{Create a new CellChat object from a data matrix, Seurat or SingleCellExperiment object} 6 | \usage{ 7 | createCellChat( 8 | object, 9 | meta = NULL, 10 | group.by = NULL, 11 | datatype = c("RNA", "spatial"), 12 | coordinates = NULL, 13 | spatial.factors = NULL, 14 | assay = NULL, 15 | do.sparse = T 16 | ) 17 | } 18 | \arguments{ 19 | \item{object}{a normalized (NOT count) data matrix (genes by cells), Seurat or SingleCellExperiment object} 20 | 21 | \item{meta}{a data frame (rows are cells with rownames) consisting of cell information, which will be used for defining cell groups. 22 | If input is a Seurat or SingleCellExperiment object, the meta data in the object will be used} 23 | 24 | \item{group.by}{a char name of the variable in meta data, defining cell groups. 25 | If input is a data matrix and group.by is NULL, the input `meta` should contain a column named 'labels', 26 | If input is a Seurat or SingleCellExperiment object, USER must provide `group.by` to define the cell groups. e.g, group.by = "ident" for Seurat object} 27 | 28 | \item{datatype}{By default datatype = "RNA"; when running CellChat on spatial imaging data, set datatype = "spatial" and input `spatial.factors`} 29 | 30 | \item{coordinates}{a data matrix in which each row gives the spatial locations/coordinates of each cell/spot} 31 | 32 | \item{spatial.factors}{a data frame containing two distance factors `ratio` and `tol`, which is dependent on spatial transcriptomics technologies (and specific datasets). 33 | 34 | USER must input this data frame when datatype = "spatial". spatial.factors must contain an element named `ratio`, which is the conversion factor when converting spatial coordinates from Pixels or other units to Micrometers (i.e.,Microns). For example, setting `ratio = 0.18` indicates that 1 pixel equals 0.18um in the coordinates, 35 | 36 | and another element named `tol`, which is the tolerance factor to increase the robustness when comparing the center-to-center distance against the `interaction.range`. This can be the half value of cell/spot size in the unit of um. If the cell/spot size is not known, we provide a function `computeCellDistance` to compute the cell center-to-center distance. `tol` can be the the half value of the minimum center-to-center distance. Of note, CellChat does not need an accurate tolerance factor, which is used for determining whether considering the cell-pair as spatially proximal if their distance is greater than `interaction.range` but smaller than "`interaction.range` + `tol`".} 37 | 38 | \item{assay}{Assay to use when the input is a Seurat or SingleCellExperiment object. NB: The data in the `integrated` assay in Seurat is not suitable for CellChat analysis because it contains negative values.} 39 | 40 | \item{do.sparse}{whether use sparse format} 41 | } 42 | \description{ 43 | Create a new CellChat object from a data matrix, Seurat or SingleCellExperiment object 44 | } 45 | \examples{ 46 | \dontrun{ 47 | Create a CellChat object from single-cell transcriptomics data 48 | # Input is a data matrix 49 | ## create a dataframe consisting of the cell labels 50 | meta = data.frame(labels = cell.labels, row.names = names(cell.labels)) 51 | cellChat <- createCellChat(object = data.input, meta = meta, group.by = "labels") 52 | 53 | # input is a Seurat object 54 | ## use the default cell identities of Seurat object 55 | cellChat <- createCellChat(object = seurat.obj, group.by = "ident", assay = "RNA") 56 | ## use other meta information as cell groups 57 | cellChat <- createCellChat(object = seurat.obj, group.by = "seurat.clusters") 58 | 59 | # input is a SingleCellExperiment object 60 | cellChat <- createCellChat(object = sce.obj, group.by = "sce.clusters") 61 | 62 | # input is a AnnData object 63 | sce <- zellkonverter::readH5AD(file = "adata.h5ad") 64 | assayNames(sce) # retrieve all the available assays within sce object 65 | counts <- assay(sce, "X") # add a new assay entry "logcounts" if not available and make sure this is the original count data matrix 66 | library.size <- Matrix::colSums(counts) 67 | logcounts(sce) <- log1p(Matrix::t(Matrix::t(counts)/library.size) * 10000) 68 | meta <- as.data.frame(SingleCellExperiment::colData(sce)) 69 | cellChat <- createCellChat(object = sce, group.by = "sce.clusters") 70 | 71 | 72 | Create a CellChat object from spatial transcriptomics data 73 | # Input is a data matrix 74 | cellChat <- createCellChat(object = data.input, meta = meta, group.by = "labels", 75 | datatype = "spatial", coordinates = coordinates, spatial.factors = spatial.factors) 76 | 77 | # input is a Seurat object 78 | cellChat <- createCellChat(object = seurat.obj, group.by = "ident", assay = "SCT", 79 | datatype = "spatial", spatial.factors = spatial.factors) 80 | 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /man/dotPlot.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{dotPlot} 4 | \alias{dotPlot} 5 | \title{Dot plot} 6 | \usage{ 7 | dotPlot( 8 | object, 9 | features, 10 | rotation = TRUE, 11 | colormap = "OrRd", 12 | color.direction = 1, 13 | color.use = c("#F8766D", "#00BFC4"), 14 | scale = TRUE, 15 | col.min = -2.5, 16 | col.max = 2.5, 17 | dot.scale = 6, 18 | assay = "RNA", 19 | idents = NULL, 20 | group.by = NULL, 21 | split.by = NULL, 22 | legend.width = 0.5, 23 | angle.x = 45, 24 | hjust.x = 1, 25 | angle.y = 0, 26 | hjust.y = 0.5, 27 | show.legend = TRUE, 28 | ... 29 | ) 30 | } 31 | \arguments{ 32 | \item{object}{seurat object} 33 | 34 | \item{features}{Features to plot (gene expression, metrics)} 35 | 36 | \item{rotation}{whether rotate the plot} 37 | 38 | \item{colormap}{RColorbrewer palette to use (check available palette using RColorBrewer::display.brewer.all()). default will use customed color palette} 39 | 40 | \item{color.direction}{Sets the order of colours in the scale. If 1, the default, colours are as output by RColorBrewer::brewer.pal(). If -1, the order of colours is reversed.} 41 | 42 | \item{color.use}{defining the color for each condition/dataset} 43 | 44 | \item{scale}{whther show x-axis text} 45 | 46 | \item{col.min}{Minimum scaled average expression threshold (everything smaller will be set to this)} 47 | 48 | \item{col.max}{Maximum scaled average expression threshold (everything larger will be set to this)} 49 | 50 | \item{dot.scale}{Scale the size of the points, similar to cex} 51 | 52 | \item{assay}{Name of assay to use, defaults to the active assay} 53 | 54 | \item{idents}{Which classes to include in the plot (default is all)} 55 | 56 | \item{group.by}{Name of one or more metadata columns to group (color) cells by 57 | (for example, orig.ident); pass 'ident' to group by identity class} 58 | 59 | \item{split.by}{Name of a metadata column to split plot by;} 60 | 61 | \item{legend.width}{legend width} 62 | 63 | \item{angle.x}{angle for x-axis text rotation} 64 | 65 | \item{hjust.x}{adjust x axis text} 66 | 67 | \item{angle.y}{angle for y-axis text rotation} 68 | 69 | \item{hjust.y}{adjust y axis text} 70 | 71 | \item{show.legend}{whether show the legend} 72 | 73 | \item{...}{Extra parameters passed to DotPlot from Seurat package} 74 | } 75 | \value{ 76 | ggplot2 object 77 | } 78 | \description{ 79 | The size of the dot encodes the percentage of cells within a class, while the color encodes the AverageExpression level across all cells within a class 80 | } 81 | -------------------------------------------------------------------------------- /man/entropia.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{entropia} 4 | \alias{entropia} 5 | \title{compute the Shannon entropy} 6 | \usage{ 7 | entropia(a) 8 | } 9 | \arguments{ 10 | \item{a}{a numeric vector} 11 | } 12 | \description{ 13 | compute the Shannon entropy 14 | } 15 | -------------------------------------------------------------------------------- /man/extractEnrichedLR.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{extractEnrichedLR} 4 | \alias{extractEnrichedLR} 5 | \title{Identify all the significant interactions (L-R pairs) and related signaling genes for a given signaling pathway} 6 | \usage{ 7 | extractEnrichedLR( 8 | object, 9 | signaling, 10 | geneLR.return = FALSE, 11 | enriched.only = TRUE, 12 | thresh = 0.05, 13 | geneInfo = NULL, 14 | complex_input = NULL 15 | ) 16 | } 17 | \arguments{ 18 | \item{object}{CellChat object} 19 | 20 | \item{signaling}{a char vector containing signaling pathway names for searching} 21 | 22 | \item{geneLR.return}{whether return the related signaling genes of enriched L-R pairs} 23 | 24 | \item{enriched.only}{whether only return the identified enriched signaling genes in the database. Default = TRUE, returning the significantly enriched signaling interactions} 25 | 26 | \item{thresh}{threshold of the p-value for determining significant interaction} 27 | 28 | \item{geneInfo}{a dataframe with gene official symbol (there should be one column named `Symbol`)} 29 | 30 | \item{complex_input}{signaling complex information from CellChatDB} 31 | } 32 | \value{ 33 | The returned value depends on the input argument: 34 | 35 | When `geneLR.return = FALSE`, it returns a data frame containing the significant interactions (L-R pairs) 36 | 37 | When `geneLR.return = TRUE`, it returns a list, the first element is a data frame containing the significant interactions (L-R pairs), and the second is a vector containing the related signaling genes of enriched L-R pairs, which can be used for examining the gene expression pattern using the function \code{\link{plotGeneExpression}} 38 | } 39 | \description{ 40 | Identify all the significant interactions (L-R pairs) and related signaling genes for a given signaling pathway 41 | } 42 | -------------------------------------------------------------------------------- /man/extractEnrichedLR_internal.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{extractEnrichedLR_internal} 4 | \alias{extractEnrichedLR_internal} 5 | \title{Identify all the significant interactions (L-R pairs) and related signaling genes for a given signaling pathway} 6 | \usage{ 7 | extractEnrichedLR_internal( 8 | net, 9 | LR, 10 | DB, 11 | signaling, 12 | enriched.only = TRUE, 13 | thresh = 0.05 14 | ) 15 | } 16 | \arguments{ 17 | \item{net, LR, DB}{object@net object@LR object@DB} 18 | 19 | \item{signaling}{a char vector containing signaling pathway names for searching} 20 | 21 | \item{enriched.only}{whether only return the identified enriched signaling genes in the database. Default = TRUE, returning the significantly enriched signaling interactions} 22 | 23 | \item{thresh}{threshold of the p-value for determining significant interaction} 24 | } 25 | \value{ 26 | a list: list(geneLR, pairLR.name.use) 27 | } 28 | \description{ 29 | Identify all the significant interactions (L-R pairs) and related signaling genes for a given signaling pathway 30 | } 31 | -------------------------------------------------------------------------------- /man/extractGene.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/database.R 3 | \name{extractGene} 4 | \alias{extractGene} 5 | \title{Extract the genes involved in CellChatDB} 6 | \usage{ 7 | extractGene(CellChatDB) 8 | } 9 | \arguments{ 10 | \item{CellChatDB}{CellChatDB databse used in the analysis} 11 | } 12 | \description{ 13 | Extract the genes involved in CellChatDB 14 | } 15 | -------------------------------------------------------------------------------- /man/extractGeneSubset.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/database.R 3 | \name{extractGeneSubset} 4 | \alias{extractGeneSubset} 5 | \title{Extract the gene name} 6 | \usage{ 7 | extractGeneSubset(geneSet, complex_input, geneIfo) 8 | } 9 | \arguments{ 10 | \item{geneSet}{gene set} 11 | 12 | \item{complex_input}{complex in CellChatDB databse} 13 | 14 | \item{geneIfo}{official gene symbol} 15 | } 16 | \description{ 17 | Extract the gene name 18 | } 19 | -------------------------------------------------------------------------------- /man/extractGeneSubsetFromPair.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/database.R 3 | \name{extractGeneSubsetFromPair} 4 | \alias{extractGeneSubsetFromPair} 5 | \title{Extract the signaling gene names from ligand-receptor pairs} 6 | \usage{ 7 | extractGeneSubsetFromPair( 8 | pairLR, 9 | object = NULL, 10 | complex_input = NULL, 11 | geneInfo = NULL, 12 | combined = TRUE 13 | ) 14 | } 15 | \arguments{ 16 | \item{pairLR}{data frame must contain columns named `ligand` and `receptor`} 17 | 18 | \item{object}{a CellChat object} 19 | 20 | \item{complex_input}{complex in CellChatDB databse} 21 | 22 | \item{geneInfo}{official gene symbol} 23 | 24 | \item{combined}{whether combining the ligand genes and receptor genes} 25 | } 26 | \description{ 27 | Extract the signaling gene names from ligand-receptor pairs 28 | } 29 | -------------------------------------------------------------------------------- /man/extractLRfromGenes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/database.R 3 | \name{extractLRfromGenes} 4 | \alias{extractLRfromGenes} 5 | \title{Extract L-R pairs associated with a given gene set} 6 | \usage{ 7 | extractLRfromGenes(geneSet, db) 8 | } 9 | \arguments{ 10 | \item{geneSet}{a vector of genes} 11 | 12 | \item{db}{one of the CellChatDB databases (e.g., CellChatDB.human, CellChatDB.mouse...)} 13 | } 14 | \description{ 15 | Extract L-R pairs associated with a given gene set 16 | } 17 | -------------------------------------------------------------------------------- /man/extract_max.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{extract_max} 4 | \alias{extract_max} 5 | \title{extract the max value of the y axis} 6 | \usage{ 7 | extract_max(p) 8 | } 9 | \arguments{ 10 | \item{p}{ggplot object} 11 | } 12 | \description{ 13 | extract the max value of the y axis 14 | } 15 | -------------------------------------------------------------------------------- /man/filterCommunication.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{filterCommunication} 4 | \alias{filterCommunication} 5 | \title{Filter cell-cell communication if there are only few number of cells in certain cell groups or inconsistent cell-cell communication across samples} 6 | \usage{ 7 | filterCommunication( 8 | object, 9 | min.cells = 10, 10 | min.samples = NULL, 11 | rare.keep = FALSE, 12 | nonFilter.keep = FALSE 13 | ) 14 | } 15 | \arguments{ 16 | \item{object}{CellChat object} 17 | 18 | \item{min.cells}{The minmum number of cells required in each cell group for cell-cell communication} 19 | 20 | \item{min.samples}{The minmum number of samples required for consistent cell-cell communication across samples (that is an interaction present in at least `min.samples` samples) when mutiple samples/replicates/batches are merged as an input for CellChat analysis.} 21 | 22 | \item{rare.keep}{Whether to keep the interactions associated with the rare populations when min.samples >= 2. When a rare population is identified in the merged samples (say 15 cells in this rare population from two samples), it is likely to filter out the interactions associated with this rare population when setting min.samples >= 2. Setting `rare.keep = TRUE` to retain the identified interactions associated with this rare population.} 23 | 24 | \item{nonFilter.keep}{Whether to keep the non-filtered cell-cell communication in the CellChat object. This is useful for avoiding re-running `computeCommunProb` if you want to adjust the parameters when running `filterCommunication`.} 25 | } 26 | \value{ 27 | CellChat object with an updated slot net 28 | } 29 | \description{ 30 | Filter cell-cell communication if there are only few number of cells in certain cell groups or inconsistent cell-cell communication across samples 31 | } 32 | -------------------------------------------------------------------------------- /man/findEnrichedSignaling.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{findEnrichedSignaling} 4 | \alias{findEnrichedSignaling} 5 | \title{Find the enriched signaling according to the genes (e.g.DEGs) and cell groups of interest} 6 | \usage{ 7 | findEnrichedSignaling( 8 | object, 9 | features, 10 | idents = NULL, 11 | pattern = c("both", "outgoing", "incoming"), 12 | thresh = 0.05 13 | ) 14 | } 15 | \arguments{ 16 | \item{object}{CellChat object} 17 | 18 | \item{features}{a vector giving the genes of interest} 19 | 20 | \item{idents}{a vector giving the names of cell groups of interest. If idents = NULL, it returns signaling according to the input features.} 21 | 22 | \item{pattern}{"both", "outgoing" or "incoming"} 23 | 24 | \item{thresh}{threshold of the p-value for determining significant interaction} 25 | } 26 | \value{ 27 | a dataframe of the cell-cell communication associated with the input features. 28 | } 29 | \description{ 30 | Find the enriched signaling according to the genes (e.g.DEGs) and cell groups of interest 31 | } 32 | \examples{ 33 | \dontrun{ 34 | # find all the significant outgoing signaling according to the features and cell groups of interest 35 | df <- findEnrichedSignaling(object, features = c("CCL19", "CXCL12"), idents = c("Inflam. FIB", "COL11A1+ FIB"), pattern ="outgoing") 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /man/geometricMean.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{geometricMean} 4 | \alias{geometricMean} 5 | \title{Compute the geometric mean} 6 | \usage{ 7 | geometricMean(x, na.rm = TRUE) 8 | } 9 | \arguments{ 10 | \item{x}{a numeric vector} 11 | 12 | \item{na.rm}{whether remove na} 13 | } 14 | \description{ 15 | Compute the geometric mean 16 | } 17 | -------------------------------------------------------------------------------- /man/getMaxWeight.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{getMaxWeight} 4 | \alias{getMaxWeight} 5 | \title{Compute the maximum value of certain measures in the inferred cell-cell communication networks} 6 | \usage{ 7 | getMaxWeight( 8 | object.list, 9 | slot.name = c("idents", "net"), 10 | attribute = c("idents", "count") 11 | ) 12 | } 13 | \arguments{ 14 | \item{object.list}{List of CellChat objects} 15 | 16 | \item{slot.name}{the slot name of object that is used to compute the maximum value. 17 | 18 | When slot.name = "idents", 'attribute' should be "idents", which will compute the maximum number of cells per cell group across all datasets 19 | 20 | When slot.name = "net", 'attribute' can be either "count" or "weight", which will compute he maximum number of interactions (or interaction weights) across all datasets 21 | 22 | When slot.name = "net" or "netP", 'attribute' can be a single pathway name or a ligand-receptor pair name} 23 | 24 | \item{attribute}{the attribute to compute the maximum values. `attribute` should have the same length as `slot.name`. 25 | 26 | `attribute` can only be "count", "weight","count.merged","weight.merged" or a single pathway name or a ligand-receptor pair name} 27 | } 28 | \value{ 29 | A numeric vector 30 | } 31 | \description{ 32 | To better control the node size and edge weights of the inferred networks across different datasets, 33 | we compute the maximum number of cells per cell group and the maximum number of interactions (or interaction weights) across all datasets 34 | } 35 | -------------------------------------------------------------------------------- /man/ggPalette.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{ggPalette} 4 | \alias{ggPalette} 5 | \title{Generate ggplot2 colors} 6 | \usage{ 7 | ggPalette(n) 8 | } 9 | \arguments{ 10 | \item{n}{number of colors to generate} 11 | } 12 | \description{ 13 | Generate ggplot2 colors 14 | } 15 | -------------------------------------------------------------------------------- /man/identifyCommunicationPatterns.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{identifyCommunicationPatterns} 4 | \alias{identifyCommunicationPatterns} 5 | \title{Identification of major signals for specific cell groups and general communication patterns} 6 | \usage{ 7 | identifyCommunicationPatterns( 8 | object, 9 | slot.name = "netP", 10 | pattern = c("outgoing", "incoming"), 11 | k = NULL, 12 | k.range = seq(2, 10), 13 | heatmap.show = TRUE, 14 | color.use = NULL, 15 | color.heatmap = "Spectral", 16 | title.legend = "Contributions", 17 | width = 4, 18 | height = 6, 19 | font.size = 8 20 | ) 21 | } 22 | \arguments{ 23 | \item{object}{CellChat object} 24 | 25 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 26 | 27 | \item{pattern}{"outgoing" or "incoming"} 28 | 29 | \item{k}{the number of patterns} 30 | 31 | \item{k.range}{a range of the number of patterns} 32 | 33 | \item{heatmap.show}{whether showing heatmap} 34 | 35 | \item{color.use}{the character vector defining the color of each cell group} 36 | 37 | \item{color.heatmap}{a color name in brewer.pal} 38 | 39 | \item{title.legend}{the title of legend in heatmap} 40 | 41 | \item{width}{width of heatmap} 42 | 43 | \item{height}{height of heatmap} 44 | 45 | \item{font.size}{fontsize in heatmap} 46 | } 47 | \description{ 48 | Identification of major signals for specific cell groups and general communication patterns 49 | } 50 | -------------------------------------------------------------------------------- /man/identifyEnrichedInteractions.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{identifyEnrichedInteractions} 4 | \alias{identifyEnrichedInteractions} 5 | \title{Identify all the significant interactions (L-R pairs) from some cell groups to other cell groups} 6 | \usage{ 7 | identifyEnrichedInteractions( 8 | object, 9 | from, 10 | to, 11 | bidirection = FALSE, 12 | pair.only = TRUE, 13 | pairLR.use0 = NULL, 14 | thresh = 0.05 15 | ) 16 | } 17 | \arguments{ 18 | \item{object}{CellChat object} 19 | 20 | \item{from}{a vector giving the index or the name of source cell groups} 21 | 22 | \item{to}{a corresponding vector giving the index or the name of target cell groups. Note: The length of 'from' and 'to' must be the same, giving the corresponding pair of cell groups for communication.} 23 | 24 | \item{bidirection}{whether show the bidirectional communication, i.e., both 'from'->'to' and 'to'->'from'.} 25 | 26 | \item{pair.only}{whether only return ligand-receptor pairs without pathway names and communication strength} 27 | 28 | \item{pairLR.use0}{ligand-receptor pairs to use; default is all the significant interactions} 29 | 30 | \item{thresh}{threshold of the p-value for determining significant interaction} 31 | } 32 | \description{ 33 | Identify all the significant interactions (L-R pairs) from some cell groups to other cell groups 34 | } 35 | -------------------------------------------------------------------------------- /man/identifyOverExpressedGenes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{identifyOverExpressedGenes} 4 | \alias{identifyOverExpressedGenes} 5 | \title{Identify over-expressed signaling genes associated with each cell group} 6 | \usage{ 7 | identifyOverExpressedGenes( 8 | object, 9 | data.use = NULL, 10 | group.by = NULL, 11 | idents.use = NULL, 12 | invert = FALSE, 13 | group.dataset = NULL, 14 | pos.dataset = NULL, 15 | group.DE.combined = FALSE, 16 | features.name = "features", 17 | only.pos = TRUE, 18 | features = NULL, 19 | return.object = TRUE, 20 | thresh.pc = 0, 21 | thresh.fc = 0, 22 | thresh.p = 0.05, 23 | do.DE = TRUE, 24 | do.fast = TRUE, 25 | min.cells = 10 26 | ) 27 | } 28 | \arguments{ 29 | \item{object}{CellChat object} 30 | 31 | \item{data.use}{a customed data matrix. Default: data.use = NULL and the expression matrix in the slot 'data.signaling' is used} 32 | 33 | \item{group.by}{cell group information; default is `object@idents`; otherwise it should be one of the column names of the meta slot} 34 | 35 | \item{idents.use}{a subset of cell groups used for analysis} 36 | 37 | \item{invert}{whether to invert the idents.use} 38 | 39 | \item{group.dataset}{dataset origin information in a merged CellChat object; set it as one of the column names of meta slot when identifying the highly enriched genes in one dataset for each cell group} 40 | 41 | \item{pos.dataset}{the dataset name used for identifying highly enriched genes in this dataset for each cell group} 42 | 43 | \item{group.DE.combined}{Whether to perform differential expression between conditions by ignoring cell group information. By default, group.DE.combined = FALSE, which will perform differential expression analysis between two biological conditions for each cell group; 44 | When group.DE.combined = TRUE, it will perform DE analysis by combining all cell groups together.} 45 | 46 | \item{features.name}{a char name used for storing the over-expressed signaling genes in `object@var.features[[features.name]]`} 47 | 48 | \item{only.pos}{Only return positive markers} 49 | 50 | \item{features}{features used for identifying Over Expressed genes. default use all features} 51 | 52 | \item{return.object}{whether to return the object; otherwise return a data frame consisting of over-expressed signaling genes associated with each cell group} 53 | 54 | \item{thresh.pc}{Threshold of the fraction of cells expressed in one cluster, i.e., thresh.pc = 0.1} 55 | 56 | \item{thresh.fc}{Threshold of Log Fold Change, i.e., thresh.pc = 0.1} 57 | 58 | \item{thresh.p}{Threshold of p-values, i.e., thresh.pc = 0.05} 59 | 60 | \item{do.DE}{Whether to perform differential expression analysis. By default do.DE = TRUE; When do.DE = FALSE, selecting over-expressed genes that are expressed in more than `min.cells` cells.} 61 | 62 | \item{do.fast}{If do.fast = TRUE, then perform a ultra-fast Wilcoxon test using presto package; otherwise using stats package. These two methods produce different logFC values, and the presto::wilcoxauc method gives smaller values.} 63 | 64 | \item{min.cells}{the minmum number of expressed cells required for the genes that are considered for cell-cell communication analysis} 65 | } 66 | \value{ 67 | A CellChat object or a data frame. If returning a CellChat object, two new elements named 'features.name' and paste0(features.name, ".info") will be added into the list `object@var.features` 68 | `object@var.features[[features.name]]` is a vector consisting of the identified over-expressed signaling genes; 69 | `object@var.features[[paste0(features.name, ".info")]]` is a data frame returned from the differential expression analysis 70 | } 71 | \description{ 72 | USERS can use customized gene set as over-expressed signaling genes by setting `object@var.features[[features.name]] <- features.sig` 73 | The Bonferroni corrected/adjusted p value can be obtained via `object@var.features[[paste0(features.name, ".info")]]`. Note that by default `features.name = "features"` 74 | } 75 | -------------------------------------------------------------------------------- /man/identifyOverExpressedInteractions.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{identifyOverExpressedInteractions} 4 | \alias{identifyOverExpressedInteractions} 5 | \title{Identify over-expressed ligand-receptor interactions (pairs) within the used CellChatDB} 6 | \usage{ 7 | identifyOverExpressedInteractions( 8 | object, 9 | features.name = "features", 10 | variable.both = TRUE, 11 | features = NULL, 12 | return.object = TRUE 13 | ) 14 | } 15 | \arguments{ 16 | \item{object}{CellChat object} 17 | 18 | \item{features.name}{a char name used for assess the results in `object@var.features[[features.name]]`} 19 | 20 | \item{variable.both}{variable.both = TRUE will require that both ligand and receptor from one pair are over-expressed; 21 | 22 | variable.both = FALSE will only require that either ligand or receptor from one pair is over-expressed, leading to more over-expressed ligand-receptor interactions (pairs) for further analysis.} 23 | 24 | \item{features}{a vector of features to use. default use all over-expressed genes in `object@var.features[[features.name]]`} 25 | 26 | \item{return.object}{whether returning a CellChat object. If FALSE, it will return a data frame containing the over-expressed ligand-receptor pairs} 27 | } 28 | \value{ 29 | A CellChat object or a data frame. If returning a CellChat object, a new element named 'LRsig' will be added into the list `object@LR` 30 | } 31 | \description{ 32 | Identify over-expressed ligand-receptor interactions (pairs) within the used CellChatDB 33 | } 34 | -------------------------------------------------------------------------------- /man/identifyOverExpressedLigandReceptor.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{identifyOverExpressedLigandReceptor} 4 | \alias{identifyOverExpressedLigandReceptor} 5 | \title{Identify over-expressed ligands and (complex) receptors associated with each cell group} 6 | \usage{ 7 | identifyOverExpressedLigandReceptor( 8 | object, 9 | features.name = "features", 10 | features = NULL, 11 | return.object = TRUE 12 | ) 13 | } 14 | \arguments{ 15 | \item{object}{CellChat object} 16 | 17 | \item{features.name}{a char name used for storing the over-expressed ligands and receptors in `object@var.features[[paste0(features.name, ".LR")]]`} 18 | 19 | \item{features}{a vector of features to use. default use all over-expressed genes in `object@var.features[[features.name]]`} 20 | 21 | \item{return.object}{whether returning a CellChat object. If FALSE, it will return a data frame containing over-expressed ligands and (complex) receptors associated with each cell group} 22 | } 23 | \value{ 24 | A CellChat object or a data frame. If returning a CellChat object, a new element named paste0(features.name, ".LR") will be added into the list `object@var.features` 25 | } 26 | \description{ 27 | This function identifies the over-expressed ligands and (complex) receptors based on the identified signaling genes from 'identifyOverExpressedGenes'. 28 | } 29 | -------------------------------------------------------------------------------- /man/l1NormalizeColumns.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{l1NormalizeColumns} 4 | \alias{l1NormalizeColumns} 5 | \title{Column-normalize a sparse, symmetric matrix (using the l1 norm) so that each 6 | column sums to 1.} 7 | \usage{ 8 | l1NormalizeColumns(A) 9 | } 10 | \arguments{ 11 | \item{A}{matrix} 12 | } 13 | \value{ 14 | column-normalized sparse matrix object 15 | } 16 | \description{ 17 | Column-normalize a sparse, symmetric matrix (using the l1 norm) so that each 18 | column sums to 1. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/l1NormalizeRows.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{l1NormalizeRows} 4 | \alias{l1NormalizeRows} 5 | \title{Row-normalize a sparse, symmetric matrix (using the l1 norm) so that each 6 | row sums to 1.} 7 | \usage{ 8 | l1NormalizeRows(A) 9 | } 10 | \arguments{ 11 | \item{A}{matrix} 12 | } 13 | \value{ 14 | row-normalized sparse matrix object 15 | } 16 | \description{ 17 | Row-normalize a sparse, symmetric matrix (using the l1 norm) so that each 18 | row sums to 1. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/liftCellChat.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CellChat_class.R 3 | \name{liftCellChat} 4 | \alias{liftCellChat} 5 | \title{Update a CellChat object by lifting up the cell groups to the same cell labels across all datasets} 6 | \usage{ 7 | liftCellChat(object, group.new = NULL) 8 | } 9 | \arguments{ 10 | \item{object}{A single or merged CellChat object} 11 | 12 | \item{group.new}{A char vector giving the cell labels to lift up. The order of cell labels in the vector will be used for setting the new cell identity. 13 | 14 | If the input is a merged CellChat object and group.new = NULL, it will use the cell labels from one dataset with the maximum number of cell groups 15 | 16 | If the input is a single CellChat object, `group.new` must be defined.} 17 | } 18 | \value{ 19 | a updated CellChat object 20 | } 21 | \description{ 22 | This function is useful when comparing inferred communications across different datasets with different cellular compositions 23 | } 24 | -------------------------------------------------------------------------------- /man/mergeCellChat.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CellChat_class.R 3 | \name{mergeCellChat} 4 | \alias{mergeCellChat} 5 | \title{Merge CellChat objects} 6 | \usage{ 7 | mergeCellChat( 8 | object.list, 9 | add.names = NULL, 10 | merge.data = FALSE, 11 | cell.prefix = FALSE 12 | ) 13 | } 14 | \arguments{ 15 | \item{object.list}{A list of multiple CellChat objects} 16 | 17 | \item{add.names}{A vector containing the name of each dataset} 18 | 19 | \item{merge.data}{whether merging the data for ALL genes. Default only merges the data of signaling genes} 20 | 21 | \item{cell.prefix}{whether prefix cell names} 22 | } 23 | \description{ 24 | Merge CellChat objects 25 | } 26 | -------------------------------------------------------------------------------- /man/mergeInteractions.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{mergeInteractions} 4 | \alias{mergeInteractions} 5 | \title{Compute the number of interactions/interaction strength between cell types based on their associated cell subpopulations} 6 | \usage{ 7 | mergeInteractions(object, group.merged) 8 | } 9 | \arguments{ 10 | \item{object}{CellChat object} 11 | 12 | \item{group.merged}{a factor defining the group for merging different clusters/subpopulations} 13 | } 14 | \value{ 15 | An updated slot `net` by adding three elements: 16 | 17 | `count.merged`: the number of interactions between cell types (i.e., merged cell groups) 18 | 19 | `weight.merged`: interaction strength between cell types (i.e., merged cell groups) 20 | 21 | `group.merged` the defined group for merging different clusters/subpopulations 22 | } 23 | \description{ 24 | Compute the number of interactions/interaction strength between cell types based on their associated cell subpopulations 25 | } 26 | -------------------------------------------------------------------------------- /man/modify_vlnplot.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{modify_vlnplot} 4 | \alias{modify_vlnplot} 5 | \title{modified vlnplot} 6 | \usage{ 7 | modify_vlnplot( 8 | object, 9 | features, 10 | idents = NULL, 11 | split.by = NULL, 12 | cols = NULL, 13 | show.text.y = TRUE, 14 | line.size = NULL, 15 | pt.size = 0, 16 | plot.margin = margin(0, 0, 0, 0, "cm"), 17 | ... 18 | ) 19 | } 20 | \arguments{ 21 | \item{object}{Seurat object} 22 | 23 | \item{features}{Features to plot (gene expression, metrics)} 24 | 25 | \item{idents}{Which classes to include in the plot (default is all)} 26 | 27 | \item{split.by}{Name of a metadata column to split plot by;} 28 | 29 | \item{cols}{defining the color for each cell group} 30 | 31 | \item{show.text.y}{whther show y-axis text} 32 | 33 | \item{line.size}{line width in the violin plot} 34 | 35 | \item{pt.size}{size of the dots} 36 | 37 | \item{plot.margin}{adjust the white space between each plot} 38 | 39 | \item{...}{pass any arguments to VlnPlot in Seurat} 40 | } 41 | \description{ 42 | modified vlnplot 43 | } 44 | -------------------------------------------------------------------------------- /man/mycircle.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{mycircle} 4 | \alias{mycircle} 5 | \title{generate circle symbol} 6 | \usage{ 7 | mycircle(coords, v = NULL, params) 8 | } 9 | \arguments{ 10 | \item{coords}{coordinates of points} 11 | 12 | \item{v}{vetex} 13 | 14 | \item{params}{parameters} 15 | } 16 | \description{ 17 | generate circle symbol 18 | } 19 | -------------------------------------------------------------------------------- /man/netAnalysis_computeCentrality.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{netAnalysis_computeCentrality} 4 | \alias{netAnalysis_computeCentrality} 5 | \title{Compute the network centrality scores allowing identification of dominant senders, receivers, mediators and influencers in all inferred communication networks} 6 | \usage{ 7 | netAnalysis_computeCentrality( 8 | object = NULL, 9 | slot.name = "netP", 10 | net = NULL, 11 | net.name = NULL, 12 | thresh = 0.05 13 | ) 14 | } 15 | \arguments{ 16 | \item{object}{CellChat object; If object = NULL, USER must provide `net`} 17 | 18 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks. Setting slot.name = "netP" to compute the network centrality scores at the level of signaling pathways, and setting slot.name = "net" to compute the network centrality scores at the level of ligand-receptor pairs} 19 | 20 | \item{net}{compute the centrality measures on a specific signaling network given by a 2 or 3 dimemsional array net} 21 | 22 | \item{net.name}{a character vector giving the name of signaling networks} 23 | 24 | \item{thresh}{threshold of the p-value for determining significant interaction} 25 | } 26 | \description{ 27 | NB: This function was previously named as `netAnalysis_signalingRole`. The previous function `netVisual_signalingRole` is now named as `netAnalysis_signalingRole_network`. 28 | } 29 | -------------------------------------------------------------------------------- /man/netAnalysis_contribution.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{netAnalysis_contribution} 4 | \alias{netAnalysis_contribution} 5 | \title{Compute and visualize the contribution of each ligand-receptor pair in the overall signaling pathways} 6 | \usage{ 7 | netAnalysis_contribution( 8 | object, 9 | signaling, 10 | signaling.name = NULL, 11 | sources.use = NULL, 12 | targets.use = NULL, 13 | width = 0.1, 14 | vertex.receiver = NULL, 15 | thresh = 0.05, 16 | return.data = FALSE, 17 | x.rotation = 0, 18 | title = "Contribution of each L-R pair", 19 | font.size = 10, 20 | font.size.title = 10 21 | ) 22 | } 23 | \arguments{ 24 | \item{object}{CellChat object} 25 | 26 | \item{signaling}{a signaling pathway name} 27 | 28 | \item{signaling.name}{alternative signaling pathway name to show on the plot} 29 | 30 | \item{sources.use}{a vector giving the index or the name of source cell groups} 31 | 32 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 33 | 34 | \item{width}{the width of individual bar} 35 | 36 | \item{vertex.receiver}{a numeric vector giving the index of the cell groups as targets in the first hierarchy plot} 37 | 38 | \item{thresh}{threshold of the p-value for determining significant interaction} 39 | 40 | \item{return.data}{whether return the data.frame consisting of the predicted L-R pairs and their contribution} 41 | 42 | \item{x.rotation}{rotation of x-label} 43 | 44 | \item{title}{the title of the plot} 45 | 46 | \item{font.size}{font size of the text} 47 | 48 | \item{font.size.title}{font size of the title} 49 | } 50 | \description{ 51 | Compute and visualize the contribution of each ligand-receptor pair in the overall signaling pathways 52 | } 53 | -------------------------------------------------------------------------------- /man/netAnalysis_diff_signalingRole_scatter.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{netAnalysis_diff_signalingRole_scatter} 4 | \alias{netAnalysis_diff_signalingRole_scatter} 5 | \title{2D visualization of differential signaling roles (dominant senders (sources) or receivers (targets) ) of each cell group when comparing mutiple datasets} 6 | \usage{ 7 | netAnalysis_diff_signalingRole_scatter( 8 | object, 9 | color.use = NULL, 10 | comparison = c(1, 2), 11 | signaling = NULL, 12 | signaling.exclude = NULL, 13 | idents.exclude = NULL, 14 | slot.name = "netP", 15 | group = NULL, 16 | dot.size = 2.5, 17 | point.shape = c(21, 22, 24, 23, 25, 8, 3), 18 | label.size = 3, 19 | dot.alpha = 0.6, 20 | x.measure = "outdeg", 21 | y.measure = "indeg", 22 | xlabel = "Outgoing interaction strength", 23 | ylabel = "Incoming interaction strength", 24 | title = NULL, 25 | font.size = 10, 26 | font.size.title = 10, 27 | do.label = T, 28 | show.legend = T, 29 | show.axes = T 30 | ) 31 | } 32 | \arguments{ 33 | \item{object}{A merged CellChat object of a list of CellChat objects} 34 | 35 | \item{color.use}{defining the color for each cell group} 36 | 37 | \item{comparison}{an index vector giving the two datasets for comparison} 38 | 39 | \item{signaling}{a char vector containing signaling pathway names. signaling = NULL: Signaling role analysis on the aggregated cell-cell communication network from all signaling pathways} 40 | 41 | \item{signaling.exclude}{signaling pathways to exclude} 42 | 43 | \item{idents.exclude}{cell groups to exclude. This is useful when zooming into the small changes} 44 | 45 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 46 | 47 | \item{group}{a vector to categorize the cell groups, e.g., categorize the cell groups into two major categories: immune cells and fibroblasts} 48 | 49 | \item{dot.size}{the size of the symbol} 50 | 51 | \item{point.shape}{point shape when group is not NULL} 52 | 53 | \item{label.size}{font size of the text} 54 | 55 | \item{dot.alpha}{transparency} 56 | 57 | \item{x.measure}{The measure used as x-axis. This measure should be one of `names(slot(object, slot.name)$centr[[1]])` computed from `netAnalysis_computeCentrality` 58 | 59 | Default = "outdeg" is the weighted outgoing links (i.e., Outgoing interaction strength). If setting as "outdeg_unweighted", it represents the total number of outgoing signaling.} 60 | 61 | \item{y.measure}{The measure used as y-axis. This measure should be one of `names(slot(object, slot.name)$centr[[1]])` computed from `netAnalysis_computeCentrality` 62 | 63 | Default = "indeg" is the weighted incoming links (i.e., Incoming interaction strength). If setting as "indeg_unweighted", it represents the total number of incoming signaling.} 64 | 65 | \item{xlabel}{label of x-axis} 66 | 67 | \item{ylabel}{label of y-axis} 68 | 69 | \item{title}{main title of the plot} 70 | 71 | \item{font.size}{font size of the text} 72 | 73 | \item{font.size.title}{font size of the title} 74 | 75 | \item{do.label}{label the each point} 76 | 77 | \item{show.legend}{whether show the legend} 78 | 79 | \item{show.axes}{whether show the axes} 80 | } 81 | \value{ 82 | ggplot object 83 | } 84 | \description{ 85 | This scatter plot shows the differential signaling roles (dominant senders (sources) or receivers (targets) in a 2D space. 86 | 87 | x-axis and y-axis are respectively the differential outgoing or incoming communication probability associated with each cell group. 88 | Dot colors indicate different cell groups. Dot shapes indicate different categories of cell groups if `group`` is defined. 89 | 90 | Positive values indicate the increase in the second dataset while negative values indicate the increase in the first dataset 91 | } 92 | -------------------------------------------------------------------------------- /man/netAnalysis_dot.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netAnalysis_dot} 4 | \alias{netAnalysis_dot} 5 | \title{Dot plots showing the associations of latent patterns with cell groups and ligand-receptor pairs or signaling pathways} 6 | \usage{ 7 | netAnalysis_dot( 8 | object, 9 | slot.name = "netP", 10 | pattern = c("outgoing", "incoming"), 11 | cutoff = NULL, 12 | color.use = NULL, 13 | pathway.show = NULL, 14 | group.show = NULL, 15 | shape = 21, 16 | dot.size = c(1, 3), 17 | dot.alpha = 1, 18 | main.title = NULL, 19 | font.size = 10, 20 | font.size.title = 12 21 | ) 22 | } 23 | \arguments{ 24 | \item{object}{CellChat object} 25 | 26 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 27 | 28 | \item{pattern}{"outgoing" or "incoming"} 29 | 30 | \item{cutoff}{the threshold for filtering out weak links. Default is 1/R where R is the number of latent patterns. We set the elements in W and H to be zero if they are less than `cutoff`.} 31 | 32 | \item{color.use}{the character vector defining the color of each cell group} 33 | 34 | \item{pathway.show}{the character vector defining the signaling to show} 35 | 36 | \item{group.show}{the character vector defining the cell group to show} 37 | 38 | \item{shape}{the shape of the symbol: 21 for circle and 22 for square} 39 | 40 | \item{dot.size}{a range defining the size of the symbol} 41 | 42 | \item{dot.alpha}{transparency} 43 | 44 | \item{main.title}{the title of plot} 45 | 46 | \item{font.size}{font size of the text} 47 | 48 | \item{font.size.title}{font size of the title} 49 | } 50 | \description{ 51 | Using a contribution score of each cell group to each signaling pathway computed by multiplying W by H obtained from `identifyCommunicationPatterns`, we constructed a dot plot in which the dot size is proportion to the contribution score to show association between cell group and their enriched signaling pathways. 52 | } 53 | -------------------------------------------------------------------------------- /man/netAnalysis_river.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netAnalysis_river} 4 | \alias{netAnalysis_river} 5 | \title{River plot showing the associations of latent patterns with cell groups and ligand-receptor pairs or signaling pathways} 6 | \usage{ 7 | netAnalysis_river( 8 | object, 9 | slot.name = "netP", 10 | pattern = c("outgoing", "incoming"), 11 | cutoff = 0.5, 12 | sources.use = NULL, 13 | targets.use = NULL, 14 | signaling = NULL, 15 | color.use = NULL, 16 | color.use.pattern = NULL, 17 | color.use.signaling = "grey50", 18 | do.order = FALSE, 19 | main.title = NULL, 20 | font.size = 2.5, 21 | font.size.title = 12 22 | ) 23 | } 24 | \arguments{ 25 | \item{object}{CellChat object} 26 | 27 | \item{slot.name}{the slot name of object: “netP” or “net”. Use “netP” to analyze cell-cell communication at the level of signaling pathways, and “net” to analyze cell-cell communication at the level of ligand-receptor pairs.} 28 | 29 | \item{pattern}{"outgoing" or "incoming"} 30 | 31 | \item{cutoff}{the threshold for filtering out weak links} 32 | 33 | \item{sources.use}{a vector giving the index or the name of source cell groups of interest} 34 | 35 | \item{targets.use}{a vector giving the index or the name of target cell groups of interest} 36 | 37 | \item{signaling}{a character vector giving the name of signaling pathways of interest} 38 | 39 | \item{color.use}{the character vector defining the color of each cell group} 40 | 41 | \item{color.use.pattern}{the character vector defining the color of each pattern} 42 | 43 | \item{color.use.signaling}{the character vector defining the color of each signaling} 44 | 45 | \item{do.order}{whether reorder the cell groups or signaling according to their similarity} 46 | 47 | \item{main.title}{the title of plot} 48 | 49 | \item{font.size}{font size of the text} 50 | 51 | \item{font.size.title}{font size of the title} 52 | } 53 | \description{ 54 | River (alluvial) plot shows the correspondence between the inferred latent patterns and cell groups as well as ligand-receptor pairs or signaling pathways. 55 | } 56 | \details{ 57 | The thickness of the flow indicates the contribution of the cell group or signaling pathway to each latent pattern. The height of each pattern is proportional to the number of its associated cell groups or signaling pathways. 58 | 59 | Outgoing patterns reveal how the sender cells coordinate with each other as well as how they coordinate with certain signaling pathways to drive communication. 60 | 61 | Incoming patterns show how the target cells coordinate with each other as well as how they coordinate with certain signaling pathways to respond to incoming signaling. 62 | } 63 | -------------------------------------------------------------------------------- /man/netAnalysis_signalingChanges_scatter.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{netAnalysis_signalingChanges_scatter} 4 | \alias{netAnalysis_signalingChanges_scatter} 5 | \title{2D visualization of differential outgoing and incoming signaling associated with one cell group} 6 | \usage{ 7 | netAnalysis_signalingChanges_scatter( 8 | object, 9 | idents.use, 10 | color.use = c("grey10", "#F8766D", "#00BFC4"), 11 | comparison = c(1, 2), 12 | signaling = NULL, 13 | signaling.label = NULL, 14 | top.label = 1, 15 | signaling.exclude = NULL, 16 | xlims = NULL, 17 | ylims = NULL, 18 | slot.name = "netP", 19 | dot.size = 2.5, 20 | point.shape = c(21, 22, 24, 23), 21 | label.size = 3, 22 | dot.alpha = 0.6, 23 | x.measure = "outdeg", 24 | y.measure = "indeg", 25 | xlabel = "Differential outgoing interaction strength", 26 | ylabel = "Differential incoming interaction strength", 27 | title = NULL, 28 | font.size = 10, 29 | font.size.title = 10, 30 | do.label = T, 31 | show.legend = T, 32 | show.axes = T 33 | ) 34 | } 35 | \arguments{ 36 | \item{object}{A merged CellChat object of a list of CellChat objects} 37 | 38 | \item{idents.use}{the cell group names of interest. Should be one of `levels(object@idents$joint)`} 39 | 40 | \item{color.use}{a vector with three elements: the first is for coloring shared pathways, the second is for specific pathways in the first dataset, and the third is for specific pathways in the second dataset} 41 | 42 | \item{comparison}{an index vector giving the two datasets for comparison} 43 | 44 | \item{signaling}{a char vector containing signaling pathway names. signaling = NULL: Signaling role analysis on the aggregated cell-cell communication network from all signaling pathways} 45 | 46 | \item{signaling.label}{a char vector giving the signaling names to show when labeling each point} 47 | 48 | \item{top.label}{the fraction of signaling pathways to label} 49 | 50 | \item{signaling.exclude}{signaling pathways to exclude when plotting} 51 | 52 | \item{xlims, ylims}{set x-Axis and y-Axis Limits for zoom into the plot. e.g., xlims = c(-0.05, 0.1), ylims = c(-0.01, 0.035)} 53 | 54 | \item{slot.name}{the slot name of object} 55 | 56 | \item{dot.size}{the size of the symbol} 57 | 58 | \item{point.shape}{point shape} 59 | 60 | \item{label.size}{font size of the text} 61 | 62 | \item{dot.alpha}{transparency} 63 | 64 | \item{x.measure}{The measure used as x-axis. This measure should be one of `names(slot(object, slot.name)$centr[[1]])` computed from `netAnalysis_computeCentrality` 65 | 66 | Default = "outdeg" is the weighted outgoing links (i.e., Outgoing interaction strength). If setting as "outdeg_unweighted", it represents the total number of outgoing signaling.} 67 | 68 | \item{y.measure}{The measure used as y-axis. This measure should be one of `names(slot(object, slot.name)$centr[[1]])` computed from `netAnalysis_computeCentrality` 69 | 70 | Default = "indeg" is the weighted incoming links (i.e., Incoming interaction strength). If setting as "indeg_unweighted", it represents the total number of incoming signaling.} 71 | 72 | \item{xlabel}{label of x-axis} 73 | 74 | \item{ylabel}{label of y-axis} 75 | 76 | \item{title}{main title of the plot} 77 | 78 | \item{font.size}{font size of the text} 79 | 80 | \item{font.size.title}{font size of the title} 81 | 82 | \item{do.label}{label the each point} 83 | 84 | \item{show.legend}{whether show the legend} 85 | 86 | \item{show.axes}{whether show the axes} 87 | } 88 | \value{ 89 | ggplot object 90 | } 91 | \description{ 92 | Positive values indicate the increase in the second dataset while negative values indicate the increase in the first dataset 93 | } 94 | -------------------------------------------------------------------------------- /man/netAnalysis_signalingRole_heatmap.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{netAnalysis_signalingRole_heatmap} 4 | \alias{netAnalysis_signalingRole_heatmap} 5 | \title{Heatmap showing the contribution of signals (signaling pathways or ligand-receptor pairs) to cell groups in terms of outgoing or incoming signaling} 6 | \usage{ 7 | netAnalysis_signalingRole_heatmap( 8 | object, 9 | signaling = NULL, 10 | pattern = c("outgoing", "incoming", "all"), 11 | slot.name = "netP", 12 | color.use = NULL, 13 | color.heatmap = "BuGn", 14 | title = NULL, 15 | width = 10, 16 | height = 8, 17 | font.size = 8, 18 | font.size.title = 10, 19 | cluster.rows = FALSE, 20 | cluster.cols = FALSE 21 | ) 22 | } 23 | \arguments{ 24 | \item{object}{CellChat object} 25 | 26 | \item{signaling}{a character vector giving the names of signaling networks of interest} 27 | 28 | \item{pattern}{this parameter can be set as "outgoing", "incoming" or "all". When pattern = "all", CellChat aggregates the outgoing and incoming signaling strength together;} 29 | 30 | \item{slot.name}{the slot name of object that is used to examine the signaling patterns at the level of signaling pathways (slot.name = "netP") or ligand-receptor pairs (slot.name = "net");} 31 | 32 | \item{color.use}{the character vector defining the color of each cell group} 33 | 34 | \item{color.heatmap}{a color name in brewer.pal} 35 | 36 | \item{title}{title name} 37 | 38 | \item{width}{width of heatmap} 39 | 40 | \item{height}{height of heatmap} 41 | 42 | \item{font.size}{fontsize in heatmap} 43 | 44 | \item{font.size.title}{font size of the title} 45 | 46 | \item{cluster.rows}{whether cluster rows} 47 | 48 | \item{cluster.cols}{whether cluster columns} 49 | } 50 | \description{ 51 | In this heatmap, colobar represents the relative signaling strength of a signaling pathway across cell groups (NB: values are row-scaled). 52 | The top colored bar plot shows the total signaling strength of a cell group by summarizing all signaling pathways displayed in the heatmap. 53 | The right grey bar plot shows the total signaling strength of a signaling pathway by summarizing all cell groups displayed in the heatmap. 54 | } 55 | -------------------------------------------------------------------------------- /man/netAnalysis_signalingRole_network.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{netAnalysis_signalingRole_network} 4 | \alias{netAnalysis_signalingRole_network} 5 | \title{Heatmap showing the centrality scores/importance of cell groups as senders, receivers, mediators and influencers in a single intercellular communication network} 6 | \usage{ 7 | netAnalysis_signalingRole_network( 8 | object, 9 | signaling, 10 | slot.name = "netP", 11 | measure = c("outdeg", "indeg", "flowbet", "info"), 12 | measure.name = c("Sender", "Receiver", "Mediator", "Influencer"), 13 | color.use = NULL, 14 | color.heatmap = "BuGn", 15 | width = 6.5, 16 | height = 1.4, 17 | font.size = 8, 18 | font.size.title = 10, 19 | cluster.rows = FALSE, 20 | cluster.cols = FALSE 21 | ) 22 | } 23 | \arguments{ 24 | \item{object}{CellChat object} 25 | 26 | \item{signaling}{a character vector giving the name of signaling networks} 27 | 28 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 29 | 30 | \item{measure}{centrality measures to show} 31 | 32 | \item{measure.name}{the names of centrality measures to show} 33 | 34 | \item{color.use}{the character vector defining the color of each cell group} 35 | 36 | \item{color.heatmap}{a color name in brewer.pal} 37 | 38 | \item{width}{width of heatmap} 39 | 40 | \item{height}{height of heatmap} 41 | 42 | \item{font.size}{fontsize in heatmap} 43 | 44 | \item{font.size.title}{font size of the title} 45 | 46 | \item{cluster.rows}{whether cluster rows} 47 | 48 | \item{cluster.cols}{whether cluster columns} 49 | } 50 | \description{ 51 | Heatmap showing the centrality scores/importance of cell groups as senders, receivers, mediators and influencers in a single intercellular communication network 52 | } 53 | -------------------------------------------------------------------------------- /man/netAnalysis_signalingRole_scatter.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{netAnalysis_signalingRole_scatter} 4 | \alias{netAnalysis_signalingRole_scatter} 5 | \title{2D visualization of dominant senders (sources) and receivers (targets)} 6 | \usage{ 7 | netAnalysis_signalingRole_scatter( 8 | object, 9 | signaling = NULL, 10 | color.use = NULL, 11 | slot.name = "netP", 12 | group = NULL, 13 | weight.MinMax = NULL, 14 | dot.size = c(2, 6), 15 | point.shape = c(21, 22, 24, 23, 25, 8, 3), 16 | label.size = 3, 17 | dot.alpha = 0.6, 18 | x.measure = "outdeg", 19 | y.measure = "indeg", 20 | xlabel = "Outgoing interaction strength", 21 | ylabel = "Incoming interaction strength", 22 | title = NULL, 23 | font.size = 10, 24 | font.size.title = 10, 25 | do.label = T, 26 | show.legend = T, 27 | show.axes = T 28 | ) 29 | } 30 | \arguments{ 31 | \item{object}{CellChat object} 32 | 33 | \item{signaling}{a char vector containing signaling pathway names. signaling = NULL: signaling role analysis on the aggregated cell-cell communication network from all signaling pathways} 34 | 35 | \item{color.use}{defining the color for each cell group} 36 | 37 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 38 | 39 | \item{group}{a vector to categorize the cell groups, e.g., categorize the cell groups into two major categories: immune cells and fibroblasts} 40 | 41 | \item{weight.MinMax}{the Minmum/maximum weight, which is useful to control the dot size when comparing multiple datasets} 42 | 43 | \item{dot.size}{a range defining the size of the symbol} 44 | 45 | \item{point.shape}{point shape when group is not NULL} 46 | 47 | \item{label.size}{font size of the text} 48 | 49 | \item{dot.alpha}{transparency} 50 | 51 | \item{x.measure}{The measure used as x-axis. This measure should be one of `names(slot(object, slot.name)$centr[[1]])` computed from `netAnalysis_computeCentrality` 52 | 53 | Default = "outdeg" is the weighted outgoing links (i.e., outgoing interaction strength). If setting as "outdeg_unweighted", it represents the total number of outgoing signaling.} 54 | 55 | \item{y.measure}{The measure used as y-axis. This measure should be one of `names(slot(object, slot.name)$centr[[1]])` computed from `netAnalysis_computeCentrality` 56 | 57 | Default = "indeg" is the weighted incoming links (i.e., incoming interaction strength). If setting as "indeg_unweighted", it represents the total number of incoming signaling.} 58 | 59 | \item{xlabel}{label of x-axis} 60 | 61 | \item{ylabel}{label of y-axis} 62 | 63 | \item{title}{main title of the plot} 64 | 65 | \item{font.size}{font size of the text} 66 | 67 | \item{font.size.title}{font size of the title} 68 | 69 | \item{do.label}{label the each point} 70 | 71 | \item{show.legend}{whether show the legend} 72 | 73 | \item{show.axes}{whether show the axes} 74 | } 75 | \value{ 76 | ggplot object 77 | } 78 | \description{ 79 | This scatter plot shows the dominant senders (sources) and receivers (targets) in a 2D space. 80 | x-axis and y-axis are respectively the total outgoing or incoming communication probability associated with each cell group. 81 | Dot size is proportional to the number of inferred links (both outgoing and incoming) associated with each cell group. 82 | Dot colors indicate different cell groups. Dot shapes indicate different categories of cell groups if `group`` is defined. 83 | } 84 | -------------------------------------------------------------------------------- /man/netClustering.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{netClustering} 4 | \alias{netClustering} 5 | \title{Classification learning of the signaling networks} 6 | \usage{ 7 | netClustering( 8 | object, 9 | slot.name = "netP", 10 | type = c("functional", "structural"), 11 | comparison = NULL, 12 | k = NULL, 13 | methods = "kmeans", 14 | do.plot = TRUE, 15 | fig.id = NULL, 16 | do.parallel = TRUE, 17 | nCores = 4, 18 | k.eigen = NULL 19 | ) 20 | } 21 | \arguments{ 22 | \item{object}{CellChat object} 23 | 24 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 25 | 26 | \item{type}{"functional","structural"} 27 | 28 | \item{comparison}{a numerical vector giving the datasets for comparison. No need to define for a single dataset. Default are all datasets when object is a merged object} 29 | 30 | \item{k}{the number of signaling groups when running kmeans} 31 | 32 | \item{methods}{the methods for clustering: "kmeans" or "spectral"} 33 | 34 | \item{do.plot}{whether showing the eigenspectrum for inferring number of clusters; Default will save the plot} 35 | 36 | \item{fig.id}{add a unique figure id when saving the plot} 37 | 38 | \item{do.parallel}{whether doing parallel when inferring the number of signaling groups when running kmeans} 39 | 40 | \item{nCores}{number of workers when doing parallel} 41 | 42 | \item{k.eigen}{the number of eigenvalues used when doing spectral clustering} 43 | } 44 | \description{ 45 | Classification learning of the signaling networks 46 | } 47 | -------------------------------------------------------------------------------- /man/netEmbedding.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{netEmbedding} 4 | \alias{netEmbedding} 5 | \title{Manifold learning of the signaling networks based on their similarity} 6 | \usage{ 7 | netEmbedding( 8 | object, 9 | slot.name = "netP", 10 | type = c("functional", "structural"), 11 | comparison = NULL, 12 | pathway.remove = NULL, 13 | umap.method = c("umap-learn", "uwot"), 14 | n_neighbors = NULL, 15 | min_dist = 0.3, 16 | ... 17 | ) 18 | } 19 | \arguments{ 20 | \item{object}{CellChat object} 21 | 22 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 23 | 24 | \item{type}{"functional","structural"} 25 | 26 | \item{comparison}{a numerical vector giving the datasets for comparison. No need to define for a single dataset. Default are all datasets when object is a merged object} 27 | 28 | \item{pathway.remove}{a range of the number of patterns} 29 | 30 | \item{umap.method}{UMAP implementation to run. 31 | 32 | Can be umap-learn: Run the python umap-learn package; uwot: Runs umap via the uwot R package; If umap.method = "uwot", please make sure you have installed the 'uwot' (https://github.com/jlmelville/uwot)} 33 | 34 | \item{n_neighbors}{the number of nearest neighbors in running umap} 35 | 36 | \item{min_dist}{This controls how tightly the embedding is allowed compress points together. 37 | Larger values ensure embedded points are moreevenly distributed, while smaller values allow the 38 | algorithm to optimise more accurately with regard to local structure. Sensible values are in the range 0.001 to 0.5.} 39 | 40 | \item{...}{Parameters passing to umap} 41 | } 42 | \description{ 43 | Manifold learning of the signaling networks based on their similarity 44 | } 45 | -------------------------------------------------------------------------------- /man/netMappingDEG.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{netMappingDEG} 4 | \alias{netMappingDEG} 5 | \title{Mapping the differential expressed genes (DEG) information onto the inferred cell-cell communications} 6 | \usage{ 7 | netMappingDEG(object, features.name, variable.all = TRUE, thresh = 0.05) 8 | } 9 | \arguments{ 10 | \item{object}{CellChat object} 11 | 12 | \item{features.name}{a char name used for extracting the DEG in `object@var.features[[features.name]]`} 13 | 14 | \item{variable.all}{variable.all = TRUE will compute the c("pvalues", "logFC", "pct.1", "pct.2") for a ligand/receptor complex using the mean value of its all subunits, that is requiring all subunits of the complex are differential expressed; 15 | variable.all = FALSE will compute the minimum value of "pvalues" and maximum value of c("logFC", "pct.1", "pct.2") among the subunits, that is only requiring that any one of the subunits of the complex is differential expressed.} 16 | 17 | \item{thresh}{threshold of the p-value for determining significant interaction} 18 | } 19 | \value{ 20 | a data frame of the inferred cell-cell communications, consisting of source, target, interaction_name, pathway_name, prob and other CellChatDB information as well as DEG information 21 | } 22 | \description{ 23 | This function returns a data frame consisting of all the inferred cell-cell communications with mapped DEG information 24 | } 25 | -------------------------------------------------------------------------------- /man/netVisual_barplot.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_barplot} 4 | \alias{netVisual_barplot} 5 | \title{Visualization of (differential) number of interactions} 6 | \usage{ 7 | netVisual_barplot( 8 | object, 9 | comparison = c(1, 2), 10 | measure = c("count", "weight"), 11 | sources.use = NULL, 12 | targets.use = NULL, 13 | invert.source = FALSE, 14 | invert.target = FALSE, 15 | signaling = NULL, 16 | slot.name = c("netP", "net"), 17 | color.use = NULL, 18 | title.name = NULL, 19 | x.lab.rot = FALSE, 20 | ... 21 | ) 22 | } 23 | \arguments{ 24 | \item{object}{A merged CellChat object or a single CellChat object} 25 | 26 | \item{comparison}{a numerical vector giving the datasets for comparison in object.list; e.g., comparison = c(1,2)} 27 | 28 | \item{measure}{"count" or "weight". "count": comparing the number of interactions; "weight": comparing the total interaction weights (strength)} 29 | 30 | \item{sources.use}{a vector giving the index or the name of source cell groups} 31 | 32 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 33 | 34 | \item{invert.source, invert.target}{retain the complementary set} 35 | 36 | \item{signaling}{a character vector giving the name of signaling networks in a single CellChat object} 37 | 38 | \item{slot.name}{the slot name of object. Set is to be "netP" if input signaling is a pathway name; Set is to be "net" if input signaling is a ligand-receptor pair} 39 | 40 | \item{color.use}{the character vector defining the color of each cell group} 41 | 42 | \item{title.name}{the name of the title} 43 | 44 | \item{x.lab.rot}{do rotation for the x-ticklabels} 45 | 46 | \item{...}{Parameters passing to `barplot_internal`} 47 | } 48 | \value{ 49 | an object of ggplot 50 | } 51 | \description{ 52 | Visualization of (differential) number of interactions 53 | } 54 | -------------------------------------------------------------------------------- /man/netVisual_chord_cell.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_chord_cell} 4 | \alias{netVisual_chord_cell} 5 | \title{Chord diagram for visualizing cell-cell communication for a signaling pathway} 6 | \usage{ 7 | netVisual_chord_cell( 8 | object, 9 | signaling = NULL, 10 | net = NULL, 11 | slot.name = "netP", 12 | color.use = NULL, 13 | group = NULL, 14 | cell.order = NULL, 15 | sources.use = NULL, 16 | targets.use = NULL, 17 | lab.cex = 0.8, 18 | small.gap = 1, 19 | big.gap = 10, 20 | annotationTrackHeight = c(0.03), 21 | remove.isolate = FALSE, 22 | link.visible = TRUE, 23 | scale = FALSE, 24 | directional = 1, 25 | link.target.prop = TRUE, 26 | reduce = -1, 27 | transparency = 0.4, 28 | link.border = NA, 29 | title.name = NULL, 30 | show.legend = FALSE, 31 | legend.pos.x = 20, 32 | legend.pos.y = 20, 33 | nCol = NULL, 34 | thresh = 0.05, 35 | ... 36 | ) 37 | } 38 | \arguments{ 39 | \item{object}{CellChat object} 40 | 41 | \item{signaling}{a character vector giving the name of signaling networks} 42 | 43 | \item{net}{a weighted matrix or a data frame with three columns defining the cell-cell communication network} 44 | 45 | \item{slot.name}{the slot name of object: slot.name = "net" when visualizing cell-cell communication network per each ligand-receptor pair associated with a given signaling pathway; 46 | slot.name = "netP" when visualizing cell-cell communication network at the level of signaling pathways} 47 | 48 | \item{color.use}{colors for the cell groups} 49 | 50 | \item{group}{A named group labels for making multiple-group Chord diagrams. The sector names should be used as the names in the vector. 51 | The order of group controls the sector orders and if group is set as a factor, the order of levels controls the order of groups.} 52 | 53 | \item{cell.order}{a char vector defining the cell type orders (sector orders)} 54 | 55 | \item{sources.use}{a vector giving the index or the name of source cell groups} 56 | 57 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 58 | 59 | \item{lab.cex}{font size for the text} 60 | 61 | \item{small.gap}{Small gap between sectors.} 62 | 63 | \item{big.gap}{Gap between the different sets of sectors, which are defined in the `group` parameter} 64 | 65 | \item{annotationTrackHeight}{annotationTrack Height} 66 | 67 | \item{remove.isolate}{whether remove sectors without any links} 68 | 69 | \item{link.visible}{whether plot the link. The value is logical, if it is set to FALSE, the corresponding link will not plotted, but the space is still ocuppied. The format is a matrix with names or a data frame with three columns} 70 | 71 | \item{scale}{scale each sector to same width; default = FALSE; however, it is set to be TRUE when remove.isolate = TRUE} 72 | 73 | \item{directional}{Whether links have directions. 1 means the direction is from the first column in df to the second column, -1 is the reverse, 0 is no direction, and 2 for two directional.} 74 | 75 | \item{link.target.prop}{If the Chord diagram is directional, for each source sector, whether to draw bars that shows the proportion of target sectors.} 76 | 77 | \item{reduce}{if the ratio of the width of certain grid compared to the whole circle is less than this value, the grid is removed on the plot. Set it to value less than zero if you want to keep all tiny grid.} 78 | 79 | \item{transparency}{Transparency of link colors} 80 | 81 | \item{link.border}{border for links, single scalar or a matrix with names or a data frame with three columns} 82 | 83 | \item{title.name}{title name} 84 | 85 | \item{show.legend}{whether show the figure legend} 86 | 87 | \item{legend.pos.x, legend.pos.y}{adjust the legend position} 88 | 89 | \item{nCol}{number of columns when displaying the figures} 90 | 91 | \item{thresh}{threshold of the p-value for determining significant interaction when visualizing links at the level of ligands/receptors;} 92 | 93 | \item{...}{other parameters passing to chordDiagram} 94 | } 95 | \value{ 96 | an object of class "recordedplot" 97 | } 98 | \description{ 99 | Names of cell states will be displayed in this chord diagram 100 | } 101 | -------------------------------------------------------------------------------- /man/netVisual_chord_cell_internal.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_chord_cell_internal} 4 | \alias{netVisual_chord_cell_internal} 5 | \title{Chord diagram for visualizing cell-cell communication from a weighted adjacency matrix or a data frame} 6 | \usage{ 7 | netVisual_chord_cell_internal( 8 | net, 9 | color.use = NULL, 10 | group = NULL, 11 | cell.order = NULL, 12 | sources.use = NULL, 13 | targets.use = NULL, 14 | lab.cex = 0.8, 15 | small.gap = 1, 16 | big.gap = 10, 17 | annotationTrackHeight = c(0.03), 18 | remove.isolate = FALSE, 19 | link.visible = TRUE, 20 | scale = FALSE, 21 | directional = 1, 22 | link.target.prop = TRUE, 23 | reduce = -1, 24 | transparency = 0.4, 25 | link.border = NA, 26 | title.name = NULL, 27 | show.legend = FALSE, 28 | legend.pos.x = 20, 29 | legend.pos.y = 20, 30 | ... 31 | ) 32 | } 33 | \arguments{ 34 | \item{net}{a weighted matrix or a data frame with three columns defining the cell-cell communication network} 35 | 36 | \item{color.use}{colors for the cell groups} 37 | 38 | \item{group}{A named group labels for making multiple-group Chord diagrams. The sector names should be used as the names in the vector. 39 | The order of group controls the sector orders and if group is set as a factor, the order of levels controls the order of groups.} 40 | 41 | \item{cell.order}{a char vector defining the cell type orders (sector orders)} 42 | 43 | \item{sources.use}{a vector giving the index or the name of source cell groups} 44 | 45 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 46 | 47 | \item{lab.cex}{font size for the text} 48 | 49 | \item{small.gap}{Small gap between sectors.} 50 | 51 | \item{big.gap}{Gap between the different sets of sectors, which are defined in the `group` parameter} 52 | 53 | \item{annotationTrackHeight}{annotationTrack Height} 54 | 55 | \item{remove.isolate}{whether remove sectors without any links} 56 | 57 | \item{link.visible}{whether plot the link. The value is logical, if it is set to FALSE, the corresponding link will not plotted, but the space is still ocuppied. The format is a matrix with names or a data frame with three columns} 58 | 59 | \item{scale}{scale each sector to same width; default = FALSE; however, it is set to be TRUE when remove.isolate = TRUE} 60 | 61 | \item{directional}{Whether links have directions. 1 means the direction is from the first column in df to the second column, -1 is the reverse, 0 is no direction, and 2 for two directional.} 62 | 63 | \item{link.target.prop}{If the Chord diagram is directional, for each source sector, whether to draw bars that shows the proportion of target sectors.} 64 | 65 | \item{reduce}{if the ratio of the width of certain grid compared to the whole circle is less than this value, the grid is removed on the plot. Set it to value less than zero if you want to keep all tiny grid.} 66 | 67 | \item{transparency}{Transparency of link colors} 68 | 69 | \item{link.border}{border for links, single scalar or a matrix with names or a data frame with three columns} 70 | 71 | \item{title.name}{title name of the plot} 72 | 73 | \item{show.legend}{whether show the figure legend} 74 | 75 | \item{legend.pos.x, legend.pos.y}{adjust the legend position} 76 | 77 | \item{...}{other parameters passing to chordDiagram} 78 | } 79 | \value{ 80 | an object of class "recordedplot" 81 | } 82 | \description{ 83 | Names of cell states/groups will be displayed in this chord diagram 84 | } 85 | -------------------------------------------------------------------------------- /man/netVisual_chord_gene.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_chord_gene} 4 | \alias{netVisual_chord_gene} 5 | \title{Chord diagram for visualizing cell-cell communication for a set of ligands/receptors or signaling pathways} 6 | \usage{ 7 | netVisual_chord_gene( 8 | object, 9 | slot.name = "net", 10 | color.use = NULL, 11 | signaling = NULL, 12 | pairLR.use = NULL, 13 | net = NULL, 14 | sources.use = NULL, 15 | targets.use = NULL, 16 | lab.cex = 0.8, 17 | small.gap = 1, 18 | big.gap = 10, 19 | annotationTrackHeight = c(0.03), 20 | link.visible = TRUE, 21 | scale = FALSE, 22 | directional = 1, 23 | link.target.prop = TRUE, 24 | reduce = -1, 25 | transparency = 0.4, 26 | link.border = NA, 27 | title.name = NULL, 28 | legend.pos.x = 20, 29 | legend.pos.y = 20, 30 | show.legend = TRUE, 31 | thresh = 0.05, 32 | ... 33 | ) 34 | } 35 | \arguments{ 36 | \item{object}{CellChat object} 37 | 38 | \item{slot.name}{the slot name of object: slot.name = "net" when visualizing links at the level of ligands/receptors; slot.name = "netP" when visualizing links at the level of signaling pathways} 39 | 40 | \item{color.use}{colors for the cell groups} 41 | 42 | \item{signaling}{a character vector giving the name of signaling networks} 43 | 44 | \item{pairLR.use}{a data frame consisting of one column named either "interaction_name" or "pathway_name", defining the interactions of interest} 45 | 46 | \item{net}{A data frame consisting of the interactions of interest. 47 | net should have at least three columns: "source","target" and "interaction_name" when visualizing links at the level of ligands/receptors; 48 | "source","target" and "pathway_name" when visualizing links at the level of signaling pathway; "interaction_name" and "pathway_name" must be the matched names in CellChatDB$interaction.} 49 | 50 | \item{sources.use}{a vector giving the index or the name of source cell groups} 51 | 52 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 53 | 54 | \item{lab.cex}{font size for the text} 55 | 56 | \item{small.gap}{Small gap between sectors.} 57 | 58 | \item{big.gap}{Gap between the different sets of sectors, which are defined in the `group` parameter} 59 | 60 | \item{annotationTrackHeight}{annotationTrack Height} 61 | 62 | \item{link.visible}{whether plot the link. The value is logical, if it is set to FALSE, the corresponding link will not plotted, but the space is still ocuppied. The format is a matrix with names or a data frame with three columns} 63 | 64 | \item{scale}{scale each sector to same width; default = FALSE; however, it is set to be TRUE when remove.isolate = TRUE} 65 | 66 | \item{directional}{Whether links have directions. 1 means the direction is from the first column in df to the second column, -1 is the reverse, 0 is no direction, and 2 for two directional.} 67 | 68 | \item{link.target.prop}{If the Chord diagram is directional, for each source sector, whether to draw bars that shows the proportion of target sectors.} 69 | 70 | \item{reduce}{if the ratio of the width of certain grid compared to the whole circle is less than this value, the grid is removed on the plot. Set it to value less than zero if you want to keep all tiny grid.} 71 | 72 | \item{transparency}{Transparency of link colors} 73 | 74 | \item{link.border}{border for links, single scalar or a matrix with names or a data frame with three columns} 75 | 76 | \item{title.name}{title name of the plot} 77 | 78 | \item{legend.pos.x, legend.pos.y}{adjust the legend position} 79 | 80 | \item{show.legend}{whether show the figure legend} 81 | 82 | \item{thresh}{threshold of the p-value for determining significant interaction when visualizing links at the level of ligands/receptors;} 83 | 84 | \item{...}{other parameters to chordDiagram} 85 | } 86 | \value{ 87 | an object of class "recordedplot" 88 | } 89 | \description{ 90 | Names of ligands/receptors or signaling pathways will be displayed in this chord diagram 91 | } 92 | -------------------------------------------------------------------------------- /man/netVisual_circle.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_circle} 4 | \alias{netVisual_circle} 5 | \title{Circle plot of cell-cell communication network} 6 | \usage{ 7 | netVisual_circle( 8 | net, 9 | color.use = NULL, 10 | title.name = NULL, 11 | sources.use = NULL, 12 | targets.use = NULL, 13 | idents.use = NULL, 14 | remove.isolate = FALSE, 15 | top = 1, 16 | weight.scale = FALSE, 17 | vertex.weight = 20, 18 | vertex.weight.max = NULL, 19 | vertex.size.max = NULL, 20 | vertex.label.cex = 1, 21 | vertex.label.color = "black", 22 | edge.weight.max = NULL, 23 | edge.width.max = 8, 24 | alpha.edge = 0.6, 25 | label.edge = FALSE, 26 | edge.label.color = "black", 27 | edge.label.cex = 0.8, 28 | edge.curved = 0.2, 29 | shape = "circle", 30 | layout = in_circle(), 31 | margin = 0.2, 32 | vertex.size = NULL, 33 | arrow.width = 1, 34 | arrow.size = 0.2, 35 | text.x = 0, 36 | text.y = 1.5 37 | ) 38 | } 39 | \arguments{ 40 | \item{net}{A weighted matrix representing the connections} 41 | 42 | \item{color.use}{Colors represent different cell groups} 43 | 44 | \item{title.name}{the name of the title} 45 | 46 | \item{sources.use}{a vector giving the index or the name of source cell groups} 47 | 48 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 49 | 50 | \item{idents.use}{a vector giving the index or the name of cell groups of interest.} 51 | 52 | \item{remove.isolate}{whether remove the isolate nodes in the communication network} 53 | 54 | \item{top}{the fraction of interactions to show} 55 | 56 | \item{weight.scale}{whether scale the weight} 57 | 58 | \item{vertex.weight}{The weight of vertex: either a scale value or a vector} 59 | 60 | \item{vertex.weight.max}{the maximum weight of vertex; defualt = max(vertex.weight)} 61 | 62 | \item{vertex.size.max}{the maximum vertex size for visualization} 63 | 64 | \item{vertex.label.cex}{The label size of vertex} 65 | 66 | \item{vertex.label.color}{The color of label for vertex} 67 | 68 | \item{edge.weight.max}{the maximum weight of edge; defualt = max(net)} 69 | 70 | \item{edge.width.max}{The maximum edge width for visualization} 71 | 72 | \item{alpha.edge}{the transprency of edge} 73 | 74 | \item{label.edge}{Whether or not shows the label of edges} 75 | 76 | \item{edge.label.color}{The color for single arrow} 77 | 78 | \item{edge.label.cex}{The size of label for arrows} 79 | 80 | \item{edge.curved}{Specifies whether to draw curved edges, or not. 81 | This can be a logical or a numeric vector or scalar. 82 | First the vector is replicated to have the same length as the number of 83 | edges in the graph. Then it is interpreted for each edge separately. 84 | A numeric value specifies the curvature of the edge; zero curvature means 85 | straight edges, negative values means the edge bends clockwise, positive 86 | values the opposite. TRUE means curvature 0.5, FALSE means curvature zero} 87 | 88 | \item{shape}{The shape of the vertex, currently “circle”, “square”, 89 | “csquare”, “rectangle”, “crectangle”, “vrectangle”, “pie” (see 90 | vertex.shape.pie), ‘sphere’, and “none” are supported, and only by the 91 | plot.igraph command. “none” does not draw the vertices at all, although 92 | vertex label are plotted (if given). See shapes for details about vertex 93 | shapes and vertex.shape.pie for using pie charts as vertices.} 94 | 95 | \item{layout}{The layout specification. It must be a call to a layout 96 | specification function.} 97 | 98 | \item{margin}{The amount of empty space below, over, at the left and right 99 | of the plot, it is a numeric vector of length four. Usually values between 100 | 0 and 0.5 are meaningful, but negative values are also possible, that will 101 | make the plot zoom in to a part of the graph. If it is shorter than four 102 | then it is recycled.} 103 | 104 | \item{vertex.size}{Deprecated. Use `vertex.weight`} 105 | 106 | \item{arrow.width}{The width of arrows} 107 | 108 | \item{arrow.size}{the size of arrow} 109 | 110 | \item{text.x, text.y}{the x- and y-coordinates to add the text} 111 | } 112 | \value{ 113 | an object of class "recordedplot" 114 | } 115 | \description{ 116 | The width of edges represent the strength of the communication. 117 | } 118 | -------------------------------------------------------------------------------- /man/netVisual_diffInteraction.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_diffInteraction} 4 | \alias{netVisual_diffInteraction} 5 | \title{Circle plot showing differential cell-cell communication network between two datasets} 6 | \usage{ 7 | netVisual_diffInteraction( 8 | object, 9 | comparison = c(1, 2), 10 | measure = c("count", "weight", "count.merged", "weight.merged"), 11 | color.use = NULL, 12 | color.edge = c("#b2182b", "#2166ac"), 13 | title.name = NULL, 14 | sources.use = NULL, 15 | targets.use = NULL, 16 | remove.isolate = FALSE, 17 | top = 1, 18 | weight.scale = FALSE, 19 | vertex.weight = 20, 20 | vertex.weight.max = NULL, 21 | vertex.size.max = 15, 22 | vertex.label.cex = 1, 23 | vertex.label.color = "black", 24 | edge.weight.max = NULL, 25 | edge.width.max = 8, 26 | alpha.edge = 0.6, 27 | label.edge = FALSE, 28 | edge.label.color = "black", 29 | edge.label.cex = 0.8, 30 | edge.curved = 0.2, 31 | shape = "circle", 32 | layout = in_circle(), 33 | margin = 0.2, 34 | arrow.width = 1, 35 | arrow.size = 0.2 36 | ) 37 | } 38 | \arguments{ 39 | \item{object}{A merged CellChat objects} 40 | 41 | \item{comparison}{a numerical vector giving the datasets for comparison in object.list; e.g., comparison = c(1,2)} 42 | 43 | \item{measure}{"count" or "weight". "count": comparing the number of interactions; "weight": comparing the total interaction weights (strength)} 44 | 45 | \item{color.use}{Colors represent different cell groups} 46 | 47 | \item{color.edge}{Colors for indicating whether the signaling is increased (`color.edge[1]`) or decreased (`color.edge[2]`)} 48 | 49 | \item{title.name}{the name of the title} 50 | 51 | \item{sources.use}{a vector giving the index or the name of source cell groups} 52 | 53 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 54 | 55 | \item{remove.isolate}{whether remove the isolate nodes in the communication network} 56 | 57 | \item{top}{the fraction of interactions to show} 58 | 59 | \item{weight.scale}{whether scale the weight} 60 | 61 | \item{vertex.weight}{The weight of vertex: either a scale value or a vector} 62 | 63 | \item{vertex.weight.max}{the maximum weight of vertex; defualt = max(vertex.weight)} 64 | 65 | \item{vertex.size.max}{the maximum vertex size for visualization} 66 | 67 | \item{vertex.label.cex}{The label size of vertex} 68 | 69 | \item{vertex.label.color}{The color of label for vertex} 70 | 71 | \item{edge.weight.max}{the maximum weight of edge; defualt = max(net)} 72 | 73 | \item{edge.width.max}{The maximum edge width for visualization} 74 | 75 | \item{alpha.edge}{the transprency of edge} 76 | 77 | \item{label.edge}{Whether or not shows the label of edges} 78 | 79 | \item{edge.label.color}{The color for single arrow} 80 | 81 | \item{edge.label.cex}{The size of label for arrows} 82 | 83 | \item{edge.curved}{Specifies whether to draw curved edges, or not. 84 | This can be a logical or a numeric vector or scalar. 85 | First the vector is replicated to have the same length as the number of 86 | edges in the graph. Then it is interpreted for each edge separately. 87 | A numeric value specifies the curvature of the edge; zero curvature means 88 | straight edges, negative values means the edge bends clockwise, positive 89 | values the opposite. TRUE means curvature 0.5, FALSE means curvature zero} 90 | 91 | \item{shape}{The shape of the vertex, currently “circle”, “square”, 92 | “csquare”, “rectangle”, “crectangle”, “vrectangle”, “pie” (see 93 | vertex.shape.pie), ‘sphere’, and “none” are supported, and only by the 94 | plot.igraph command. “none” does not draw the vertices at all, although 95 | vertex label are plotted (if given). See shapes for details about vertex 96 | shapes and vertex.shape.pie for using pie charts as vertices.} 97 | 98 | \item{layout}{The layout specification. It must be a call to a layout 99 | specification function.} 100 | 101 | \item{margin}{The amount of empty space below, over, at the left and right 102 | of the plot, it is a numeric vector of length four. Usually values between 103 | 0 and 0.5 are meaningful, but negative values are also possible, that will 104 | make the plot zoom in to a part of the graph. If it is shorter than four 105 | then it is recycled.} 106 | 107 | \item{arrow.width}{The width of arrows} 108 | 109 | \item{arrow.size}{the size of arrow} 110 | } 111 | \value{ 112 | an object of class "recordedplot" 113 | } 114 | \description{ 115 | The width of edges represent the relative number of interactions or interaction strength. 116 | Red (or blue) colored edges represent increased (or decreased) signaling in the second dataset compared to the first one. 117 | } 118 | -------------------------------------------------------------------------------- /man/netVisual_embedding.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_embedding} 4 | \alias{netVisual_embedding} 5 | \title{2D visualization of the learned manifold of signaling networks} 6 | \usage{ 7 | netVisual_embedding( 8 | object, 9 | slot.name = "netP", 10 | type = c("functional", "structural"), 11 | color.use = NULL, 12 | pathway.labeled = NULL, 13 | top.label = 1, 14 | pathway.remove = NULL, 15 | pathway.remove.show = TRUE, 16 | dot.size = c(2, 6), 17 | label.size = 2, 18 | dot.alpha = 0.5, 19 | xlabel = "Dim 1", 20 | ylabel = "Dim 2", 21 | title = NULL, 22 | font.size = 10, 23 | font.size.title = 12, 24 | do.label = T, 25 | show.legend = T, 26 | show.axes = T 27 | ) 28 | } 29 | \arguments{ 30 | \item{object}{CellChat object} 31 | 32 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 33 | 34 | \item{type}{"functional","structural"} 35 | 36 | \item{color.use}{defining the color for each cell group} 37 | 38 | \item{pathway.labeled}{a char vector giving the signaling names to show when labeling each point} 39 | 40 | \item{top.label}{the fraction of signaling pathways to label} 41 | 42 | \item{pathway.remove}{a character vector defining the signaling to remove} 43 | 44 | \item{pathway.remove.show}{whether show the removed signaling names} 45 | 46 | \item{dot.size}{a range defining the size of the symbol} 47 | 48 | \item{label.size}{font size of the text} 49 | 50 | \item{dot.alpha}{transparency} 51 | 52 | \item{xlabel}{label of x-axis} 53 | 54 | \item{ylabel}{label of y-axis} 55 | 56 | \item{title}{main title of the plot} 57 | 58 | \item{font.size}{font size of the text} 59 | 60 | \item{font.size.title}{font size of the title} 61 | 62 | \item{do.label}{label the each point} 63 | 64 | \item{show.legend}{whether show the legend} 65 | 66 | \item{show.axes}{whether show the axes} 67 | } 68 | \description{ 69 | 2D visualization of the learned manifold of signaling networks 70 | } 71 | -------------------------------------------------------------------------------- /man/netVisual_embeddingPairwise.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_embeddingPairwise} 4 | \alias{netVisual_embeddingPairwise} 5 | \title{2D visualization of the joint manifold learning of signaling networks from two datasets} 6 | \usage{ 7 | netVisual_embeddingPairwise( 8 | object, 9 | slot.name = "netP", 10 | type = c("functional", "structural"), 11 | comparison = NULL, 12 | color.use = NULL, 13 | point.shape = NULL, 14 | pathway.labeled = NULL, 15 | top.label = 1, 16 | pathway.remove = NULL, 17 | pathway.remove.show = TRUE, 18 | dot.size = c(2, 6), 19 | label.size = 2.5, 20 | dot.alpha = 0.5, 21 | xlabel = "Dim 1", 22 | ylabel = "Dim 2", 23 | title = NULL, 24 | do.label = T, 25 | show.legend = T, 26 | show.axes = T 27 | ) 28 | } 29 | \arguments{ 30 | \item{object}{CellChat object} 31 | 32 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 33 | 34 | \item{type}{"functional","structural"} 35 | 36 | \item{comparison}{a numerical vector giving the datasets for comparison. Default are all datasets when object is a merged object} 37 | 38 | \item{color.use}{defining the color for each cell group} 39 | 40 | \item{point.shape}{a numeric vector giving the point shapes. By default point.shape <- c(21, 0, 24, 23, 25, 10, 12), see available shapes at http://www.sthda.com/english/wiki/r-plot-pch-symbols-the-different-point-shapes-available-in-r} 41 | 42 | \item{pathway.labeled}{a char vector giving the signaling names to show when labeling each point} 43 | 44 | \item{top.label}{the fraction of signaling pathways to label} 45 | 46 | \item{pathway.remove}{a character vector defining the signaling to remove} 47 | 48 | \item{pathway.remove.show}{whether show the removed signaling names} 49 | 50 | \item{dot.size}{a range defining the size of the symbol} 51 | 52 | \item{label.size}{font size of the text} 53 | 54 | \item{dot.alpha}{transparency} 55 | 56 | \item{xlabel}{label of x-axis} 57 | 58 | \item{ylabel}{label of y-axis} 59 | 60 | \item{title}{main title of the plot} 61 | 62 | \item{do.label}{label the each point} 63 | 64 | \item{show.legend}{whether show the legend} 65 | 66 | \item{show.axes}{whether show the axes} 67 | } 68 | \description{ 69 | 2D visualization of the joint manifold learning of signaling networks from two datasets 70 | } 71 | -------------------------------------------------------------------------------- /man/netVisual_embeddingPairwiseZoomIn.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_embeddingPairwiseZoomIn} 4 | \alias{netVisual_embeddingPairwiseZoomIn} 5 | \title{Zoom into the 2D visualization of the joint manifold learning of signaling networks from two datasets} 6 | \usage{ 7 | netVisual_embeddingPairwiseZoomIn( 8 | object, 9 | slot.name = "netP", 10 | type = c("functional", "structural"), 11 | comparison = NULL, 12 | color.use = NULL, 13 | nCol = 1, 14 | point.shape = NULL, 15 | pathway.remove = NULL, 16 | dot.size = c(2, 6), 17 | label.size = 2.8, 18 | dot.alpha = 0.5, 19 | xlabel = NULL, 20 | ylabel = NULL, 21 | do.label = T, 22 | show.legend = F, 23 | show.axes = T 24 | ) 25 | } 26 | \arguments{ 27 | \item{object}{CellChat object} 28 | 29 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 30 | 31 | \item{type}{"functional","structural"} 32 | 33 | \item{comparison}{a numerical vector giving the datasets for comparison. Default are all datasets when object is a merged object} 34 | 35 | \item{color.use}{defining the color for each cell group} 36 | 37 | \item{nCol}{number of columns in the plot} 38 | 39 | \item{point.shape}{a numeric vector giving the point shapes. By default point.shape <- c(21, 0, 24, 23, 25, 10, 12), see available shapes at http://www.sthda.com/english/wiki/r-plot-pch-symbols-the-different-point-shapes-available-in-r} 40 | 41 | \item{pathway.remove}{a character vector defining the signaling to remove} 42 | 43 | \item{dot.size}{a range defining the size of the symbol} 44 | 45 | \item{label.size}{font size of the text} 46 | 47 | \item{dot.alpha}{transparency} 48 | 49 | \item{xlabel}{label of x-axis} 50 | 51 | \item{ylabel}{label of y-axis} 52 | 53 | \item{do.label}{label the each point} 54 | 55 | \item{show.legend}{whether show the legend} 56 | 57 | \item{show.axes}{whether show the axes} 58 | } 59 | \description{ 60 | Zoom into the 2D visualization of the joint manifold learning of signaling networks from two datasets 61 | } 62 | -------------------------------------------------------------------------------- /man/netVisual_embeddingZoomIn.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_embeddingZoomIn} 4 | \alias{netVisual_embeddingZoomIn} 5 | \title{Zoom into the 2D visualization of the learned manifold learning of the signaling networks} 6 | \usage{ 7 | netVisual_embeddingZoomIn( 8 | object, 9 | slot.name = "netP", 10 | type = c("functional", "structural"), 11 | color.use = NULL, 12 | pathway.remove = NULL, 13 | nCol = 1, 14 | dot.size = c(2, 6), 15 | label.size = 2.8, 16 | dot.alpha = 0.5, 17 | xlabel = NULL, 18 | ylabel = NULL, 19 | do.label = T, 20 | show.legend = F, 21 | show.axes = T 22 | ) 23 | } 24 | \arguments{ 25 | \item{object}{CellChat object} 26 | 27 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 28 | 29 | \item{type}{"functional","structural"} 30 | 31 | \item{color.use}{defining the color for each cell group} 32 | 33 | \item{pathway.remove}{a character vector defining the signaling to remove} 34 | 35 | \item{nCol}{the number of columns of the plot} 36 | 37 | \item{dot.size}{a range defining the size of the symbol} 38 | 39 | \item{label.size}{font size of the text} 40 | 41 | \item{dot.alpha}{transparency} 42 | 43 | \item{xlabel}{label of x-axis} 44 | 45 | \item{ylabel}{label of y-axis} 46 | 47 | \item{do.label}{label the each point} 48 | 49 | \item{show.legend}{whether show the legend} 50 | 51 | \item{show.axes}{whether show the axes} 52 | } 53 | \description{ 54 | Zoom into the 2D visualization of the learned manifold learning of the signaling networks 55 | } 56 | -------------------------------------------------------------------------------- /man/netVisual_heatmap.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_heatmap} 4 | \alias{netVisual_heatmap} 5 | \title{Visualization of network using heatmap} 6 | \usage{ 7 | netVisual_heatmap( 8 | object, 9 | comparison = c(1, 2), 10 | measure = c("count", "weight"), 11 | signaling = NULL, 12 | slot.name = c("netP", "net"), 13 | color.use = NULL, 14 | color.heatmap = NULL, 15 | title.name = NULL, 16 | width = NULL, 17 | height = NULL, 18 | font.size = 8, 19 | font.size.title = 10, 20 | cluster.rows = FALSE, 21 | cluster.cols = FALSE, 22 | sources.use = NULL, 23 | targets.use = NULL, 24 | remove.isolate = FALSE, 25 | row.show = NULL, 26 | col.show = NULL 27 | ) 28 | } 29 | \arguments{ 30 | \item{object}{A merged CellChat object or a single CellChat object} 31 | 32 | \item{comparison}{a numerical vector giving the datasets for comparison in object.list; e.g., comparison = c(1,2)} 33 | 34 | \item{measure}{"count" or "weight". "count": comparing the number of interactions; "weight": comparing the total interaction weights (strength)} 35 | 36 | \item{signaling}{a character vector giving the name of signaling networks in a single CellChat object} 37 | 38 | \item{slot.name}{the slot name of object. Set is to be "netP" if input signaling is a pathway name; Set is to be "net" if input signaling is a ligand-receptor pair} 39 | 40 | \item{color.use}{the character vector defining the color of each cell group} 41 | 42 | \item{color.heatmap}{A vector of two colors corresponding to max/min values, or a color name in brewer.pal only when the data in the heatmap do not contain negative values. 43 | By default, color.heatmap = c('#2166ac','#b2182b') when taking a merged CellChat object as input; color.heatmap = "Reds" when taking a single CellChat object as input.} 44 | 45 | \item{title.name}{the name of the title} 46 | 47 | \item{width}{width of heatmap} 48 | 49 | \item{height}{height of heatmap} 50 | 51 | \item{font.size}{fontsize in heatmap} 52 | 53 | \item{font.size.title}{font size of the title} 54 | 55 | \item{cluster.rows}{whether cluster rows} 56 | 57 | \item{cluster.cols}{whether cluster columns} 58 | 59 | \item{sources.use}{a vector giving the index or the name of source cell groups} 60 | 61 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 62 | 63 | \item{remove.isolate}{whether remove the isolate nodes in the communication network} 64 | 65 | \item{row.show, col.show}{a vector giving the index or the name of row or columns to show in the heatmap} 66 | } 67 | \value{ 68 | an object of ComplexHeatmap 69 | } 70 | \description{ 71 | This heatmap can be used to 1) show differential number of interactions or interaction strength in the cell-cell communication network between two datasets; 72 | 2) the number of interactions or interaction strength in a single dataset; 73 | 3) the inferred cell-cell communication network in a single dataset, defined by `signaling`. Please see @Details below for detailed explanations of this heatmap plot. 74 | } 75 | \details{ 76 | When show differential number of interactions or interaction strength in the cell-cell communication network between two datasets, the width of edges represent the relative number of interactions or interaction strength. 77 | Red (or blue) colored edges represent increased (or decreased) signaling in the second dataset compared to the first one. 78 | 79 | The top colored bar plot represents the sum of absolute values displayed in each column of the heatmap. The right colored bar plot represents the sum of absolute values in each row. 80 | } 81 | -------------------------------------------------------------------------------- /man/netVisual_hierarchy1.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_hierarchy1} 4 | \alias{netVisual_hierarchy1} 5 | \title{Hierarchy plot of cell-cell communications sending to cell groups in vertex.receiver} 6 | \usage{ 7 | netVisual_hierarchy1( 8 | net, 9 | vertex.receiver, 10 | color.use = NULL, 11 | title.name = NULL, 12 | sources.use = NULL, 13 | targets.use = NULL, 14 | remove.isolate = FALSE, 15 | top = 1, 16 | weight.scale = FALSE, 17 | vertex.weight = 20, 18 | vertex.weight.max = NULL, 19 | vertex.size.max = NULL, 20 | edge.weight.max = NULL, 21 | edge.width.max = 8, 22 | alpha.edge = 0.6, 23 | label.dist = 2.8, 24 | space.v = 1.5, 25 | space.h = 1.6, 26 | shape = NULL, 27 | label.edge = FALSE, 28 | edge.curved = 0, 29 | margin = 0.2, 30 | vertex.label.cex = 0.6, 31 | vertex.label.color = "black", 32 | arrow.width = 1, 33 | arrow.size = 0.2, 34 | edge.label.color = "black", 35 | edge.label.cex = 0.5, 36 | vertex.size = NULL 37 | ) 38 | } 39 | \arguments{ 40 | \item{net}{a weighted matrix defining the signaling network} 41 | 42 | \item{vertex.receiver}{a numeric vector giving the index of the cell groups as targets in the first hierarchy plot} 43 | 44 | \item{color.use}{the character vector defining the color of each cell group} 45 | 46 | \item{title.name}{alternative signaling pathway name to show on the plot} 47 | 48 | \item{sources.use}{a vector giving the index or the name of source cell groups} 49 | 50 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 51 | 52 | \item{remove.isolate}{whether remove the isolate nodes in the communication network} 53 | 54 | \item{top}{the fraction of interactions to show} 55 | 56 | \item{weight.scale}{whether rescale the edge weights} 57 | 58 | \item{vertex.weight}{The weight of vertex: either a scale value or a vector} 59 | 60 | \item{vertex.weight.max}{the maximum weight of vertex; defualt = max(vertex.weight)} 61 | 62 | \item{vertex.size.max}{the maximum vertex size for visualization} 63 | 64 | \item{edge.weight.max}{the maximum weight of edge; defualt = max(net)} 65 | 66 | \item{edge.width.max}{The maximum edge width for visualization} 67 | 68 | \item{alpha.edge}{the transprency of edge} 69 | 70 | \item{label.dist}{the distance between labels and dot position} 71 | 72 | \item{space.v}{the space between different columns in the plot} 73 | 74 | \item{space.h}{the space between different rows in the plot} 75 | 76 | \item{shape}{The shape of the vertex, currently “circle”, “square”, 77 | “csquare”, “rectangle”, “crectangle”, “vrectangle”, “pie” (see 78 | vertex.shape.pie), ‘sphere’, and “none” are supported, and only by the 79 | plot.igraph command. “none” does not draw the vertices at all, although 80 | vertex label are plotted (if given). See shapes for details about vertex 81 | shapes and vertex.shape.pie for using pie charts as vertices.} 82 | 83 | \item{label.edge}{whether label edge} 84 | 85 | \item{edge.curved}{Specifies whether to draw curved edges, or not. 86 | This can be a logical or a numeric vector or scalar. 87 | First the vector is replicated to have the same length as the number of 88 | edges in the graph. Then it is interpreted for each edge separately. 89 | A numeric value specifies the curvature of the edge; zero curvature means 90 | straight edges, negative values means the edge bends clockwise, positive 91 | values the opposite. TRUE means curvature 0.5, FALSE means curvature zero} 92 | 93 | \item{margin}{The amount of empty space below, over, at the left and right 94 | of the plot, it is a numeric vector of length four. Usually values between 95 | 0 and 0.5 are meaningful, but negative values are also possible, that will 96 | make the plot zoom in to a part of the graph. If it is shorter than four 97 | then it is recycled.} 98 | 99 | \item{vertex.label.cex}{The label size of vertex} 100 | 101 | \item{vertex.label.color}{The color of label for vertex} 102 | 103 | \item{arrow.width}{The width of arrows} 104 | 105 | \item{arrow.size}{the size of arrow} 106 | 107 | \item{edge.label.color}{The color for single arrow} 108 | 109 | \item{edge.label.cex}{The size of label for arrows} 110 | 111 | \item{vertex.size}{Deprecated. Use `vertex.weight`} 112 | } 113 | \value{ 114 | an object of class "recordedplot" 115 | } 116 | \description{ 117 | The width of edges represent the strength of the communication. 118 | } 119 | -------------------------------------------------------------------------------- /man/netVisual_hierarchy2.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_hierarchy2} 4 | \alias{netVisual_hierarchy2} 5 | \title{Hierarchy plot of cell-cell communication sending to cell groups not in vertex.receiver} 6 | \usage{ 7 | netVisual_hierarchy2( 8 | net, 9 | vertex.receiver, 10 | color.use = NULL, 11 | title.name = NULL, 12 | sources.use = NULL, 13 | targets.use = NULL, 14 | remove.isolate = FALSE, 15 | top = 1, 16 | weight.scale = FALSE, 17 | vertex.weight = 20, 18 | vertex.weight.max = NULL, 19 | vertex.size.max = NULL, 20 | edge.weight.max = NULL, 21 | edge.width.max = 8, 22 | alpha.edge = 0.6, 23 | label.dist = 2.8, 24 | space.v = 1.5, 25 | space.h = 1.6, 26 | shape = NULL, 27 | label.edge = FALSE, 28 | edge.curved = 0, 29 | margin = 0.2, 30 | vertex.label.cex = 0.6, 31 | vertex.label.color = "black", 32 | arrow.width = 1, 33 | arrow.size = 0.2, 34 | edge.label.color = "black", 35 | edge.label.cex = 0.5, 36 | vertex.size = NULL 37 | ) 38 | } 39 | \arguments{ 40 | \item{net}{a weighted matrix defining the signaling network} 41 | 42 | \item{vertex.receiver}{a numeric vector giving the index of the cell groups as targets in the first hierarchy plot} 43 | 44 | \item{color.use}{the character vector defining the color of each cell group} 45 | 46 | \item{title.name}{alternative signaling pathway name to show on the plot} 47 | 48 | \item{sources.use}{a vector giving the index or the name of source cell groups} 49 | 50 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 51 | 52 | \item{remove.isolate}{whether remove the isolate nodes in the communication network} 53 | 54 | \item{top}{the fraction of interactions to show} 55 | 56 | \item{weight.scale}{whether rescale the edge weights} 57 | 58 | \item{vertex.weight}{The weight of vertex: either a scale value or a vector} 59 | 60 | \item{vertex.weight.max}{the maximum weight of vertex; defualt = max(vertex.weight)} 61 | 62 | \item{vertex.size.max}{the maximum vertex size for visualization} 63 | 64 | \item{edge.weight.max}{the maximum weight of edge; defualt = max(net)} 65 | 66 | \item{edge.width.max}{The maximum edge width for visualization} 67 | 68 | \item{alpha.edge}{the transprency of edge} 69 | 70 | \item{label.dist}{the distance between labels and dot position} 71 | 72 | \item{space.v}{the space between different columns in the plot} 73 | 74 | \item{space.h}{the space between different rows in the plot} 75 | 76 | \item{shape}{The shape of the vertex, currently “circle”, “square”, 77 | “csquare”, “rectangle”, “crectangle”, “vrectangle”, “pie” (see 78 | vertex.shape.pie), ‘sphere’, and “none” are supported, and only by the 79 | plot.igraph command. “none” does not draw the vertices at all, although 80 | vertex label are plotted (if given). See shapes for details about vertex 81 | shapes and vertex.shape.pie for using pie charts as vertices.} 82 | 83 | \item{label.edge}{Whether or not shows the label of edges (number of connections between different cell types)} 84 | 85 | \item{edge.curved}{Specifies whether to draw curved edges, or not. 86 | This can be a logical or a numeric vector or scalar. 87 | First the vector is replicated to have the same length as the number of 88 | edges in the graph. Then it is interpreted for each edge separately. 89 | A numeric value specifies the curvature of the edge; zero curvature means 90 | straight edges, negative values means the edge bends clockwise, positive 91 | values the opposite. TRUE means curvature 0.5, FALSE means curvature zero} 92 | 93 | \item{margin}{The amount of empty space below, over, at the left and right 94 | of the plot, it is a numeric vector of length four. Usually values between 95 | 0 and 0.5 are meaningful, but negative values are also possible, that will 96 | make the plot zoom in to a part of the graph. If it is shorter than four 97 | then it is recycled.} 98 | 99 | \item{vertex.label.cex}{The label size of vertex} 100 | 101 | \item{vertex.label.color}{The color of label for vertex} 102 | 103 | \item{arrow.width}{The width of arrows} 104 | 105 | \item{arrow.size}{the size of arrow} 106 | 107 | \item{edge.label.color}{The color for single arrow} 108 | 109 | \item{edge.label.cex}{The size of label for arrows} 110 | 111 | \item{vertex.size}{Deprecated. Use `vertex.weight`} 112 | } 113 | \value{ 114 | an object of class "recordedplot" 115 | } 116 | \description{ 117 | This function loads the significant interactions as a weighted matrix, and colors 118 | represent different types of cells as a structure. The width of edges represent the strength of the communication. 119 | } 120 | -------------------------------------------------------------------------------- /man/netVisual_individual.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_individual} 4 | \alias{netVisual_individual} 5 | \title{Visualize the inferred signaling network of individual L-R pairs} 6 | \usage{ 7 | netVisual_individual( 8 | object, 9 | signaling, 10 | signaling.name = NULL, 11 | pairLR.use = NULL, 12 | color.use = NULL, 13 | vertex.receiver = NULL, 14 | sources.use = NULL, 15 | targets.use = NULL, 16 | top = 1, 17 | remove.isolate = FALSE, 18 | vertex.weight = 1, 19 | vertex.weight.max = NULL, 20 | vertex.size.max = NULL, 21 | vertex.label.cex = 0.8, 22 | weight.scale = TRUE, 23 | edge.weight.max = NULL, 24 | edge.width.max = 8, 25 | graphics.init = TRUE, 26 | layout = c("circle", "hierarchy", "chord", "spatial"), 27 | height = 5, 28 | thresh = 0.05, 29 | alpha.image = 0.15, 30 | point.size = 1.5, 31 | group = NULL, 32 | cell.order = NULL, 33 | small.gap = 1, 34 | big.gap = 10, 35 | scale = FALSE, 36 | reduce = -1, 37 | show.legend = FALSE, 38 | legend.pos.x = 20, 39 | legend.pos.y = 20, 40 | nCol = NULL, 41 | ... 42 | ) 43 | } 44 | \arguments{ 45 | \item{object}{CellChat object} 46 | 47 | \item{signaling}{a signaling pathway name} 48 | 49 | \item{signaling.name}{alternative signaling pathway name to show on the plot} 50 | 51 | \item{pairLR.use}{a char vector or a data frame consisting of one column named "interaction_name", defining the L-R pairs of interest} 52 | 53 | \item{color.use}{the character vector defining the color of each cell group} 54 | 55 | \item{vertex.receiver}{a numeric vector giving the index of the cell groups as targets in the first hierarchy plot} 56 | 57 | \item{sources.use}{a vector giving the index or the name of source cell groups} 58 | 59 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 60 | 61 | \item{top}{the fraction of interactions to show} 62 | 63 | \item{remove.isolate}{whether remove the isolate nodes in the communication network} 64 | 65 | \item{vertex.weight}{The weight of vertex: either a scale value or a vector. 66 | 67 | Default is a scale value being 1, indicating all vertex is plotted in the same size; 68 | 69 | Set `vertex.weight` as a vector to plot vertex in different size; setting `vertex.weight = NULL` will have vertex with different size that are portional to the number of cells in each cell group.} 70 | 71 | \item{vertex.weight.max}{the maximum weight of vertex; defualt = max(vertex.weight)} 72 | 73 | \item{vertex.size.max}{the maximum vertex size for visualization} 74 | 75 | \item{vertex.label.cex}{The label size of vertex in the network} 76 | 77 | \item{weight.scale}{whether scale the edge weight} 78 | 79 | \item{edge.weight.max}{the maximum weight of edge; defualt = max(net)} 80 | 81 | \item{edge.width.max}{The maximum edge width for visualization} 82 | 83 | \item{graphics.init}{whether do graphics initiation using par(...). If graphics.init=FALSE, USERS can use par() in a more fexible way} 84 | 85 | \item{layout}{"hierarchy", "circle" or "chord"} 86 | 87 | \item{height}{height of plot} 88 | 89 | \item{thresh}{threshold of the p-value for determining significant interaction 90 | Parameters below are set for "spatial" diagram. Please also check the function `netVisual_spatial` for more parameters.} 91 | 92 | \item{alpha.image}{the transparency of individual spots} 93 | 94 | \item{point.size}{the size of spots 95 | 96 | Parameters below are set for "chord" diagram. Please also check the function `netVisual_chord_cell` for more parameters.} 97 | 98 | \item{group}{A named group labels for making multiple-group Chord diagrams. The sector names should be used as the names in the vector. 99 | The order of group controls the sector orders and if group is set as a factor, the order of levels controls the order of groups.} 100 | 101 | \item{cell.order}{a char vector defining the cell type orders (sector orders)} 102 | 103 | \item{small.gap}{Small gap between sectors.} 104 | 105 | \item{big.gap}{Gap between the different sets of sectors, which are defined in the `group` parameter} 106 | 107 | \item{scale}{scale each sector to same width; default = FALSE; however, it is set to be TRUE when remove.isolate = TRUE} 108 | 109 | \item{reduce}{if the ratio of the width of certain grid compared to the whole circle is less than this value, the grid is removed on the plot. Set it to value less than zero if you want to keep all tiny grid.} 110 | 111 | \item{show.legend}{whether show the figure legend} 112 | 113 | \item{legend.pos.x, legend.pos.y}{adjust the legend position} 114 | 115 | \item{nCol}{number of columns when displaying the figures using "circle" or "chord"} 116 | 117 | \item{...}{other parameters (e.g.,vertex.label.cex, vertex.label.color, alpha.edge, label.edge, edge.label.color, edge.label.cex, edge.curved, text.x, text.y) 118 | passing to `netVisual_hierarchy1`,`netVisual_hierarchy2`,`netVisual_circle`. NB: some parameters might be not supported} 119 | } 120 | \value{ 121 | an object of class "recordedplot" 122 | } 123 | \description{ 124 | Visualize the inferred signaling network of individual L-R pairs 125 | } 126 | -------------------------------------------------------------------------------- /man/netVisual_spatial.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{netVisual_spatial} 4 | \alias{netVisual_spatial} 5 | \title{Spatial plot of cell-cell communication network} 6 | \usage{ 7 | netVisual_spatial( 8 | net, 9 | coordinates, 10 | meta, 11 | sample.use = NULL, 12 | color.use = NULL, 13 | title.name = NULL, 14 | sources.use = NULL, 15 | targets.use = NULL, 16 | idents.use = NULL, 17 | remove.isolate = FALSE, 18 | remove.loop = TRUE, 19 | top = 1, 20 | weight.scale = FALSE, 21 | vertex.weight = 20, 22 | vertex.weight.max = NULL, 23 | vertex.size.max = NULL, 24 | vertex.label.cex = 5, 25 | vertex.label.color = "black", 26 | edge.weight.max = NULL, 27 | edge.width.max = 8, 28 | edge.curved = 0.2, 29 | alpha.edge = 0.6, 30 | arrow.angle = 5, 31 | arrow.size = 0.2, 32 | alpha.image = 0.15, 33 | point.size = 1.5, 34 | legend.size = 5 35 | ) 36 | } 37 | \arguments{ 38 | \item{net}{A weighted matrix representing the connections} 39 | 40 | \item{coordinates}{a data matrix in which each row gives the spatial locations/coordinates of each cell/spot} 41 | 42 | \item{meta}{a data frame with at least two columns named `labels` and `samples`. 43 | `meta$labels` is a vector giving the group label of each cell/spot. `meta$samples` is a factor vector defining the sample labels of each dataset. The length should be the same as the number of rows in `coordinates`.} 44 | 45 | \item{sample.use}{the sample used for visualization, which should be the element in `meta$samples`.} 46 | 47 | \item{color.use}{Colors represent different cell groups} 48 | 49 | \item{title.name}{the name of the title} 50 | 51 | \item{sources.use}{a vector giving the index or the name of source cell groups} 52 | 53 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 54 | 55 | \item{idents.use}{a vector giving the index or the name of cell groups of interest.} 56 | 57 | \item{remove.isolate}{whether remove the isolate nodes in the communication network} 58 | 59 | \item{remove.loop}{whether remove the self-loop in the communication network. Default: TRUE} 60 | 61 | \item{top}{the fraction of interactions to show} 62 | 63 | \item{weight.scale}{whether scale the weight} 64 | 65 | \item{vertex.weight}{The weight of vertex: either a scale value or a vector} 66 | 67 | \item{vertex.weight.max}{the maximum weight of vertex; defualt = max(vertex.weight)} 68 | 69 | \item{vertex.size.max}{the maximum vertex size for visualization} 70 | 71 | \item{vertex.label.cex}{The label size of vertex} 72 | 73 | \item{vertex.label.color}{The color of label for vertex} 74 | 75 | \item{edge.weight.max}{the maximum weight of edge; defualt = max(net)} 76 | 77 | \item{edge.width.max}{The maximum edge width for visualization} 78 | 79 | \item{edge.curved}{Specifies whether to draw curved edges, or not. 80 | This can be a logical or a numeric vector or scalar. 81 | First the vector is replicated to have the same length as the number of 82 | edges in the graph. Then it is interpreted for each edge separately. 83 | A numeric value specifies the curvature of the edge; zero curvature means 84 | straight edges, negative values means the edge bends clockwise, positive 85 | values the opposite. TRUE means curvature 0.5, FALSE means curvature zero} 86 | 87 | \item{alpha.edge}{the transprency of edge} 88 | 89 | \item{arrow.angle}{The width of arrows} 90 | 91 | \item{arrow.size}{the size of arrow} 92 | 93 | \item{alpha.image}{the transparency of individual spots} 94 | 95 | \item{point.size}{the size of spots} 96 | 97 | \item{legend.size}{the size of legend} 98 | } 99 | \value{ 100 | an object of ggplot 101 | } 102 | \description{ 103 | Autocrine interactions are omitted on this plot. Group centroids may be not accurate for some data due to complex geometry. 104 | The width of edges represent the strength of the communication. 105 | } 106 | -------------------------------------------------------------------------------- /man/nnd.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{nnd} 4 | \alias{nnd} 5 | \title{compute nnd} 6 | \usage{ 7 | nnd(g) 8 | } 9 | \arguments{ 10 | \item{g}{a graph objecct} 11 | } 12 | \description{ 13 | compute nnd 14 | } 15 | -------------------------------------------------------------------------------- /man/node_distance.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{node_distance} 4 | \alias{node_distance} 5 | \title{compute the node distance matrix} 6 | \usage{ 7 | node_distance(g) 8 | } 9 | \arguments{ 10 | \item{g}{a graph objecct} 11 | } 12 | \description{ 13 | compute the node distance matrix 14 | } 15 | -------------------------------------------------------------------------------- /man/normalizeData.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{normalizeData} 4 | \alias{normalizeData} 5 | \title{Normalize data using a scaling factor} 6 | \usage{ 7 | normalizeData(data.raw, scale.factor = 10000, do.log = TRUE, do.sparse = TRUE) 8 | } 9 | \arguments{ 10 | \item{data.raw}{input raw data} 11 | 12 | \item{scale.factor}{the scaling factor used for each cell} 13 | 14 | \item{do.log}{whether to do log transformation with pseudocount 1} 15 | 16 | \item{do.sparse}{whether to use sparse format} 17 | } 18 | \description{ 19 | Normalize data using a scaling factor 20 | } 21 | -------------------------------------------------------------------------------- /man/pieChart.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/database.R 3 | \name{pieChart} 4 | \alias{pieChart} 5 | \title{Plot pie chart} 6 | \usage{ 7 | pieChart(df, label.size = 2.5, color.use = NULL, title = "") 8 | } 9 | \arguments{ 10 | \item{df}{a dataframe} 11 | 12 | \item{label.size}{a character} 13 | 14 | \item{color.use}{the name of the variable in CellChatDB interaction_input} 15 | 16 | \item{title}{the title of plot} 17 | } 18 | \description{ 19 | Plot pie chart 20 | } 21 | -------------------------------------------------------------------------------- /man/plotGeneExpression.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{plotGeneExpression} 4 | \alias{plotGeneExpression} 5 | \title{A Seurat wrapper function for plotting gene expression using violin plot, dot plot or bar plot} 6 | \usage{ 7 | plotGeneExpression( 8 | object, 9 | features = NULL, 10 | signaling = NULL, 11 | enriched.only = TRUE, 12 | type = c("violin", "dot", "bar"), 13 | color.use = NULL, 14 | group.by = NULL, 15 | ... 16 | ) 17 | } 18 | \arguments{ 19 | \item{object}{CellChat object} 20 | 21 | \item{features}{Features to plot gene expression} 22 | 23 | \item{signaling}{a char vector containing signaling pathway names for searching} 24 | 25 | \item{enriched.only}{whether only return the identified enriched signaling genes in the database. Default = TRUE, returning the significantly enriched signaling interactions} 26 | 27 | \item{type}{violin plot or dot plot} 28 | 29 | \item{color.use}{defining the color for each cell group} 30 | 31 | \item{group.by}{Name of one metadata columns to group (color) cells. Default is the defined cell groups in CellChat object} 32 | 33 | \item{...}{other arguments passing to either VlnPlot or DotPlot from Seurat package} 34 | } 35 | \description{ 36 | This function create a Seurat object from an input CellChat object, and then plot gene expression distribution using a modified violin plot or dot plot based on Seurat's function or a bar plot. 37 | Please check \code{\link{StackedVlnPlot}},\code{\link{dotPlot}} and \code{\link{barPlot}}for detailed description of the arguments. 38 | } 39 | \details{ 40 | USER can extract the signaling genes related to the inferred L-R pairs or signaling pathway using \code{\link{extractEnrichedLR}}, and then plot gene expression using Seurat package. 41 | } 42 | -------------------------------------------------------------------------------- /man/preProcMultiomics.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{preProcMultiomics} 4 | \alias{preProcMultiomics} 5 | \title{Preprocessing multi-omics data and preparing the L-R database} 6 | \usage{ 7 | preProcMultiomics(data.list, db, do.sparse = TRUE) 8 | } 9 | \arguments{ 10 | \item{data.list}{a list consisting of multi-omics data (e.g., RNA & ADT)} 11 | 12 | \item{db}{one of the CellChatDB databases: CellChatDB.human, CellChatDB.mouse, CellChatDB.zebrafish} 13 | 14 | \item{do.sparse}{whether to use sparse format} 15 | } 16 | \description{ 17 | Preprocessing multi-omics data and preparing the L-R database 18 | } 19 | -------------------------------------------------------------------------------- /man/projectAndRecombine.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{projectAndRecombine} 4 | \alias{projectAndRecombine} 5 | \title{Perform network projecting on network when the network genes and the 6 | experiment genes aren't exactly the same.} 7 | \usage{ 8 | projectAndRecombine( 9 | gene_expression, 10 | adj_matrix, 11 | alpha, 12 | projecting.function = randomWalkBySolve, 13 | normalizeAdjMatrix = c("rows", "columns") 14 | ) 15 | } 16 | \arguments{ 17 | \item{gene_expression}{gene expession data to be projected 18 | [N_genes x M_samples]} 19 | 20 | \item{adj_matrix}{adjacenty matrix of network to perform projecting over. 21 | Will be column-normalized. 22 | Rownames and colnames should be genes.} 23 | 24 | \item{alpha}{network projecting parameter (1 - restart probability in random 25 | walk model.} 26 | 27 | \item{projecting.function}{must be a function that takes in data, adjacency 28 | matrix, and alpha. Will be used to perform the 29 | actual projecting.} 30 | 31 | \item{normalizeAdjMatrix}{which dimension (rows or columns) should the 32 | adjacency matrix be normalized by. rows 33 | corresponds to in-degree, columns to 34 | out-degree.} 35 | } 36 | \value{ 37 | matrix with network-projected gene expression data. Genes that are 38 | not present in projecting network will retain original values. 39 | } 40 | \description{ 41 | The gene network might be defined only on a subset of genes that are 42 | measured in any experiment. Further, an experiment might not measure all 43 | genes that are present in the network. This function projects the experiment 44 | data onto the gene space defined by the network prior to projecting. Then, 45 | it projects the projected data back into the original dimansions. 46 | } 47 | \keyword{internal} 48 | -------------------------------------------------------------------------------- /man/projectFromNetworkRecombine.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{projectFromNetworkRecombine} 4 | \alias{projectFromNetworkRecombine} 5 | \title{Combine gene expression from projected space (that of the network) with the 6 | expression of genes that were not projected (not present in network)} 7 | \usage{ 8 | projectFromNetworkRecombine(original_expression, projected_expression) 9 | } 10 | \arguments{ 11 | \item{original_expression}{the non-projected expression} 12 | 13 | \item{projected_expression}{the projected gene expression, in the space 14 | of the genes defined by the network} 15 | } 16 | \value{ 17 | a matrix in the dimensions of original_expression, where values that 18 | are present in projected_expression are copied from there. 19 | } 20 | \description{ 21 | Combine gene expression from projected space (that of the network) with the 22 | expression of genes that were not projected (not present in network) 23 | } 24 | \keyword{internal} 25 | -------------------------------------------------------------------------------- /man/projectOnNetwork.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{projectOnNetwork} 4 | \alias{projectOnNetwork} 5 | \title{Project the gene expression matrix onto a lower space 6 | of the genes defined in the projecting network} 7 | \usage{ 8 | projectOnNetwork(gene_expression, new_features, missing.value = 0) 9 | } 10 | \arguments{ 11 | \item{gene_expression}{gene expression matrix} 12 | 13 | \item{new_features}{the genes in the network, on which to project 14 | the gene expression matrix} 15 | 16 | \item{missing.value}{value to assign to genes that are in network, 17 | but missing from gene expression matrix} 18 | } 19 | \value{ 20 | the gene expression matrix projected onto the gene space defined by new_features 21 | } 22 | \description{ 23 | Project the gene expression matrix onto a lower space 24 | of the genes defined in the projecting network 25 | } 26 | \keyword{internal} 27 | -------------------------------------------------------------------------------- /man/randomWalkBySolve.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{randomWalkBySolve} 4 | \alias{randomWalkBySolve} 5 | \title{project data on graph by solving the linear equation (I - alpha*A) * E_sm = E * (1-alpha)} 6 | \usage{ 7 | randomWalkBySolve(E, A, alpha, normalizeAjdMatrix = c("rows", "columns")) 8 | } 9 | \arguments{ 10 | \item{E}{initial data matrix [NxM]} 11 | 12 | \item{A}{adjacency matrix of graph to network project on will be column-normalized.} 13 | 14 | \item{alpha}{projecting coefficient (1 - restart probability of random walk)} 15 | } 16 | \value{ 17 | network-projected gene expression 18 | } 19 | \description{ 20 | project data on graph by solving the linear equation (I - alpha*A) * E_sm = E * (1-alpha) 21 | } 22 | \keyword{internal} 23 | -------------------------------------------------------------------------------- /man/rankNet.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{rankNet} 4 | \alias{rankNet} 5 | \title{Rank signaling networks based on the information flow or the number of interactions} 6 | \usage{ 7 | rankNet( 8 | object, 9 | slot.name = "netP", 10 | measure = c("weight", "count"), 11 | mode = c("comparison", "single"), 12 | comparison = c(1, 2), 13 | color.use = NULL, 14 | stacked = FALSE, 15 | sources.use = NULL, 16 | targets.use = NULL, 17 | signaling = NULL, 18 | pairLR = NULL, 19 | signaling.type = NULL, 20 | do.stat = FALSE, 21 | paired.test = TRUE, 22 | cutoff.pvalue = 0.05, 23 | tol = 0.05, 24 | thresh = 0.05, 25 | show.raw = FALSE, 26 | return.data = FALSE, 27 | x.rotation = 90, 28 | title = NULL, 29 | bar.w = 0.75, 30 | font.size = 8, 31 | do.flip = TRUE, 32 | x.angle = NULL, 33 | y.angle = 0, 34 | x.hjust = 1, 35 | y.hjust = 1, 36 | axis.gap = FALSE, 37 | ylim = NULL, 38 | segments = NULL, 39 | tick_width = NULL, 40 | rel_heights = c(0.9, 0, 0.1) 41 | ) 42 | } 43 | \arguments{ 44 | \item{object}{CellChat object} 45 | 46 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 47 | 48 | \item{measure}{"weight" or "count". "weight": comparing the total interaction weights (strength); "count": comparing the number of interactions;} 49 | 50 | \item{mode}{"single","comparison"} 51 | 52 | \item{comparison}{a numerical vector giving the datasets for comparison; a single value means ranking for only one dataset and two values means ranking comparison for two datasets} 53 | 54 | \item{color.use}{defining the color for each cell group} 55 | 56 | \item{stacked}{whether plot the stacked bar plot} 57 | 58 | \item{sources.use}{a vector giving the index or the name of source cell groups} 59 | 60 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 61 | 62 | \item{signaling}{a vector giving the signaling pathway to show} 63 | 64 | \item{pairLR}{a vector giving the names of L-R pairs to show (e.g, pairLR = c("IL1A_IL1R1_IL1RAP","IL1B_IL1R1_IL1RAP"))} 65 | 66 | \item{signaling.type}{a char giving the types of signaling from the three categories c("Secreted Signaling", "ECM-Receptor", "Cell-Cell Contact")} 67 | 68 | \item{do.stat}{whether do a Wilcoxon test to determine whether there is significant difference between two datasets. Default = FALSE} 69 | 70 | \item{paired.test}{a logical indicating whether you want a paired test. Paired test is applicable to compare two datasets with the same cellular compositions.} 71 | 72 | \item{cutoff.pvalue}{the cutoff of pvalue when doing Wilcoxon test; Default = 0.05} 73 | 74 | \item{tol}{a tolerance when considering the relative contribution being equal between two datasets. contribution.relative between 1-tol and 1+tol will be considered as equal contribution} 75 | 76 | \item{thresh}{threshold of the p-value for determining significant interaction} 77 | 78 | \item{show.raw}{whether show the raw information flow. Default = FALSE, showing the scaled information flow to provide compariable data scale; When stacked = TRUE, use raw information flow by default.} 79 | 80 | \item{return.data}{whether return the data.frame consisting of the calculated information flow of each signaling pathway or L-R pair} 81 | 82 | \item{x.rotation}{rotation of x-labels} 83 | 84 | \item{title}{main title of the plot} 85 | 86 | \item{bar.w}{the width of bar plot} 87 | 88 | \item{font.size}{font size} 89 | 90 | \item{do.flip}{whether flip the x-y axis} 91 | 92 | \item{x.angle, y.angle, x.hjust, y.hjust}{parameters for rotating and spacing axis labels} 93 | 94 | \item{axis.gap}{whetehr making gaps in y-axes} 95 | 96 | \item{ylim, segments, tick_width, rel_heights}{parameters in the function gg.gap when making gaps in y-axes 97 | e.g., ylim = c(0, 35), segments = list(c(11, 14),c(16, 28)), tick_width = c(5,2,5), rel_heights = c(0.8,0,0.1,0,0.1) 98 | https://tobiasbusch.xyz/an-r-package-for-everything-ep2-gaps} 99 | } 100 | \description{ 101 | This function can also be used to rank signaling from certain cell groups to other cell groups 102 | } 103 | -------------------------------------------------------------------------------- /man/rankNetPairwise.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{rankNetPairwise} 4 | \alias{rankNetPairwise} 5 | \title{Rank ligand-receptor interactions for any pair of two cell groups} 6 | \usage{ 7 | rankNetPairwise(object, LR.use = NULL) 8 | } 9 | \arguments{ 10 | \item{object}{CellChat object} 11 | 12 | \item{LR.use}{ligand-receptor interactions used in inferring communication network} 13 | } 14 | \description{ 15 | Rank ligand-receptor interactions for any pair of two cell groups 16 | } 17 | -------------------------------------------------------------------------------- /man/rankSimilarity.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{rankSimilarity} 4 | \alias{rankSimilarity} 5 | \title{Rank the similarity of the shared signaling pathways based on their joint manifold learning} 6 | \usage{ 7 | rankSimilarity( 8 | object, 9 | slot.name = "netP", 10 | type = c("functional", "structural"), 11 | comparison1 = NULL, 12 | comparison2 = c(1, 2), 13 | x.rotation = 90, 14 | title = NULL, 15 | color.use = NULL, 16 | bar.w = NULL, 17 | font.size = 8 18 | ) 19 | } 20 | \arguments{ 21 | \item{object}{CellChat object} 22 | 23 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 24 | 25 | \item{type}{"functional","structural"} 26 | 27 | \item{comparison1}{a numerical vector giving the datasets for comparison. This should be the same as `comparison` in `computeNetSimilarityPairwise`} 28 | 29 | \item{comparison2}{a numerical vector with two elements giving the datasets for comparison. 30 | 31 | If there are more than 2 datasets defined in `comparison1`, `comparison2` can be defined to indicate which two datasets used for computing the distance. 32 | e.g., comparison2 = c(1,3) indicates the first and third datasets defined in `comparison1` will be used for comparison.} 33 | 34 | \item{x.rotation}{rotation of x-labels} 35 | 36 | \item{title}{main title of the plot} 37 | 38 | \item{color.use}{defining the color} 39 | 40 | \item{bar.w}{the width of bar plot} 41 | 42 | \item{font.size}{font size} 43 | } 44 | \description{ 45 | Rank the similarity of the shared signaling pathways based on their joint manifold learning 46 | } 47 | -------------------------------------------------------------------------------- /man/runCellChatApp.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/app.R 3 | \name{runCellChatApp} 4 | \alias{runCellChatApp} 5 | \title{Generate a Shiny App for interactive exploration of CellChat's outputs} 6 | \usage{ 7 | runCellChatApp(object, ...) 8 | } 9 | \arguments{ 10 | \item{object}{CellChat object} 11 | 12 | \item{...}{Other parameters of `shinyApp` function from shiny R package} 13 | } 14 | \value{ 15 | A Shiny app object on the basis of one CellChat object 16 | } 17 | \description{ 18 | Generate a Shiny App for interactive exploration of CellChat's outputs 19 | } 20 | -------------------------------------------------------------------------------- /man/runPCA.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{runPCA} 4 | \alias{runPCA} 5 | \title{Dimension reduction using PCA} 6 | \usage{ 7 | runPCA(data.use, do.fast = T, dimPC = 50, seed.use = 42, weight.by.var = T) 8 | } 9 | \arguments{ 10 | \item{data.use}{input data (samples in rows, features in columns)} 11 | 12 | \item{do.fast}{whether do fast PCA} 13 | 14 | \item{dimPC}{the number of components to keep} 15 | 16 | \item{seed.use}{set a seed} 17 | 18 | \item{weight.by.var}{whether use weighted pc.scores} 19 | } 20 | \description{ 21 | Dimension reduction using PCA 22 | } 23 | -------------------------------------------------------------------------------- /man/runUMAP.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{runUMAP} 4 | \alias{runUMAP} 5 | \title{Run UMAP} 6 | \usage{ 7 | runUMAP( 8 | data.use, 9 | n_neighbors = 30L, 10 | n_components = 2L, 11 | metric = "correlation", 12 | n_epochs = NULL, 13 | learning_rate = 1, 14 | min_dist = 0.3, 15 | spread = 1, 16 | set_op_mix_ratio = 1, 17 | local_connectivity = 1L, 18 | repulsion_strength = 1, 19 | negative_sample_rate = 5, 20 | a = NULL, 21 | b = NULL, 22 | seed.use = 42L, 23 | metric_kwds = NULL, 24 | angular_rp_forest = FALSE, 25 | verbose = FALSE 26 | ) 27 | } 28 | \arguments{ 29 | \item{data.use}{input data matrix} 30 | 31 | \item{n_neighbors}{This determines the number of neighboring points used in 32 | local approximations of manifold structure. Larger values will result in more 33 | global structure being preserved at the loss of detailed local structure. In general this parameter should often be in the range 5 to 50.} 34 | 35 | \item{n_components}{The dimension of the space to embed into.} 36 | 37 | \item{metric}{This determines the choice of metric used to measure distance in the input space.} 38 | 39 | \item{n_epochs}{the number of training epochs to be used in optimizing the low dimensional embedding. Larger values result in more accurate embeddings. If NULL is specified, a value will be selected based on the size of the input dataset (200 for large datasets, 500 for small).} 40 | 41 | \item{learning_rate}{The initial learning rate for the embedding optimization.} 42 | 43 | \item{min_dist}{This controls how tightly the embedding is allowed compress points together. 44 | Larger values ensure embedded points are moreevenly distributed, while smaller values allow the 45 | algorithm to optimise more accurately with regard to local structure. Sensible values are in the range 0.001 to 0.5.} 46 | 47 | \item{spread}{he effective scale of embedded points. In combination with min.dist this determines how clustered/clumped the embedded points are.} 48 | 49 | \item{set_op_mix_ratio}{Interpolate between (fuzzy) union and intersection as the set operation used to combine local fuzzy simplicial sets to obtain a global fuzzy simplicial sets.} 50 | 51 | \item{local_connectivity}{The local connectivity required - i.e. the number of nearest neighbors 52 | that should be assumed to be connected at a local level. The higher this value the more connected 53 | the manifold becomes locally. In practice this should be not more than the local intrinsic dimension of the manifold.} 54 | 55 | \item{repulsion_strength}{Weighting applied to negative samples in low dimensional embedding 56 | optimization. Values higher than one will result in greater weight being given to negative samples.} 57 | 58 | \item{negative_sample_rate}{The number of negative samples to select per positive sample in the 59 | optimization process. Increasing this value will result in greater repulsive force being applied, greater optimization cost, but slightly more accuracy.} 60 | 61 | \item{a}{More specific parameters controlling the embedding. If NULL, these values are set automatically as determined by min. dist and spread.} 62 | 63 | \item{b}{More specific parameters controlling the embedding. If NULL, these values are set automatically as determined by min. dist and spread.} 64 | 65 | \item{seed.use}{Set a random seed. By default, sets the seed to 42.} 66 | 67 | \item{metric_kwds, angular_rp_forest, verbose}{other parameters used in UMAP} 68 | } 69 | \description{ 70 | Run UMAP 71 | } 72 | -------------------------------------------------------------------------------- /man/scPalette.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{scPalette} 4 | \alias{scPalette} 5 | \title{Generate colors from a customed color palette} 6 | \usage{ 7 | scPalette(n) 8 | } 9 | \arguments{ 10 | \item{n}{number of colors} 11 | } 12 | \value{ 13 | A color palette for plotting 14 | } 15 | \description{ 16 | Generate colors from a customed color palette 17 | } 18 | -------------------------------------------------------------------------------- /man/scaleData.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{scaleData} 4 | \alias{scaleData} 5 | \title{Scale the data} 6 | \usage{ 7 | scaleData(data.use, do.center = T) 8 | } 9 | \arguments{ 10 | \item{data.use}{input data} 11 | 12 | \item{do.center}{whether center the values} 13 | } 14 | \description{ 15 | Scale the data 16 | } 17 | -------------------------------------------------------------------------------- /man/scaleMat.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{scaleMat} 4 | \alias{scaleMat} 5 | \title{Scale a data matrix} 6 | \usage{ 7 | scaleMat(x, scale, na.rm = TRUE) 8 | } 9 | \arguments{ 10 | \item{x}{data matrix} 11 | 12 | \item{scale}{the method to scale the data} 13 | 14 | \item{na.rm}{whether remove na} 15 | } 16 | \description{ 17 | Scale a data matrix 18 | } 19 | -------------------------------------------------------------------------------- /man/searchPair.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/database.R 3 | \name{searchPair} 4 | \alias{searchPair} 5 | \title{Subset the ligand-receptor interactions for given specific signals in CellChatDB} 6 | \usage{ 7 | searchPair( 8 | signaling = c(), 9 | pairLR.use, 10 | key = c("pathway_name", "ligand"), 11 | matching.exact = FALSE, 12 | pair.only = TRUE 13 | ) 14 | } 15 | \arguments{ 16 | \item{signaling}{a character vector} 17 | 18 | \item{pairLR.use}{a dataframe containing ligand-receptor interactions} 19 | 20 | \item{key}{the keyword to match} 21 | 22 | \item{matching.exact}{whether perform exact matching} 23 | 24 | \item{pair.only}{whether only return ligand-receptor pairs without cofactors} 25 | } 26 | \description{ 27 | Subset the ligand-receptor interactions for given specific signals in CellChatDB 28 | } 29 | -------------------------------------------------------------------------------- /man/selectK.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{selectK} 4 | \alias{selectK} 5 | \title{Select the number of the patterns for running `identifyCommunicationPatterns`} 6 | \usage{ 7 | selectK( 8 | object, 9 | slot.name = "netP", 10 | pattern = c("outgoing", "incoming"), 11 | title.name = NULL, 12 | do.facet = TRUE, 13 | k.range = seq(2, 10), 14 | nrun = 30, 15 | seed.use = 10 16 | ) 17 | } 18 | \arguments{ 19 | \item{object}{CellChat object} 20 | 21 | \item{slot.name}{the slot name of object that is used to compute centrality measures of signaling networks} 22 | 23 | \item{pattern}{"outgoing" or "incoming"} 24 | 25 | \item{title.name}{title of plot} 26 | 27 | \item{do.facet}{whether use facet plot showing the two measures} 28 | 29 | \item{k.range}{a range of the number of patterns} 30 | 31 | \item{nrun}{number of runs when performing NMF} 32 | 33 | \item{seed.use}{seed when performing NMF} 34 | } 35 | \value{ 36 | a ggplot object 37 | } 38 | \description{ 39 | We infer the number of patterns based on two metrics that have been implemented in the NMF R package, including Cophenetic and Silhouette. Both metrics measure the stability for a particular number of patterns based on a hierarchical clustering of the consensus matrix. For a range of the number of patterns, a suitable number of patterns is the one at which Cophenetic and Silhouette values begin to drop suddenly. 40 | } 41 | -------------------------------------------------------------------------------- /man/setIdent.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{setIdent} 4 | \alias{setIdent} 5 | \title{Set the default identity of cells} 6 | \usage{ 7 | setIdent(object, ident.use = NULL, levels = NULL, display.warning = TRUE) 8 | } 9 | \arguments{ 10 | \item{object}{CellChat object} 11 | 12 | \item{ident.use}{the name of the variable in object.meta;} 13 | 14 | \item{levels}{set the levels of factor} 15 | 16 | \item{display.warning}{whether display the warning message} 17 | } 18 | \description{ 19 | Set the default identity of cells 20 | } 21 | -------------------------------------------------------------------------------- /man/show-CellChat-method.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CellChat_class.R 3 | \docType{methods} 4 | \name{show,CellChat-method} 5 | \alias{show,CellChat-method} 6 | \title{show method for CellChat} 7 | \usage{ 8 | \S4method{show}{CellChat}(object) 9 | } 10 | \arguments{ 11 | \item{object}{object} 12 | 13 | \item{CellChat}{object} 14 | 15 | \item{show}{show the object} 16 | } 17 | \description{ 18 | show method for CellChat 19 | } 20 | -------------------------------------------------------------------------------- /man/showDatabaseCategory.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/database.R 3 | \name{showDatabaseCategory} 4 | \alias{showDatabaseCategory} 5 | \title{Show the description of CellChatDB databse} 6 | \usage{ 7 | showDatabaseCategory(CellChatDB, nrow = 1) 8 | } 9 | \arguments{ 10 | \item{CellChatDB}{CellChatDB databse} 11 | 12 | \item{nrow}{the number of rows in the plot} 13 | } 14 | \description{ 15 | Show the description of CellChatDB databse 16 | } 17 | -------------------------------------------------------------------------------- /man/sketchData.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{sketchData} 4 | \alias{sketchData} 5 | \title{Downsampling single cell data using geometric sketching algorithm} 6 | \usage{ 7 | sketchData(object, percent, idents = NULL, do.PCA = TRUE, dimPC = 30) 8 | } 9 | \arguments{ 10 | \item{object}{A data matrix (should have row names; samples in rows, features in columns) or a Seurat object. 11 | 12 | When object is a PCA or UMAP space, please set `do.PCA = FALSE` 13 | 14 | When object is a data matrix (cells in rows and genes in columns), it is better to use the highly variable genes. PCA will be done on this input data matrix.} 15 | 16 | \item{percent}{the percent of data to sketch} 17 | 18 | \item{idents}{A vector of identity classes to keep for sketching} 19 | 20 | \item{do.PCA}{whether doing PCA on the input data} 21 | 22 | \item{dimPC}{the number of components to use} 23 | } 24 | \value{ 25 | A vector of cell names to use for downsampling 26 | } 27 | \description{ 28 | USERs need to install the python package `pip install geosketch` (https://github.com/brianhie/geosketch) 29 | } 30 | -------------------------------------------------------------------------------- /man/smoothData.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{smoothData} 4 | \alias{smoothData} 5 | \title{Smooth the gene expression data} 6 | \usage{ 7 | smoothData( 8 | object, 9 | method = c("netSmooth"), 10 | adj = NULL, 11 | alpha = 0.5, 12 | normalizeAdjMatrix = c("rows", "columns") 13 | ) 14 | } 15 | \arguments{ 16 | \item{object}{CellChat object} 17 | 18 | \item{method}{When method = "netSmooth", smoothing a gene’s expression values based on its neighbors defined in a high-confidence experimentally validated protein-protein network.} 19 | 20 | \item{adj}{adjacency matrix of protein-protein interaction network to use} 21 | 22 | \item{alpha}{numeric in [0,1] alpha = 0: no smoothing; a larger value alpha results in increasing levels of smoothing.} 23 | 24 | \item{normalizeAdjMatrix}{how to normalize the adjacency matrix 25 | possible values are 'rows' (in-degree) 26 | and 'columns' (out-degree)} 27 | } 28 | \value{ 29 | a smoothed gene expression matrix 30 | } 31 | \description{ 32 | A diffusion process is used to smooth genes’ expression values based on their neighbors’ defined in a high-confidence experimentally validated protein-protein network. 33 | } 34 | \details{ 35 | This function is useful when analyzing single-cell data with shallow sequencing depth because the projection reduces the dropout effects of signaling genes, in particular for possible zero expression of subunits of ligands/receptors 36 | } 37 | -------------------------------------------------------------------------------- /man/spatialDimPlot.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{spatialDimPlot} 4 | \alias{spatialDimPlot} 5 | \title{Visualize spatial cell groups} 6 | \usage{ 7 | spatialDimPlot( 8 | object, 9 | color.use = NULL, 10 | group.by = NULL, 11 | sample.use = NULL, 12 | sources.use = NULL, 13 | targets.use = NULL, 14 | idents.use = NULL, 15 | alpha = 1, 16 | shape.by = 16, 17 | title.name = NULL, 18 | point.size = 2.4, 19 | legend.size = 5, 20 | legend.text.size = 8, 21 | legend.position = "right", 22 | ncol = 1, 23 | byrow = FALSE 24 | ) 25 | } 26 | \arguments{ 27 | \item{object}{cellchat object} 28 | 29 | \item{color.use}{defining the color for each cell group} 30 | 31 | \item{group.by}{Name of one metadata columns to group (color) cells. Default is the defined cell groups in CellChat object} 32 | 33 | \item{sample.use}{the sample name used for visualization, which should be the element in `object@meta$samples`.} 34 | 35 | \item{sources.use}{a vector giving the index or the name of source cell groups} 36 | 37 | \item{targets.use}{a vector giving the index or the name of target cell groups} 38 | 39 | \item{idents.use}{a vector giving the index or the name of cell groups of interest} 40 | 41 | \item{alpha}{the transparency of individual spot} 42 | 43 | \item{shape.by}{the shape of individual spot} 44 | 45 | \item{title.name}{title name} 46 | 47 | \item{point.size}{the size of spots} 48 | 49 | \item{legend.size}{the size of legend} 50 | 51 | \item{legend.text.size}{the text size on the legend} 52 | 53 | \item{legend.position}{legend position} 54 | 55 | \item{ncol}{number of columns of the legend text} 56 | 57 | \item{byrow}{arrange the legend text byrow or not} 58 | } 59 | \description{ 60 | This function takes a CellChat object as input, and then plot cell groups of interest. 61 | } 62 | -------------------------------------------------------------------------------- /man/spatialFeaturePlot.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/visualization.R 3 | \name{spatialFeaturePlot} 4 | \alias{spatialFeaturePlot} 5 | \title{A spatial feature plots} 6 | \usage{ 7 | spatialFeaturePlot( 8 | object, 9 | features = NULL, 10 | signaling = NULL, 11 | pairLR.use = NULL, 12 | sample.use = NULL, 13 | enriched.only = TRUE, 14 | thresh = 0.05, 15 | do.group = TRUE, 16 | color.heatmap = "Spectral", 17 | n.colors = 8, 18 | direction = -1, 19 | do.binary = FALSE, 20 | cutoff = NULL, 21 | color.use = NULL, 22 | alpha = 1, 23 | point.size = 0.8, 24 | legend.size = 3, 25 | legend.text.size = 8, 26 | shape.by = 16, 27 | ncol = NULL, 28 | show.legend = TRUE, 29 | show.legend.combined = FALSE 30 | ) 31 | } 32 | \arguments{ 33 | \item{object}{cellchat object} 34 | 35 | \item{features}{a char vector containing features to visualize. `features` can be genes or column names of `object@meta`.} 36 | 37 | \item{signaling}{signalling names to visualize} 38 | 39 | \item{pairLR.use}{a data frame consisting of one column named "interaction_name", defining the L-R pairs of interest} 40 | 41 | \item{sample.use}{the sample used for visualization, which should be the element in `object@meta$samples`.} 42 | 43 | \item{enriched.only}{whether only return the identified enriched signaling genes in the database. Default = TRUE, returning the significantly enriched signaling interactions} 44 | 45 | \item{thresh}{threshold of the p-value for determining significant interaction when visualizing links at the level of ligands/receptors;} 46 | 47 | \item{do.group}{set `do.group = TRUE` when only showing enriched signaling based on cell group-level communication; set `do.group = FALSE` when only showing enriched signaling based on individual cell-level communication} 48 | 49 | \item{color.heatmap}{A character string or vector indicating the colormap option to use. It can be the avaibale color palette in brewer.pal() or viridis_pal() (e.g., "Spectral","viridis")} 50 | 51 | \item{n.colors, direction}{n.colors: number of basic colors to generate from color palette; direction: Sets the order of colors in the scale. If 1, the default colors are used. If -1, the order of colors is reversed.} 52 | 53 | \item{do.binary, cutoff}{whether binarizing the expression using a given cutoff} 54 | 55 | \item{color.use}{defining the color for cells/spots expressing ligand only, expressing receptor only, expressing both ligand & receptor and cells/spots without expression of given ligands and receptors} 56 | 57 | \item{alpha}{the transparency of individual spot} 58 | 59 | \item{point.size}{the size of cell slot} 60 | 61 | \item{legend.size}{the size of legend} 62 | 63 | \item{legend.text.size}{the text size on the legend} 64 | 65 | \item{shape.by}{the shape of individual spot} 66 | 67 | \item{ncol}{number of columns if plotting multiple plots} 68 | 69 | \item{show.legend}{whether show each figure legend} 70 | 71 | \item{show.legend.combined}{whether show the figure legend for the last plot} 72 | } 73 | \description{ 74 | This function takes a CellChat object as input, and then plot gene expression distribution over spots/cells on the image. 75 | } 76 | -------------------------------------------------------------------------------- /man/subsetCellChat.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CellChat_class.R 3 | \name{subsetCellChat} 4 | \alias{subsetCellChat} 5 | \title{Subset CellChat object using a portion of cells} 6 | \usage{ 7 | subsetCellChat( 8 | object, 9 | cells.use = NULL, 10 | idents.use = NULL, 11 | group.by = NULL, 12 | invert = FALSE, 13 | thresh = 0.05 14 | ) 15 | } 16 | \arguments{ 17 | \item{object}{A CellChat object (either an object from a single dataset or a merged objects from multiple datasets)} 18 | 19 | \item{cells.use}{a char vector giving the cell barcodes to subset. If cells.use = NULL, USER must define `idents.use`} 20 | 21 | \item{idents.use}{a subset of cell groups used for analysis} 22 | 23 | \item{group.by}{cell group information; default is `object@idents`; otherwise it should be one of the column names of the meta slot} 24 | 25 | \item{invert}{whether invert the idents.use} 26 | 27 | \item{thresh}{threshold of the p-value for determining significant interaction. A parameter as an input of the function `computeCommunProbPathway`} 28 | } 29 | \description{ 30 | Subset CellChat object using a portion of cells 31 | } 32 | -------------------------------------------------------------------------------- /man/subsetCommunication.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{subsetCommunication} 4 | \alias{subsetCommunication} 5 | \title{Subset the inferred cell-cell communications of interest} 6 | \usage{ 7 | subsetCommunication( 8 | object = NULL, 9 | net = NULL, 10 | slot.name = "net", 11 | sources.use = NULL, 12 | targets.use = NULL, 13 | signaling = NULL, 14 | pairLR.use = NULL, 15 | thresh = 0.05, 16 | datasets = NULL, 17 | ligand.pvalues = NULL, 18 | ligand.logFC = NULL, 19 | ligand.pct.1 = NULL, 20 | ligand.pct.2 = NULL, 21 | receptor.pvalues = NULL, 22 | receptor.logFC = NULL, 23 | receptor.pct.1 = NULL, 24 | receptor.pct.2 = NULL 25 | ) 26 | } 27 | \arguments{ 28 | \item{object}{CellChat object} 29 | 30 | \item{net}{Alternative input is a data frame with at least with three columns defining the cell-cell communication network ("source","target","interaction_name")} 31 | 32 | \item{slot.name}{the slot name of object: slot.name = "net" when extracting the inferred communications at the level of ligands/receptors; slot.name = "netP" when extracting the inferred communications at the level of signaling pathways} 33 | 34 | \item{sources.use}{a vector giving the index or the name of source cell groups} 35 | 36 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 37 | 38 | \item{signaling}{a character vector giving the name of signaling pathways of interest} 39 | 40 | \item{pairLR.use}{a data frame consisting of one column named either "interaction_name" or "pathway_name", defining the interactions of interest} 41 | 42 | \item{thresh}{threshold of the p-value for determining significant interaction} 43 | 44 | \item{datasets}{select the inferred cell-cell communications from a particular `datasets` when inputing a data frame `net`} 45 | 46 | \item{ligand.pvalues, ligand.logFC, ligand.pct.1, ligand.pct.2}{set threshold for ligand genes 47 | 48 | ligand.pvalues: threshold for pvalues in the differential expression gene analysis (DEG) 49 | 50 | ligand.logFC: threshold for logFoldChange in the DEG analysis; When ligand.logFC > 0, keep upgulated genes; otherwise, kepp downregulated genes 51 | 52 | ligand.pct.1: threshold for the percent of expressed genes in the defined 'positive' cell group. keep genes with percent greater than ligand.pct.1 53 | 54 | ligand.pct.2: threshold for the percent of expressed genes in the cells except for the defined 'positive' cell group} 55 | 56 | \item{receptor.pvalues, receptor.logFC, receptor.pct.1, receptor.pct.2}{set threshold for receptor genes} 57 | } 58 | \value{ 59 | If input object is created from a single dataset, a data frame of the inferred cell-cell communications of interest, consisting of source, target, interaction_name, pathway_name, prob and other information 60 | 61 | If input object is a merged object from multiple datasets, it will return a list and each element is a data frame for one dataset 62 | } 63 | \description{ 64 | NB: If all arguments are NULL, it returns a data frame consisting of all the inferred cell-cell communications 65 | } 66 | \examples{ 67 | \dontrun{ 68 | # access all the inferred cell-cell communications 69 | df.net <- subsetCommunication(cellchat) 70 | 71 | # access all the inferred cell-cell communications at the level of signaling pathways 72 | df.net <- subsetCommunication(cellchat, slot.name = "netP") 73 | 74 | # Subset to certain cells with sources.use and targets.use 75 | df.net <- subsetCommunication(cellchat, sources.use = c(1,2), targets.use = c(4,5)) 76 | 77 | # Subset to certain signaling, e.g., WNT and TGFb 78 | df.net <- subsetCommunication(cellchat, signaling = c("WNT", "TGFb")) 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /man/subsetCommunication_internal.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysis.R 3 | \name{subsetCommunication_internal} 4 | \alias{subsetCommunication_internal} 5 | \title{Subset the inferred cell-cell communications of interest} 6 | \usage{ 7 | subsetCommunication_internal( 8 | net, 9 | LR, 10 | cells.level, 11 | slot.name = "net", 12 | sources.use = NULL, 13 | targets.use = NULL, 14 | signaling = NULL, 15 | pairLR.use = NULL, 16 | thresh = 0.05, 17 | datasets = NULL, 18 | ligand.pvalues = NULL, 19 | ligand.logFC = NULL, 20 | ligand.pct.1 = NULL, 21 | ligand.pct.2 = NULL, 22 | receptor.pvalues = NULL, 23 | receptor.logFC = NULL, 24 | receptor.pct.1 = NULL, 25 | receptor.pct.2 = NULL 26 | ) 27 | } 28 | \arguments{ 29 | \item{net, LR, cells.level}{net is object@net or a data frame; LR: object@LR$LRsig; cells.level: levels(object@idents)} 30 | 31 | \item{slot.name}{the slot name of object: slot.name = "net" when extracting the inferred communications at the level of ligands/receptors; slot.name = "netP" when extracting the inferred communications at the level of signaling pathways} 32 | 33 | \item{sources.use}{a vector giving the index or the name of source cell groups} 34 | 35 | \item{targets.use}{a vector giving the index or the name of target cell groups.} 36 | 37 | \item{signaling}{a character vector giving the name of signaling pathways of interest} 38 | 39 | \item{pairLR.use}{a data frame consisting of one column named either "interaction_name" or "pathway_name", defining the interactions of interest} 40 | 41 | \item{thresh}{threshold of the p-value for determining significant interaction} 42 | 43 | \item{datasets}{select the inferred cell-cell communications from a particular `datasets` when inputing a data frame `net`} 44 | 45 | \item{ligand.pvalues, ligand.logFC, ligand.pct.1, ligand.pct.2}{set threshold for ligand genes 46 | 47 | ligand.pvalues: threshold for pvalues in the differential expression gene analysis (DEG) 48 | 49 | ligand.logFC: threshold for logFoldChange in the DEG analysis; When ligand.logFC > 0, keep upgulated genes; otherwise, kepp downregulated genes 50 | 51 | ligand.pct.1: threshold for the percent of expressed genes in the defined 'positive' cell group. keep genes with percent greater than ligand.pct.1 52 | 53 | ligand.pct.2: threshold for the percent of expressed genes in the cells except for the defined 'positive' cell group} 54 | 55 | \item{receptor.pvalues, receptor.logFC, receptor.pct.1, receptor.pct.2}{set threshold for receptor genes} 56 | } 57 | \value{ 58 | A data frame of the inferred cell-cell communications of interest, consisting of source, target, interaction_name, pathway_name, prob and other information 59 | } 60 | \description{ 61 | NB: If all arguments are NULL, it returns a data frame consisting of all the inferred cell-cell communications 62 | } 63 | -------------------------------------------------------------------------------- /man/subsetDB.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/database.R 3 | \name{subsetDB} 4 | \alias{subsetDB} 5 | \title{Subset CellChatDB databse by only including interactions of interest} 6 | \usage{ 7 | subsetDB(CellChatDB, search = c(), key = "annotation", non_protein = FALSE) 8 | } 9 | \arguments{ 10 | \item{CellChatDB}{CellChatDB databse} 11 | 12 | \item{search}{a character vector, which is a subset of c("Secreted Signaling","ECM-Receptor","Cell-Cell Contact","Non-protein Signaling"); Setting search = NULL & non_protein = FALSE will return all signaling except for "Non-protein Signaling". 13 | 14 | When `key` is a vector, the `search` should be a list with the size being `length(key)`, where each element is a character vector.} 15 | 16 | \item{key}{a character vector and each element should be one of the column names of the interaction_input from CellChatDB.} 17 | 18 | \item{non_protein}{whether to use the non-protein signaling for CellChat analysis. By default, non_protein = FALSE because most of non-protein signaling are the special synaptic signaling interactions that can only be used when inferring neuron-neuron communication.} 19 | } 20 | \description{ 21 | Subset CellChatDB databse by only including interactions of interest 22 | } 23 | -------------------------------------------------------------------------------- /man/subsetData.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{subsetData} 4 | \alias{subsetData} 5 | \title{Subset the expression data of signaling genes for saving computation cost} 6 | \usage{ 7 | subsetData(object, features = NULL) 8 | } 9 | \arguments{ 10 | \item{object}{CellChat object} 11 | 12 | \item{features}{default = NULL: subset the expression data of signaling genes in CellChatDB.use} 13 | } 14 | \value{ 15 | An updated CellChat object by assigning a subset of the data into the slot `data.signaling` 16 | } 17 | \description{ 18 | Subset the expression data of signaling genes for saving computation cost 19 | } 20 | -------------------------------------------------------------------------------- /man/thresholdedMean.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{thresholdedMean} 4 | \alias{thresholdedMean} 5 | \title{Compute the average expression per cell group when the percent of expressing cells per cell group larger than a threshold} 6 | \usage{ 7 | thresholdedMean(x, trim = 0.1, na.rm = TRUE) 8 | } 9 | \arguments{ 10 | \item{x}{a numeric vector} 11 | 12 | \item{trim}{the percent of expressing cells per cell group to be considered as zero} 13 | 14 | \item{na.rm}{whether remove na} 15 | } 16 | \description{ 17 | Compute the average expression per cell group when the percent of expressing cells per cell group larger than a threshold 18 | } 19 | -------------------------------------------------------------------------------- /man/triMean.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/modeling.R 3 | \name{triMean} 4 | \alias{triMean} 5 | \title{Compute the Tukey's trimean} 6 | \usage{ 7 | triMean(x, na.rm = TRUE) 8 | } 9 | \arguments{ 10 | \item{x}{a numeric vector} 11 | 12 | \item{na.rm}{whether remove na} 13 | } 14 | \description{ 15 | Compute the Tukey's trimean 16 | } 17 | -------------------------------------------------------------------------------- /man/updateCCC_score.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{updateCCC_score} 4 | \alias{updateCCC_score} 5 | \title{Update the cell-cell communication array from a customized cell-cell-communication scores between different cell groups} 6 | \usage{ 7 | updateCCC_score(object, net) 8 | } 9 | \arguments{ 10 | \item{object}{CellChat object} 11 | 12 | \item{net}{a data frame with at least five columns named as `source`,`target`,`ligand`,`receptor` and `score`, which defines the customized cell-cell-communication scores between different cell groups. 13 | a p-value column named `pval`, and additional columns named `interaction_name` and `interaction_name_2` can be also provided.} 14 | } 15 | \value{ 16 | a CellChat object with updated slot `net` and slot `DB` if db is not NULL. 17 | } 18 | \description{ 19 | Users may also check the `updateCellChatDB` function for integrating other resources or utilizing a custom database 20 | } 21 | -------------------------------------------------------------------------------- /man/updateCellChat.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CellChat_class.R 3 | \name{updateCellChat} 4 | \alias{updateCellChat} 5 | \title{Update a single CellChat object} 6 | \usage{ 7 | updateCellChat(object) 8 | } 9 | \arguments{ 10 | \item{object}{CellChat object} 11 | } 12 | \value{ 13 | a updated CellChat object 14 | } 15 | \description{ 16 | Update a single previously calculated CellChat object for spatial transcriptomics data analysis (version < 2.1.0) 17 | } 18 | \details{ 19 | Update a single previously calculated CellChat object (version < 1.6.0) 20 | 21 | version < 0.5.0: `object@var.features` is now `object@var.features$features`; `object@net$sum` is now `object@net$weight` if `aggregateNet` has been run. 22 | 23 | version 1.6.0: a `object@images` slot is added and `datatype` is added in `object@options$datatype` 24 | 25 | version 2.1.0: a column named `slices` is added in `meta` data for spatial transcriptomics data analysis. 26 | 27 | version 2.1.1: `images$scale.factors` is changed to `images$spatial.factors` for spatial transcriptomics data analysis. 28 | 29 | version 2.1.2: the column `slices` in `object@meta` is renamed as `samples` in order to identify consistent signaling across samples for cell-cell communication analysis. 30 | 31 | version 2.1.3: the slot `object@data.project` is renamed as `object@data.smooth`. 32 | } 33 | -------------------------------------------------------------------------------- /man/updateCellChatDB.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/database.R 3 | \name{updateCellChatDB} 4 | \alias{updateCellChatDB} 5 | \title{Update CellChatDB by integrating new L-R pairs from other resources or adding more information} 6 | \usage{ 7 | updateCellChatDB( 8 | db, 9 | gene_info = NULL, 10 | other_info = NULL, 11 | gene_info_columnNew = NULL, 12 | trim.pathway = FALSE, 13 | merged = FALSE, 14 | species_target = NULL 15 | ) 16 | } 17 | \arguments{ 18 | \item{db}{a data frame of the customized ligand-receptor database with at least two columns named as `ligand` and `receptor`. We highly suggest users to provide a column of pathway information named `pathway_name` associated with each L-R pair. 19 | Other optional columns include `interaction_name` and `interaction_name_2`. The default columns of CellChatDB can be checked via `colnames(CellChatDB.human$interaction)`.} 20 | 21 | \item{gene_info}{a data frame with at least one column named as `Symbol`. "When setting gene_info = NULL, the input `species_target` should be provided: either `human` or `mouse`.} 22 | 23 | \item{other_info}{a list consisting of other information including a dataframe named as `complex` and a dataframe named as `cofactor`. This additional information is not necessary. If other_info is provided, the `complex` and `cofactor` are dataframes with defined rownames.} 24 | 25 | \item{gene_info_columnNew}{a data frame with at least two columns named as `Symbol` and `AntibodyName`, which will add a new column named `AntibodyName` into `db$geneInfo`.} 26 | 27 | \item{trim.pathway}{whether to delete the interactions with missing pathway names when the column `pathway_name` is provided in `db`.} 28 | 29 | \item{merged}{whether merging the input database with the existing CellChatDB. setting merged = TRUE, the input `species_target` should be provided: either `human` or `mouse`.} 30 | 31 | \item{species_target}{the target species for output: either `human` or `mouse`.} 32 | } 33 | \value{ 34 | a list consisting of the customized L-R database for further CellChat analysis 35 | } 36 | \description{ 37 | Update CellChatDB by integrating new L-R pairs from other resources or adding more information 38 | } 39 | \examples{ 40 | \dontrun{ 41 | # integrating new L-R pairs from other resources or utilizing a custom database `db.user` 42 | db.new <- updateCellChatDB(db = db.user, gene_info = gene_info) 43 | db.new <- updateCellChatDB(db = db.user, gene_info = NULL, species_target = "human") 44 | # Alternatively, users can integrate the customized L-R pairs into the built-in CellChatDB 45 | db.new <- updateCellChatDB(db = db.user, merged = TRUE, species_target = "human") 46 | # Add new columns (e.g., AntibodyName) into gene_info 47 | db.new.human <- updateCellChatDB(db = CellChatDB.human$interaction, gene_info = CellChatDB.human$geneInfo, other_info=list(complex = CellChatDB.human$complex, cofactor = CellChatDB.human$cofactor),gene_info_columnNew = gene_info_columnNew) 48 | 49 | # Users can now use this new database in CellChat analysis 50 | cellchat@DB <- db.new 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /man/updateClusterLabels.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/utilities.R 3 | \name{updateClusterLabels} 4 | \alias{updateClusterLabels} 5 | \title{Update and re-order the cell group names after running `computeCommunProb`} 6 | \usage{ 7 | updateClusterLabels( 8 | object, 9 | old.cluster.name = NULL, 10 | new.cluster.name = NULL, 11 | new.order = NULL, 12 | new.cluster.metaname = "new.labels" 13 | ) 14 | } 15 | \arguments{ 16 | \item{object}{CellChat object} 17 | 18 | \item{old.cluster.name}{A vector defining old cell group labels in `object@idents`; Default = NULL, which will use `levels(object@idents)`} 19 | 20 | \item{new.cluster.name}{A vector defining new cell group labels to rename} 21 | 22 | \item{new.order}{reset order of cell group labels} 23 | 24 | \item{new.cluster.metaname}{assign a name of the new labels, which will be the column name of new labels in `object@meta`} 25 | } 26 | \value{ 27 | An updated CellChat object 28 | } 29 | \description{ 30 | Update and re-order the cell group names after running `computeCommunProb` 31 | } 32 | -------------------------------------------------------------------------------- /overview_CellChat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jinworks/CellChat/346fb615aaefa3c1a2830ec2fe3a933c5f723c83/overview_CellChat.png -------------------------------------------------------------------------------- /src/CellChat.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jinworks/CellChat/346fb615aaefa3c1a2830ec2fe3a933c5f723c83/src/CellChat.so -------------------------------------------------------------------------------- /src/CellChat_Rcpp.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Rcpp; 5 | 6 | typedef Eigen::Triplet T; 7 | // Adapted from swne (https://github.com/yanwu2014/swne) 8 | //[[Rcpp::export]] 9 | Eigen::SparseMatrix ComputeSNN(Eigen::MatrixXd nn_ranked, double prune) { 10 | std::vector tripletList; 11 | int k = nn_ranked.cols(); 12 | tripletList.reserve(nn_ranked.rows() * nn_ranked.cols()); 13 | for(int j=0; j SNN(nn_ranked.rows(), nn_ranked.rows()); 19 | SNN.setFromTriplets(tripletList.begin(), tripletList.end()); 20 | SNN = SNN * (SNN.transpose()); 21 | for (int i=0; i < SNN.outerSize(); ++i){ 22 | for (Eigen::SparseMatrix::InnerIterator it(SNN, i); it; ++it){ 23 | it.valueRef() = it.value()/(k + (k - it.value())); 24 | if(it.value() < prune){ 25 | it.valueRef() = 0; 26 | } 27 | } 28 | } 29 | SNN.prune(0.0); // actually remove pruned values 30 | return SNN; 31 | } 32 | -------------------------------------------------------------------------------- /src/CellChat_Rcpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jinworks/CellChat/346fb615aaefa3c1a2830ec2fe3a933c5f723c83/src/CellChat_Rcpp.o -------------------------------------------------------------------------------- /src/RcppExports.cpp: -------------------------------------------------------------------------------- 1 | // Generated by using Rcpp::compileAttributes() -> do not edit by hand 2 | // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 3 | 4 | #include 5 | #include 6 | 7 | using namespace Rcpp; 8 | 9 | #ifdef RCPP_USE_GLOBAL_ROSTREAM 10 | Rcpp::Rostream& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); 11 | Rcpp::Rostream& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get(); 12 | #endif 13 | 14 | // ComputeSNN 15 | Eigen::SparseMatrix ComputeSNN(Eigen::MatrixXd nn_ranked, double prune); 16 | RcppExport SEXP _CellChat_ComputeSNN(SEXP nn_rankedSEXP, SEXP pruneSEXP) { 17 | BEGIN_RCPP 18 | Rcpp::RObject rcpp_result_gen; 19 | Rcpp::RNGScope rcpp_rngScope_gen; 20 | Rcpp::traits::input_parameter< Eigen::MatrixXd >::type nn_ranked(nn_rankedSEXP); 21 | Rcpp::traits::input_parameter< double >::type prune(pruneSEXP); 22 | rcpp_result_gen = Rcpp::wrap(ComputeSNN(nn_ranked, prune)); 23 | return rcpp_result_gen; 24 | END_RCPP 25 | } 26 | 27 | static const R_CallMethodDef CallEntries[] = { 28 | {"_CellChat_ComputeSNN", (DL_FUNC) &_CellChat_ComputeSNN, 2}, 29 | {NULL, NULL, 0} 30 | }; 31 | 32 | RcppExport void R_init_CellChat(DllInfo *dll) { 33 | R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); 34 | R_useDynamicSymbols(dll, FALSE); 35 | } 36 | -------------------------------------------------------------------------------- /src/RcppExports.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jinworks/CellChat/346fb615aaefa3c1a2830ec2fe3a933c5f723c83/src/RcppExports.o --------------------------------------------------------------------------------