{"id":23051,"library":"celltypist","title":"CellTypist","description":"A Python tool for semi-automatic cell type classification from single-cell RNA-seq data. It uses logistic regression models trained on diverse cell atlases. Current version is 1.7.1, with regular updates on GitHub.","status":"active","version":"1.7.1","language":"python","source_language":"en","source_url":"https://github.com/Teichlab/celltypist","tags":["single-cell","cell-type","classification","scRNA-seq","logistic-regression"],"install":[{"cmd":"pip install celltypist","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Used for model computations","package":"scipy","optional":false},{"reason":"Array operations","package":"numpy","optional":false},{"reason":"Data handling","package":"pandas","optional":false},{"reason":"Logistic regression and utilities","package":"scikit-learn","optional":false},{"reason":"Heatmap and plotting","package":"matplotlib","optional":true}],"imports":[{"note":"Proper class instantiation requires importing the class.","wrong":"import celltypist","symbol":"CellTypist","correct":"from celltypist import CellTypist"}],"quickstart":{"code":"from celltypist import CellTypist\nfrom celltypist import models\n# Download model if not present (first time)\nmodel = models.Model.load(model='Immune_All_Low.pkl')\n# Predict cell types\ntranscriptome_data = 'path/to/your/data.h5ad'  # replace with your file\npredictions = CellTypist().predict(transcriptome_data, model=model)\nprint(predictions.cell_type.value_counts())","lang":"python","description":"Load a pre-trained model and predict cell types from an AnnData file. Replace the file path with your own data."},"warnings":[{"fix":"Set environment variable CELLTYPIST_CACHE_DIR to a writable path.","message":"CellTypist models are downloaded to a cache directory (~/.celltypist/) on first use. Ensure you have write permissions.","severity":"gotcha","affected_versions":"all"},{"fix":"Update to newer version and use `models.Model.load(model='model_name')` without explicit version. Check model naming.","message":"In version 1.6.0, the internal model loading API changed. Old code using `models.Model.load` with version string may break.","severity":"breaking","affected_versions":"<1.6.0"},{"fix":"Always supply a `model` argument explicitly.","message":"Using `CellTypist().predict()` without specifying model name may fall back to a default. This behavior is deprecated.","severity":"deprecated","affected_versions":">=1.5.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install celltypist`.","cause":"Package not installed.","error":"ModuleNotFoundError: No module named 'celltypist'"},{"fix":"Check list of available models with `celltypist.models.models_description()` and use exact name.","cause":"Model name typo or not downloaded.","error":"ValueError: Unknown model 'Immune_All_Low.pkl'. Available models: ..."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}