{"id":28436049,"url":"https://github.com/immunogenomics/lisi","last_synced_at":"2025-07-12T01:33:54.897Z","repository":{"id":48165663,"uuid":"159051396","full_name":"immunogenomics/LISI","owner":"immunogenomics","description":"Methods to compute Local Inverse Simpson's Index (LISI)","archived":false,"fork":false,"pushed_at":"2021-09-02T13:57:46.000Z","size":52,"stargazers_count":62,"open_issues_count":2,"forks_count":5,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-06-27T18:43:33.598Z","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/immunogenomics.png","metadata":{"files":{"readme":"README.Rmd","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}},"created_at":"2018-11-25T16:26:08.000Z","updated_at":"2025-06-08T11:22:50.000Z","dependencies_parsed_at":"2022-08-28T06:22:12.363Z","dependency_job_id":null,"html_url":"https://github.com/immunogenomics/LISI","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/immunogenomics/LISI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immunogenomics%2FLISI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immunogenomics%2FLISI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immunogenomics%2FLISI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immunogenomics%2FLISI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/immunogenomics","download_url":"https://codeload.github.com/immunogenomics/LISI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immunogenomics%2FLISI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264923193,"owners_count":23683717,"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-06-05T21:10:01.129Z","updated_at":"2025-07-12T01:33:54.872Z","avatar_url":"https://github.com/immunogenomics.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: \"LISI\"\noutput: github_document\n---\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\"\n)\n```\n\n[![R-CMD-check](https://github.com/immunogenomics/LISI/workflows/R-CMD-check/badge.svg)](https://github.com/immunogenomics/LISI/actions)\n\nTo assess whether clusters of cells in a single-cell RNA-seq dataset are\nwell-mixed across some categorical variable (e.g. batch, technology, donor), we\nprovide an algorithm for computing a Local Inverse Simpson's Index (LISI).\n\n## Citation\n\nLearn more about how we use LISI to measure single cell integration methods in\nthe Harmony paper:\n\n- Korsunsky, I. et al. [Fast, sensitive and accurate integration of single-cell\n  data with Harmony.][Korsunsky] Nat. Methods (2019)\n\n[Korsunsky]: https://www.nature.com/articles/s41592-019-0619-0\n\nOr see the freely available pre-print at [bioRxiv].\n\n[bioRxiv]: https://www.biorxiv.org/content/early/2018/11/04/461954\n\n\n## Installation \n\nInstall the lisi R package with devtools: \n\n```{r, eval = FALSE}\ninstall.packages(\"devtools\")\ndevtools::install_github(\"immunogenomics/lisi\")\n```\n\n\n## Example\n\nWe can compute the LISI for each cell with these inputs:\n\n- a matrix of cells (rows) and coordinates (PC scores, tSNE or UMAP dimensions, etc.)\n\n- a data frame with categorical variables (one row for each cell)\n\nHere is a small example that uuses the data provided with the lisi R package.\n\n```{r}\nlibrary(lisi)\n\nhead(X)\n\nhead(meta_data)\n\ntable(meta_data$label1)\n\ntable(meta_data$label2)\n\nres \u003c- compute_lisi(X, meta_data, c('label1', 'label2'))\nhead(res)\n```\n\nEach row in the output data frame corresponds to a cell from `X`. The score\n(e.g. 1.92) indicates the effective number of different categories represented\nin the local neighborhood of each cell. If the cells are well-mixed, then we\nmight expect the LISI score to be near 2 for a categorical variable with 2\ncategories.\n\nLearn more by running `?compute_lisi` in R. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmunogenomics%2Flisi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimmunogenomics%2Flisi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmunogenomics%2Flisi/lists"}