{"id":50642045,"url":"https://github.com/krishnanlab/icepop","last_synced_at":"2026-06-07T09:03:41.480Z","repository":{"id":348540308,"uuid":"1143629520","full_name":"krishnanlab/icepop","owner":"krishnanlab","description":"public repo for icepop","archived":false,"fork":false,"pushed_at":"2026-05-12T21:32:17.000Z","size":17190,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-12T23:29:03.895Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/krishnanlab.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-27T20:15:44.000Z","updated_at":"2026-05-12T21:32:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/krishnanlab/icepop","commit_stats":null,"previous_names":["krishnanlab/icepop_public","krishnanlab/icepop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/krishnanlab/icepop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnanlab%2Ficepop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnanlab%2Ficepop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnanlab%2Ficepop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnanlab%2Ficepop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krishnanlab","download_url":"https://codeload.github.com/krishnanlab/icepop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnanlab%2Ficepop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34014821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-06-07T09:03:39.807Z","updated_at":"2026-06-07T09:03:41.468Z","avatar_url":"https://github.com/krishnanlab.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/icon.jpg\" width=\"800\"\u003e\n\u003c/p\u003e\n\n# ICePop: Informative Cell Population\nThis repository contains source code for ICePop ([link](https://doi.org/10.64898/2026.04.01.715877)). \n\nThe data used in this study are available on [Zenodo](https://doi.org/10.5281/zenodo.20146708)\n\nThe code used to reproduce the analyses in the paper is available at: https://github.com/krishnanlab/icepop_analysis\n\n## Dependencies\n`python\u003e=3.11,\u003c3.12`\n\n## Installation\nICePop requires `torch==2.1.1`. To enable GPU acceleration, which substantially speeds up metacell reconstruction, we recommend installing PyTorch following the official instructions on the [PyTorch website](https://pytorch.org/) to ensure compatibility with your system. Specifically, we used [`torch-2.1.1+cu121`](https://download.pytorch.org/whl/cu121/torch-2.1.1%2Bcu121-cp311-cp311-linux_x86_64.whl#sha256=83bfe1134dfa8ab86553c15da5dffa190a86d822afafe8ea6de1169c10d971aa) in the paper.\n\nAfter installing torch, then install ICePop via pip: `pip install git+https://github.com/krishnanlab/icepop`\n\n## Run ICePop\nBefore running the analysis, we recommend downloading the processed data from [Zenodo](https://doi.org/10.5281/zenodo.20146708).\n\nExpand and place the downloaded files under `../data`, then run the following commands.\n\nA more detailed tutorial is available at [`notebook/ICePop_tutorial.ipynb`](https://github.com/krishnanlab/icepop/blob/main/notebook/ICePop_tutorial.ipynb)\n\n### Step 1: Extract metacells\n```\nicepop metacell \\\n    --h5ad ../data/TM_FACS/TM_FACS_cnt.h5ad \\\n    --outdir ../results/TM_FACS_mc \\\n    --save_name TM_FACS\n```\n\n#### Input options\n\n1. `--h5ad` (str) Path to input AnnData (.h5ad) file containing single-cell expression ***count*** data\n2. `--outdir` (str) Output directory where MetaQ results will be written\n3. `--save_name` (str; default='metaq_res') prefix of metaq output under `./save/*`, do not write a path\n4. `--ncell_per_mc` (int; default=75) Target number of cells per metacell. The total number of metacells is \\n determined as approximately `n_cells / ncell_per_mc`\n5. `--ct_key` (str; default='cell_type') Column name in `adata.obs` specifying cell-type annotations. Used to evaluate metacell purity\n6. `--device` (str; default='cuda') Compute device to use. Options include 'cuda' or 'cpu'\n7. `--batch_size` (int; default=512) Batch size to run metaq\n\nthis step need gpu for faster speed\n\n#### Outputs\n1. metacell assignment: `outdir/mc_assign.csv`\n2. metacell statistics: `outdir/mc_stats.csv`\n\n### Step 2: Get association, mixture and influence diagnoistics\n```\nicepop association \\\n    --h5ad ../data/TM_FACS/TM_FACS_cnt.h5ad \\\n    --mc_assign ../results/TM_FACS/mc_assign.csv \\\n    --magmaz ../data/magmaz/asd.genes.out \\\n    --sp mmusculus \\\n    --outdir ../results/TM_FACS_association\n```\n\n#### Input options\n\n1. `--h5ad` (str) Input AnnData file containing single-cell expression ***count*** data\n2. `--mc_assign` (str) CSV file mapping cells to metacell assignments (output from step 1: `outdir/mc_assign.csv`)\n3. `--magmaz` (str) [magmaz](https://doi.org/10.1371/journal.pcbi.1004219) MAGMA gene-level association file (*.genes.out) of a trait of interest\n4. `--spec_score` (str; default=None) Precomputed specificity scores; will be calculated if not provided\n5. `--outdir` (str) Output directory for association results\n6. `--n_jobs` (int; default=20) Number of parallel workers\n7. `--sp` (str; default='mmusculus') Species identifier for gene ID conversion\n8. `--ct_key` (str; default='cell_type') Column in `adata.obs` defining cell types\n9. `--trait_name` (str; optional) Trait name used for output file naming\n10. `--n_perm` (int; default=1000) Number of permutations for null distribution estimation\n11. `--q_thres` (float; default=0.1) FDR threshold for significance\n12. `--min_purity` (float; default=0.2) Minimum metacell purity required for inclusion in cell type aggregation\n13. `--min_mc_size` (int; default=20) Minimum metacell size required for inclusion in cell type aggregation\n14. `--output_dfbs` (boolean; default=True) If output influential testing results\n\n#### Outputs\n\n1. `outdir/celltype__trait-*.csv`: Disease-cell type association table\n2. `outdir/dfbs__trait-*.npz`: Gene-level influence scores (DFBETAS) for each disease–cell type association\n3. `outdir/metacell__trait-*.csv`: Disease-metacell type association table\n4. `outdir/mc_spec_score.npz`: Metacell expression specificity (if nothing specified for `--spec_score`, this will be the path to generated expression specificity)\n5. `outdir/mcfdr__trait-*.csv`: Cell type × metacell matrix indicating significant disease-associated metacells within each cell type\n\nwhere `*` is trait name we assume magmaz file name is `*.genes.out`\n\n### Step3: Enrichment analysis and interactive output\n```\n# run all gene sets\nicepop interactive \\\n  --outdir ../results/TM_FACS \\\n  --mcdir ../results/TM_FACS \\\n  --geneset_collections All \\\n  --adata_path ../data/TM_FACS/TM_FACS_cnt.h5ad\n\nor\n\n# run specific gene sets\nicepop interactive \\\n  --outdir ../results/TM_FACS \\\n  --mcdir ../results/TM_FACS \\\n  --geneset_collections BIOCARTA \\\n  --adata_path ../data/TM_FACS/TM_FACS_cnt.h5ad\n\nor \n\n# custom gene sets\nicepop interactive \\\n  --outdir ../results/TM_FACS \\\n  --mcdir ../results/TM_FACS \\\n  --geneset_collections none \\\n  --geneset_path custom.gmt \\\n  --adata_path ../data/TM_FACS/TM_FACS_cnt.h5ad\n```\n\n#### Input options\n1. `--outdir` (str) Output directory for association results. Enrichment results and reports will also be saved here.\n2. `--mcdir` (str)  Directory for metacell assignments (This dir can be the same as `--outdir`)\n3. `--geneset_collections` (str) All, 'BIOCARTA', 'KEGG', 'REACTOME', 'WIKIPATHWAYS', 'MIR', 'TF', 'GOBP', 'GOCC', 'GOMF', 'HP'\n4. `--geneset_path` (str) path to custom gmt file if `--geneset_collections` is set to `none`\n5. `--adata_path` (str) path to AnnData file containing single-cell expression ***count*** data\n\n#### Outputs\n1. `outdir/icepop-report.ipynb`: Interactive Jupyter notebook containing all results\n2. `outdir/icepop-report.html`: Rendered HTML version of the notebook for easy viewing\n3. `outdir/enrichment`: Directory containing gene set enrichment analysis results\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishnanlab%2Ficepop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrishnanlab%2Ficepop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishnanlab%2Ficepop/lists"}