{"id":13684078,"url":"https://github.com/ZJUFanLab/SpaTalk","last_synced_at":"2025-04-30T20:33:04.605Z","repository":{"id":39627743,"uuid":"475404074","full_name":"ZJUFanLab/SpaTalk","owner":"ZJUFanLab","description":"Knowledge-graph-based cell-cell communication inference for spatially resolved transcriptomic data","archived":false,"fork":false,"pushed_at":"2025-01-17T07:56:46.000Z","size":10311,"stargazers_count":69,"open_issues_count":6,"forks_count":18,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-25T21:16:53.403Z","etag":null,"topics":["cell-cell-communication","cell-cell-interaction","graph-network","knowledge-graph","ligand-receptor-interaction","single-cell","spatial-data-analysis","spatial-transcriptomics","spatially-resolved-transcriptomics"],"latest_commit_sha":null,"homepage":"https://github.com/multitalk/awesome-cell-cell-communication","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZJUFanLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-29T11:07:05.000Z","updated_at":"2025-04-16T03:21:09.000Z","dependencies_parsed_at":"2024-01-14T14:30:59.994Z","dependency_job_id":"cce1b8e0-a80b-4632-b67f-39d929b8eeb1","html_url":"https://github.com/ZJUFanLab/SpaTalk","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJUFanLab%2FSpaTalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJUFanLab%2FSpaTalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJUFanLab%2FSpaTalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJUFanLab%2FSpaTalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZJUFanLab","download_url":"https://codeload.github.com/ZJUFanLab/SpaTalk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251777702,"owners_count":21642212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cell-cell-communication","cell-cell-interaction","graph-network","knowledge-graph","ligand-receptor-interaction","single-cell","spatial-data-analysis","spatial-transcriptomics","spatially-resolved-transcriptomics"],"created_at":"2024-08-02T14:00:24.868Z","updated_at":"2025-04-30T20:33:04.598Z","avatar_url":"https://github.com/ZJUFanLab.png","language":"R","funding_links":[],"categories":["Uncategorized","Software packages"],"sub_categories":["Uncategorized","Spatial transcriptomics"],"readme":"# SpaTalk\n[![R \u003e4.0](https://img.shields.io/badge/R-%3E%3D4.0-brightgreen)](https://www.r-project.org/) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6809147.svg)](https://doi.org/10.5281/zenodo.6809147) [![jupyter](https://img.shields.io/badge/Jupyter--notebook-SpaTalk--tutorial-yellow?logo=jupyter)](https://github.com/multitalk/awesome-cell-cell-communication/blob/main/method/SpaTalk.ipynb) [![DOI](https://img.shields.io/badge/DOI-10.1038%2Fs41467--022--32111--8-yellowgreen)](https://www.nature.com/articles/s41467-022-32111-8)\n\n### A cell-cell communication inference approach for spatially resolved transcriptomic data\n\n\u003cimg src='https://github.com/ZJUFanLab/SpaTalk/blob/main/img/SpaTalk.png'\u003e\n\n[Spatially resolved transcriptomics (ST)](https://pubmed.ncbi.nlm.nih.gov/32505359/) provides the informative details of genes and retained the crucial spatial information, which have enabled the uncovering of spatial architecture in intact organs, shedding light on the spatially resolved [cell-cell communications](https://pubmed.ncbi.nlm.nih.gov/32435978/) mediating tissue homeostasis, development and disease. However, inference of cell-cell communications for ST data remains a great challenge. Here, we present SpaTalk, a spatially resolved cell-cell communication inference method relying on the [graph network](https://pubmed.ncbi.nlm.nih.gov/34500471/) and [knowledge graph](https://www.sciencedirect.com/science/article/pii/S1570826820300585) to model ligand-receptor-target signaling network between the spatially proximal cells, which were decomposed from the ST data through the non-negative linear model and spatial mapping between single-cell RNA-seq and ST data. SpaTalk is a reliable method that can help scientists uncover the spatially resolved cell-cell communications for either single-cell or spot-based ST data universally, providing new insights into the understanding of spatial cellular dynamics in tissues.\n\n# Install\n\n- install dependent packages `devtools` and [`NNLM`](https://github.com/linxihui/NNLM)\n\n```\n\u003e install.packages(pkgs = 'devtools')\n\u003e devtools::install_github('linxihui/NNLM')\n```\n\n- then install SpaTalk\n\n```\n\u003e devtools::install_github('ZJUFanLab/SpaTalk')\n\n# or download the repository as ZIP\n\u003e devtools::install_local(\"/path/to/SpaTalk-main.zip\")\n```\n\n# Usage\nSpaTalk method consists of two components, wherein the first is to dissect the cell-type composition of ST data and the second is to infer the spatially resolved cell-cell communications over the decomposed single-cell ST data. Classification and description of SpaTalk functions are shown in the __[wiki page](https://github.com/ZJUFanLab/SpaTalk/wiki)__ and __[tutorial](https://raw.githack.com/multitalk/awesome-cell-cell-communication/main/method/tutorial.html)__\n\n- ### Cell-type decomposition to reconstruct single-cell ST atlas with known cell types\n```\n# st_data: A matrix containing counts of st data\n# st_meta: A data.frame containing x and y\n# sc_data: A matrix containing counts of scRNA-seq data as the reference\n# sc_celltype:  A character containing the cell types for scRNA-seq data\n\n\u003e obj \u003c- createSpaTalk(st_data, st_meta, species)\n\u003e \n\u003e obj\nAn object of class SpaTalk \n996 genes across 509 spots (0 lrpair)\n\u003e \n\u003e obj \u003c- dec_celltype(obj, sc_data, sc_celltype)\n```\n\n- ### Inference of cell-cell communication and ligand-receptor-target network in space\n```\n# obj: SpaTalk object containg ST and scRNA-seq data\n# lrpairs: A data.frame of the system data containing ligand-receptor pairs\n# pathways: A data.frame of the system data containing gene-gene interactions and pathways\n# celltype_sender\n# celltype_receiver\n\n\u003e obj \u003c- find_lr_path(object = obj, lrpairs = lrpairs, pathways = pathways)\n\n\u003e obj \u003c- dec_cci(obj, celltype_sender, celltype_receiver)\n```\n\nOR\n\n```\n\u003e obj \u003c- dec_cci_all(object)\n\n# score in obj@lrpair is the combined score\n\u003e str(obj@lrpair)\n'data.frame':\t9 obs. of  9 variables:\n $ ligand            : chr  \"Inhba\" \"Inhba\" \"Sst\" \"Apoe\" ...\n $ receptor          : chr  \"Acvr1c\" \"Acvr1c\" \"Sstr2\" \"Sdc4\" ...\n $ species           : chr  \"Mouse\" \"Mouse\" \"Mouse\" \"Mouse\" ...\n $ celltype_sender   : chr  \"eL6\" \"Astro\" \"SST\" \"Smc\" ...\n $ celltype_receiver : chr  \"PVALB\" \"eL2_3\" \"PVALB\" \"Astro\" ...\n $ lr_co_exp_num     : num  8 8 2 31 21 5 16 4 5\n $ lr_co_ratio       : num  0.216 0.092 0.286 0.912 0.618 ...\n $ lr_co_ratio_pvalue: num  0.001 0.042 0.009 0 0 0.028 0 0.001 0.001\n $ score             : num  0.855 0.837 0.707 0.709 0.709 ...\n\n# score in obj@tf is the intra-cellular score\n\u003e str(obj@tf)\n'data.frame':\t8 obs. of  7 variables:\n $ celltype_sender  : chr  \"eL6\" \"Astro\" \"SST\" \"Smc\" ...\n $ celltype_receiver: chr  \"PVALB\" \"eL2_3\" \"PVALB\" \"Astro\" ...\n $ receptor         : chr  \"Acvr1c\" \"Acvr1c\" \"Sstr2\" \"Sdc4\" ...\n $ tf               : chr  \"Smad3\" \"Smad3\" \"Smad3\" \"Smad3\" ...\n $ n_hop            : num  1 1 3 3 1 3 1 1\n $ n_target         : num  1 1 1 1 2 1 2 2\n $ score            : num  1 1 0.0565 0.0405 1 0.0871 1 1\n```\n\n# Note\n[![CellTalkDB v1.0](https://img.shields.io/badge/CellTalkDB-v1.0-blueviolet)](http://tcm.zju.edu.cn/celltalkdb/) [![KEGG pathway](https://img.shields.io/badge/KEGG-pathway-ff69b4)](https://www.kegg.jp/kegg/pathway.html) [![Reactome pathway](https://img.shields.io/badge/Reactome-pathway-brightgreen)](https://reactome.org/) [![AnimalTFDB v3.0](https://img.shields.io/badge/AnimalTFDB-v3.0-yellowgreen)](http://bioinfo.life.hust.edu.cn/AnimalTFDB/#!/)\n\nSpaTalk uses the ligand-receptor interactions (LRIs) from [`CellTalkDB`](http://tcm.zju.edu.cn/celltalkdb/), pathways from [`KEGG`](https://www.kegg.jp/kegg/pathway.html) and [`Reactome`](https://reactome.org/), and transcrptional factors (TFs) from [`AnimalTFDB`](http://bioinfo.life.hust.edu.cn/AnimalTFDB/#!/) by default. In the current version:\n\n- __SpaTalk can be applied to either [single-cell (vignette)](https://raw.githack.com/multitalk/awesome-cell-cell-communication/main/method/sc_tutorial.html) or [spot-based (vignette)](https://raw.githack.com/multitalk/awesome-cell-cell-communication/main/method/spot_tutorial.html) ST data__\n- __SpaTalk allows to use custom [LRIs(wiki)](https://github.com/ZJUFanLab/SpaTalk/wiki/Use-customed-lrpairs), [pathways, and TFs database (wiki)](https://github.com/ZJUFanLab/SpaTalk/wiki/Use-customed-pathways)__\n- __SpaTalk allows to use the parallel processing for `dec_celltype()`, `dec_cci()`, and `dec_cci_all()`__\n- __SpaTalk allows to [use other deconvolution methods](https://github.com/ZJUFanLab/SpaTalk/wiki/Use-other-deconvolution-methods) followed by the inference of cell-cell communications__\n  - RCTD, Seurat, SPOTlight, deconvSeq, stereoscope, cell2location, or other methods\n- __SpaTalk allows to [directly infer cell-cell communications skiping deconvolution](https://github.com/ZJUFanLab/SpaTalk/wiki/Directly-infer-cell-cell-communication-skiping-deconvolution)__\n- __SpaTalk can visualize [cell-type compositions (wiki)](https://github.com/ZJUFanLab/SpaTalk/wiki#visulization-cell-types) and [cell-cell communications (wiki)](https://github.com/ZJUFanLab/SpaTalk/wiki#visulization-cell-cell-communications)__\n- LRIs and pathways can be download at[`data/`](https://github.com/ZJUFanLab/SpaTalk/tree/main/data) \n- Demo data can be download at[`inst/extdata/`](https://github.com/ZJUFanLab/SpaTalk/tree/main/inst/extdata)\n\n__Please refer to the [tutorial vignette](https://raw.githack.com/multitalk/awesome-cell-cell-communication/main/method/tutorial.html) with demo data processing steps. Detailed functions see the [document](https://raw.githack.com/ZJUFanLab/SpaTalk/main/vignettes/SpaTalk.pdf)__\n\n### News\n- Compatible with Seurat 5. [see issue 40](https://github.com/ZJUFanLab/SpaTalk/issues/40)\n- Fix the bug in `dec_celltype()` when using other deconvolution methods, [see issue 11](https://github.com/ZJUFanLab/SpaTalk/issues/11)\n- Fix the bug in `dec_celltype()` when using `dec_result`, [see issue 30](https://github.com/ZJUFanLab/SpaTalk/issues/30)\n- Fix the bug in `dec_cci()` and `dec_cci_all()`, [see issue 10](https://github.com/ZJUFanLab/SpaTalk/issues/10)\n- Fix the bug in performing parallel functions, e.g., `invalid character indexing` see [issue 30](https://github.com/ZJUFanLab/SpaTalk/issues/30) and [issue 10](https://github.com/ZJUFanLab/SpaTalk/issues/10)\n- __Allow to retain genes consistent with reference `sc_data` for reconstructed single-cell ST data [(wiki)](https://github.com/ZJUFanLab/SpaTalk/wiki/Retain-all-genes-in-the-reference)__\n\n# About\nSpaTalk was developed by Xin Shao. Should you have any questions, please contact Xin Shao at xin_shao@zju.edu.cn\n\nPlease cite us as \"Shao, X., et al. Knowledge-graph-based cell-cell communication inference for spatially resolved transcriptomic data with SpaTalk. Nat Commun 13, 4429 (2022). https://doi.org/10.1038/s41467-022-32111-8\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZJUFanLab%2FSpaTalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZJUFanLab%2FSpaTalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZJUFanLab%2FSpaTalk/lists"}