{"id":23288714,"url":"https://github.com/grfrederic/visavis","last_synced_at":"2025-04-06T16:42:40.294Z","repository":{"id":163429537,"uuid":"566318311","full_name":"grfrederic/visavis","owner":"grfrederic","description":"Simulator of viral infection spread and containment in cell monolayer.","archived":false,"fork":false,"pushed_at":"2023-09-26T08:25:08.000Z","size":34,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-12T22:37:50.684Z","etag":null,"topics":["cellular-automaton","infection-simulation","innate-immune-response","interferon","kinetic-monte-carlo","science","systems-biology"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grfrederic.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-11-15T12:27:38.000Z","updated_at":"2024-06-29T20:13:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"5fad23fe-a9fc-45a9-b7d2-ac3179132396","html_url":"https://github.com/grfrederic/visavis","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/grfrederic%2Fvisavis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grfrederic%2Fvisavis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grfrederic%2Fvisavis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grfrederic%2Fvisavis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grfrederic","download_url":"https://codeload.github.com/grfrederic/visavis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247517757,"owners_count":20951711,"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":["cellular-automaton","infection-simulation","innate-immune-response","interferon","kinetic-monte-carlo","science","systems-biology"],"created_at":"2024-12-20T03:34:24.215Z","updated_at":"2025-04-06T16:42:40.274Z","avatar_url":"https://github.com/grfrederic.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image](https://github.com/grfrederic/visavis/assets/26434160/c0ab759c-fd78-4264-9237-1f33828465bd)\n\nOverview\n--------\n\n*VIS-A-VIS* is an agent-based simulator of viral infection spread and viral\ninfection self-containment in a monolayer of cell.\n\nThe simulation mimics the innate immune response to an infection with an RNA\nvirus. The hard-coded and externally parametrized interactions between the host\ncell and virus are specific to the respiratory syncytial virus (RSV) and human\nalveolar epithelial cells (A549 cell line). Infected cells attempt to produce\nand secrete an interferon, which alerts the non-infected bystander cells\nabout the nearby threat.\n\n*VIS-A-VIS* is a hybrid simulator as it executes alternating phases of\ninterferon diffusion and chemical kinetics. The interferon diffuses between\ncompartments above neighboring lattice nodes and its local concentrations are\nexpressed using real variables. The nodes are occupied by cells, in which\nstochastic chemical kinetics (Gillespie algorithm) causes transitions within\na predefined set of states for molecules of several chemical species. Some of\nthese states are associated with higher level or higher activity of these\nmolecules. The lattice has periodic boundary conditions.\n\n*VIS-A-VIS* was used in the paper \"[Antagonism between viral infection and innate immunity at the single-cell level](https://doi.org/10.1371/journal.ppat.1011597)\", *PLOS Pathogens* (2023). See citing section below.\n\n\nCompilation\n-----------\n\nThe simulator has been implemented in [Rust](https://www.rust-lang.org). If your\nRust toolchain has been set up via [rustup](https://rustup.rs), then prior to\ncompilation in the command line you may want to issue:\n\n```bash\n$ rustup update\n```\n\nTo compile the source code, enter the `visavis-1.0.0` folder and type:\n```bash\n$ cargo build --release\n```\n\nThe software has been tested to successfully compile under the current stable\ntoolchain (shipping rustc version 1.64.0). If libglib2.0-dev and libcairo2-dev\nare installed, all dependencies (rust crates) should be retrieved and compiled\non the fly.\n\n\nRunning\n-------\n\nTo run a simulation using default parameters and stimulation protocol,\nyou may invoke the simulator with:\n```bash\n$ cargo run --release parameters/default.json protocols/default.protocol --images\n```\nwhich is equivalent to:\n```bash\n$ target/release/vis-a-vis parameters/default.json protocols/default.protocol --images\n```\n\nAt simulated-time intervals prescribed in the protocol, the simulator produces\nCSV-formatted files with the current state of all molecules in the lattice.\nGenerating PNG images with lattice snapshots (turned on when using the `--images`\nargument) is optional.\n\n\nOutput\n------\n\n**CSV**: Each generated CSV file fully describes the state of the simulated system\nin the time point specified in the file name. Each row of the file corresponds\nto a lattice node that contains a cell, whose molecular internal state is given\nin comma-separated entries corresponding to molecules as given in the file header.\nStates of molecules are discrete (and are in the range `MIN..MAX` defined in\nrespective arrays in `src/cell.rs`). Last two columns give the amount of\nthe extracellular interferon in the cell culture medium above the cell-node\n(in the lower and in the upper subcompartment separately).\n\n**PNG**: Lattice images depict cells as circles inscribed in hexagons. The more\nyellow is the hexagon fill, the higher is the amount of the extracellular\ninterferon in the lower medium subcompartment above the cell. Pinkish outer\ncell ring indicates viral infection; reddish color of the inner circle\ncorresponds to a high level of p-IRF3, whereas greenish inner circle shows\nSTAT1/2 activity.\n\nIf in module lattice (`src/lattice.rs`) the boolean variable\n`Lattice::NEIGHS_TO_FILE` is set to true, then additionally a file `neighbors.csv`\nwith complete information about lattice node neighborhoods is dumped.\n\nAll the output files are generated in the current working directory.\n\n\nTweaking\n--------\n\nChanges in stimulation protocols (provided as text files, see included examples\nin `protocols/`) or in parameter values (provided as JSON-formatted text files,\nsee examples included in `parameters/`) do not require the code to be recompiled.\n\nModifications of the wiring of the molecular virus--host and intra-host\ninteractions require changes in module simulation (`src/simulation.rs`) and\ncode recompilation.\n\nTo change lattice size, you need not only to change `Lattice::WIDTH`,\n`Lattice::HEIGHT` in module lattice (`src/lattice.rs`), but also likely tweak\nthe `THREAD_STACK_SIZE` parameter in module config (`src/config.rs`), and then\nrecompile the code.\n\n\nExtra: Python wrapper\n---------------------\n\nSince running many simulations from terminal can be cumbersome, in `extra/`\nwe provide a simple Python wrapper and associated convenience code for working\nwith *Vis-A-Vis*:\n  * `visavis.py`: the *Vis-A-Vis* client,\n  * `simulation_result.py`: class wrapping the result of a simulation,\n  * `annotate.py`: script for annotating lattice snapshots,\n  * `parameters/default.py`: Python format for parameters.\n\nScript `extra/example.py` demonstrates concisely how the convenience code may\nbe used. The script can be run with:\n```bash\n$ cd extra/\n$ python example.py\n```\n\n\nCiting\n------\n\nThe simulator, written by Marek Kochanczyk and Frederic Grabowski from the\nInstitute of Fundamental Technological Research of the Polish Academy of\nSciences (IPPT PAN, Warsaw, Poland), features the research article\n\"[Antagonism between viral infection and innate immunity at the single-cell level](https://doi.org/10.1371/journal.ppat.1011597)\"\npublished in *PLOS Pathogens* (2023). If you use the code for research purposes,\nplease consider citing this work.\n\n\nLicense\n-------\n\nThe code is open source under the 3-Clause BSD license (see file LICENSE or\nvisit https://opensource.org/licenses/BSD-3-Clause).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrfrederic%2Fvisavis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrfrederic%2Fvisavis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrfrederic%2Fvisavis/lists"}