{"id":24529046,"url":"https://github.com/saezlab/insilico_tissue_simulator","last_synced_at":"2025-03-15T17:45:07.058Z","repository":{"id":77872750,"uuid":"477753920","full_name":"saezlab/insilico_tissue_simulator","owner":"saezlab","description":"simulator used for the Misty paper","archived":false,"fork":false,"pushed_at":"2022-04-05T10:55:36.000Z","size":8701,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T07:37:41.321Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/saezlab.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-04-04T15:08:51.000Z","updated_at":"2022-04-20T18:46:40.000Z","dependencies_parsed_at":"2023-03-05T13:45:22.424Z","dependency_job_id":null,"html_url":"https://github.com/saezlab/insilico_tissue_simulator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Finsilico_tissue_simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Finsilico_tissue_simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Finsilico_tissue_simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Finsilico_tissue_simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saezlab","download_url":"https://codeload.github.com/saezlab/insilico_tissue_simulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243769947,"owners_count":20345215,"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":[],"created_at":"2025-01-22T07:34:33.645Z","updated_at":"2025-03-15T17:45:07.053Z","avatar_url":"https://github.com/saezlab.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 2d tissue simulator\n\nauthor: Attila Gabor  \ncontact: attila.gabor@uni-heidelberg.de  \ndate: 2022-04-04\n\n\nThis repo contains the code and data used to generate the insilico data for the \npaper:  \nTanevski et al (2022) **Explainable multi-view framework for dissecting inter-cellular signaling from highly multiplexed spatial data**, *Genome Biology*, in print. \n\nNote for visitors from biorxiv: the simulator here is for the published version of the paper. We considerably increased the size of the intracellular signaling networks of the cell types during the review process. \n\n# Dependencies\nNote that this repo is not an R package. Dependencies are scattered in scripts \nand *not* installed automatically, but the basic dependencies are the following\n\n```{r}\nlibrary(tidyverse)   # general data manipulation and plotting\nlibrary(igraph)      # used for generating the intracellular networks of cell types\nlibrary(CellNOptR)   # (from Bioconductor) used for generating the intracellular networks of cell types\nlibrary(R6)          # for the object oriented core\n```\n\n# 1. Basic idea\n\nThe simulator solves a reaction diffusion system on a 2D lattice.\nEach grid point can be occupied by a cell type or left empty. If a node is occupied\nby a cell type, then the cell-type specific rules describes how the species\nare produced, how they interact with each other and how they degrade. On the empty grid points\nthe species are only diffusing and degrading. \n\n# 2. The simulator\n\nAt the heart of the simulator is an IMC object ('./IMC/insilico_data_generation/IMC_model.R'). \nThe IMC object contains a 2D lattice filled with cells (nodes). A node can be empty or \nfilled with a cell type. This object is responsable for initialization, running the simulation,\nplotting the results (time course and 2D density plots) and exporting the states. \n\nThe IMC object is initialized with a segmentation file and a config file.  \nThe IMC object can then solve the reaction-diffusion system\nparameterized in the config file. It can plot the distribution of compounds or\nexport the data at certain time points. \n\n## 2.1 Segmentation file\n\nA segmentation file contains the layout of the cell types in a plain csv file.  \nExample: 'IMC/segmentation/Tissues/Tissue1_grid_preproc.csv'.  It contains cell types and \nempty cells. Note that the user has to configure the reaction kinetics for each\nnode types: all cell types + empty node.\n\n## 2.2 The config file\n\nThe config file describes how the simulator should work.\nAn example can be found at \"/IMC/insilico_data_generation/general_config_v8_correctIC.R\". \nThe config file has to declare the following variables:  \n\n- `diffCoeff`: vector of diffusion coefficients for each modeled species\n- `initState`: list (length = n_node_type) initial state for each species in each node type\n- `degradCoeff`: list (length = n_node_type) of vectors storing the degradation coefficient of each \nspecies\n- `prodCoeff`: list (length = n_node_type) of matrices. Describe how species influence the activation/production of each other. \n\n\n### 2.2.1 So what is the first 242 lines for? \n\nFor the simulator, we had to define cell types with different intracellular signaling pathways,\ndifferent set of receptors and ligand-production profiles. \n\nTo do this, we build a general protein-protein interaction network using a random \ngraph. Then subsets of this graph serve as cell-type specific models. \nFinally, using some heuristics (e.g. the nodes which have no inputs are ligands),\nwe define ligands, receptors and transcription factors, which controls the ligand \nproduction. \n\n\n\n# 4. Main files and scripts: \n\n- `case_studies/insilico_IMC_generator_TIGER_config_v8_single.R` driver script to run the simulator. Runs one layout.\n- `case_studies/insilico_IMC_generator_TIGER_config_v8_batch.R` driver script to run the simulator. Runs all 4 layouts in parallel. \n- `./IMC/insilico_data_generation/IMC_model.R` : the core of the simulator\n- `./IMC/segmentation/Tissues/Tissue1_grid_preproc.csv` example segmentation file, contains\nthe layout of cell types and inter cellular space. \n- `/IMC/insilico_data_generation/general_config_v8_correctIC.R` config file for \nthe definition of the reaction-diffusion system. \n\n\n# 5. How to start\n\n1. clone/download the repo\n2. install the dependencies\n3. run the case study script line by line\n`case_studies/insilico_IMC_generator_TIGER_config_v8_single.R`\n\nlicense: GPL-v3\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaezlab%2Finsilico_tissue_simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaezlab%2Finsilico_tissue_simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaezlab%2Finsilico_tissue_simulator/lists"}