Skip to content

Commit

Permalink
Release 0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
canergen committed Feb 10, 2025
1 parent dd89bf2 commit 08be3c5
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 84 deletions.
34 changes: 27 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
# Changelog
# Release notes

All notable changes to this project will be documented in this file.
Starting from version 0.5.0, this format is based on [Keep a Changelog], and this project adheres
to [Semantic Versioning]. Full commit history is available in the
[commit logs](https://github.com/Yoseflab/popv/commits/).

The format is based on [Keep a Changelog],
and this project adheres to [Semantic Versioning].
For the original manuscript version 0.4.0 was used. 0.5.0 is a major rewrite of the project to scale
to several million cells on workstations with 128 GB of RAM and enable more GPU-accelerated
functions.

## [Unreleased]
## Version 0.5

### Added
### 0.5.2

- Basic tool, preprocessing and plotting functions
#### Fixed

- Changed Louvain overclustering for Celltypist to Leiden.
- Fixed documentation references.

### 0.5.1

#### Fixed

- Errors in Google Colab.

### 0.5.0

First major release. Production-ready code.

### 0.4.0

Version used for the manuscript.

[keep a changelog]: https://keepachangelog.com/en/1.0.0/
[semantic versioning]: https://semver.org/spec/v2.0.0.html
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ our tutorials demonstrate how to generate the Natural
Language Model used in OnClass for this user-defined ontology.

```bash
conda create -n yourenv python=3.12
conda create -n yourenv python=3.11
conda activate yourenv
pip install popv
```
Expand All @@ -110,4 +110,4 @@ Using a cell ontology is a requirement to run OnClass as a prediction algorithm.
Setting ontology
to false, will disable this step and allows running popV without using a cell ontology.

[documentation]: https://popv-docs.readthedocs.io/en/latest/
[documentation]: https://popv.readthedocs.io/en/latest/
5 changes: 2 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[![Coverage](https://codecov.io/gh/YosefLab/popv/branch/main/graph/badge.svg?token=KuSsL5q3l7)](https://codecov.io/gh/YosefLab/popv)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![Downloads](https://pepy.tech/badge/popv)](https://pepy.tech/project/popv)
[![Docs](https://readthedocs.org/projects/popv/badge/?version=latest)](https://popv-docs.readthedocs.io/en/latest/)

PopV uses popular vote of a variety of cell-type transfer tools to classify
cell-types in a query dataset based on a test dataset. Using this variety of
Expand Down Expand Up @@ -97,7 +96,7 @@ package. OnClass files for annotation based on Tabula sapiens are deposited in
`popv/resources/ontology`. We use [Cell Ontology](https://obofoundry.org/ontology/cl.html)
as an ontology throughout our experiments. PopV will automatically look for the
ontology in this folder. If you want to provide your user-edited ontology,
[our tutorial](tutorials.notebooks.add_celltypes_ontology.ipynb) demonstrates how to generate the Natural
the [custom celltype tutorial](tutorials/notebooks/add_celltypes_ontology) demonstrates how to generate the Natural
Language Model used in OnClass for this user-defined ontology.

```bash
Expand All @@ -110,7 +109,7 @@ pip install popv

We provide an example notebook in Google Colab:

- [Tutorial demonstrating use of Tabula sapiens as a reference](tutorials.notebooks.tabula_sapiens_tutorial.ipynb)
- [Tutorial demonstrating use of Tabula sapiens as a reference](tutorials/notebooks/tabula_sapiens_tutorial)

This notebook will guide you through annotating a dataset based on the annotated
[Tabula sapiens reference](https://tabula-sapiens-portal.ds.czbiohub.org) and
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@
html_theme_options = {
"repository_url": repository_url,
"use_repository_button": True,
"logo_only": True,
"show_toc_level": 1,
"launch_buttons": {"colab_url": "https://colab.research.google.com"},
"path_to_docs": "docs/",
Expand Down
31 changes: 0 additions & 31 deletions docs/reference/popv.algorithms.knn_on_scvi.rst

This file was deleted.

31 changes: 0 additions & 31 deletions docs/reference/popv.algorithms.scanvi.rst

This file was deleted.

4 changes: 2 additions & 2 deletions popv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

if sys.version_info[:2] != (3, 10):
warnings.warn(
"Pretrained models on huggingface are trained with Python 3.10. "
"Detected Python {sys.version.split()[0]} will not load these models.",
"Pretrained models on huggingface are trained with Python 3.11. "
f"Detected Python {sys.version.split()[0]} will not load these models.",
UserWarning,
stacklevel=3,
)
Expand Down
3 changes: 1 addition & 2 deletions popv/algorithms/_celltypist.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,9 @@ def predict(self, adata):
].cat.categories[mode(neighbor_values, axis=1).mode.flatten()]
over_clustering = adata.obs.loc[adata.obs["_predict_cells"] == "relabel", "over_clustering"]
else:
flavor = "rapids" if settings.cuml else "vtraag"
transformer = "rapids" if settings.cuml else None
sc.pp.neighbors(adata, n_neighbors=15, use_rep="X_pca", transformer=transformer)
sc.tl.louvain(adata, resolution=25.0, key_added="over_clustering", flavor=flavor)
sc.tl.leiden(adata, resolution=25.0, key_added="over_clustering")
over_clustering = adata.obs.loc[adata.obs["_predict_cells"] == "relabel", "over_clustering"]

if adata.uns["_prediction_mode"] == "retrain":
Expand Down
11 changes: 8 additions & 3 deletions popv/hub/_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,18 @@ class HubModelCardHelper:
metrics_report
A dictionary containing the metrics report for the model.
Attributes
----------
model_card : ModelCard
Stores the model card.
Notes
-----
It is not required to use this class to create a `ModelCard`. But this helps you do so in a way
that is consistent with most other `popV` hub models. You can think of this as a
template. The actual template string used can be found in ``popv.hub.template``. The resulting
that is consistent with other `popV` hub models. You can think of this as a
template. The resulting
huggingface :class:`~huggingface_hub.ModelCard` can be accessed via the
:meth:`~popv.hub.HubModelCardHelper.model_card` property.
:attr:`~popv.hub.HubModelCardHelper.model_card` property.
"""

license_info: str
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exclude = ["resources/*", "tests/*", "dataset/*"]

[project]
name = "popV"
version = "0.5.1post1"
version = "0.5.2"
description = "Consensus prediction of cell type labels with popV"
readme = "README.md"
requires-python = ">=3.10"
Expand Down Expand Up @@ -51,7 +51,7 @@ dependencies = [
"harmony-pytorch",
"huggingface",
"xgboost",
"louvain",
"leidenalg",
"cellxgene_census",
]

Expand Down

0 comments on commit 08be3c5

Please sign in to comment.