From 9b095ec90083e94c2b96d80c71417096f6463f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christophe=20B=C3=A9cavin?= Date: Fri, 29 Nov 2024 11:27:57 +0100 Subject: [PATCH] =?UTF-8?q?release:=20version=200.1.20=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 3 +- .readthedocs.yaml | 29 ++++++++++++++++ HISTORY.md | 1 + README.md | 1 - docs/contributing.md | 2 +- docs/examples.md | 10 ------ docs/index.md | 62 ++++++++++++++++++++--------------- mkdocs.yml | 1 - pyproject.toml | 2 +- scmusketeers/tools/VERSION | 2 +- 10 files changed, 70 insertions(+), 43 deletions(-) create mode 100644 .readthedocs.yaml delete mode 100644 docs/examples.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58e9a8e4..439bd143 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,8 @@ name: Release Python Package permissions: id-token: write - + contents: write + on: push: # Sequence of patterns matched against refs/tags diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..434b828f --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,29 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + apt_packages: + - r-base + tools: + python: "3.12" + jobs: + post_create_environment: + # Install poetry + # https://python-poetry.org/docs/#installing-manually + - pip install poetry + # Tell poetry to not use a virtual environment + - poetry config virtualenvs.create false + post_install: + # Install dependencies with 'docs' dependency group + # https://python-poetry.org/docs/managing-dependencies/#dependency-groups + - pip install mkdocstrings-python + +mkdocs: + configuration: mkdocs.yml + diff --git a/HISTORY.md b/HISTORY.md index e2d70bab..db016d37 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,6 +4,7 @@ Changelog (unreleased) ------------ +- Release: version 0.1.13 🚀 [Christophe Bécavin] - Release: version 0.1.12 🚀 [Christophe Bécavin] - Release: version 0.1.12 🚀 [Christophe Bécavin] - Format code. [Christophe Bécavin] diff --git a/README.md b/README.md index 9f8bc336..a68dddc1 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,6 @@ $ sc-musketeers transfer my_atlas --class_key celltype --batch_key donor --unlab $ sc-musketeers transfer ref_dataset --query_path query_dataset --class_key=celltype --batch_key donor --unlabeled_category=Unknown ``` -TO DO : Add example atlas in the github or Zenodo Read the [CONTRIBUTING.md](docs/contributing.md) file. diff --git a/docs/contributing.md b/docs/contributing.md index abaedee1..a78a41f7 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -1,6 +1,6 @@ # How to develop on this project -CheckAtlas welcomes contributions from the community. +scMusketeers welcomes contributions from the community. **You need PYTHON3!** diff --git a/docs/examples.md b/docs/examples.md deleted file mode 100644 index f1b71dfa..00000000 --- a/docs/examples.md +++ /dev/null @@ -1,10 +0,0 @@ -Examples - -## Example 1 - - -## Example 2 - - -## Example 3 - diff --git a/docs/index.md b/docs/index.md index 7a457fac..a6b8cc50 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,52 +1,60 @@ -# sc_permut - Deep Learning single-cell - -Deep learning annotation of cell-types with permutation inforced autoencoder +# scMusketeers : A tri-partite modular autoencoder for addressing imbalanced cell type annotation and batch effect reduction ## Summary -### Model structure +We developed scMusketeer, a modular deep learning model producing an optimal dimension-reduced representation with a focus on imbalanced cell type annotation and batch effect reduction. The architecture of scMusketeers is made of three modules. The first module is an autoencoder which provides a reduced latent representation, while removing noise, thus resulting in a better data reconstruction. The second module, is a classifier with a focal loss providing higher prediction for smaller populations of cell types. The third module is an adversarial domain adaptation (DANN) module that corrects batch effect. +scMusketeers performance was optimized after conducting a precise ablation study to assess model's hyperparameters. The model was compared to reference tools for single-cell integration and annotation. It was at least on par with state-of-the-art models, often outperforming most of them. It showed increased performance on the identification of rare cell types. Despite the rather simple structure of its deep learning model, it demonstrated equivalent performance to UCE foundation model. Finally, scMusketeers was able to transfer the cell label from single-cell RNA-Seq to spatial transcriptomics. -## Examples +Our tripartite modular autoencoder demonstrates versatile capabilities while addressing key challenges in single-cell atlas reconstruction. We noticed in particular that the generic modular framework of scMusketeers should be easily generalized to other large-scale biology projects that require deep learning models. -## Installation -CheckAtlas can be downloaded from PyPI. However, the project is in an early development phase. We strongly recommend to use the developmental version. +## Tutorial -### Install checkatlas development version +[Access to the tutorial on Google collab](https://colab.research.google.com/github/AntoineCollin/scMusketeers/blob/main/tutorial/scMusketeers-tutorial_deprez_lung.ipynb) -```bash -git clone git@github.com:becavin-lab/sc_permut.git -cd sc_permut -poetry install -``` +We will see in this tutorial two use-cases: +- Transfer cell annotation to unlabeled cells +- Transfer cell annotation and reduce batch from a query atlas to a reference atlas -It needs CUDA installed ... +## Install -### Install it from PyPI +You can install sc_musketeers with Pypi: ```bash -pip install sc_permut +$ pip install sc-musketeers ``` +with conda +```bash +$ conda -c bioconda sc-musketeers +``` + +with docker -## Usage -The one liner way to run checkatlas is the following: +## Examples + +sc-musketeers can be used for different task in integration and annotation of single-cell atlas. + +Here are 2 different examples: + +- Transfer cell annotation to unlabeled cells + +```bash +$ sc-musketeers transfer my_atlas --class_key celltype --batch_key donor --unlabeled_category=Unknown +``` + +- Transfer cell annotation and reduce batch from a query atlas to a reference atlas ```bash -$ cd your_search_folder/ -$ python -m checkatlas . -#or -$ checkatlas . +$ sc-musketeers transfer ref_dataset --query_path query_dataset --class_key=celltype --batch_key donor --unlabeled_category=Unknown ``` -Or run it inside your python workflow. -```py -from checkatlas import checkatlas -checkatlas.run(path, atlas_list, multithread, n_cpus) -``` \ No newline at end of file + + +Read the [CONTRIBUTING.md](contributing.md) file. diff --git a/mkdocs.yml b/mkdocs.yml index 92a6cc31..15976cca 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -5,5 +5,4 @@ site_url: https://scMusketeers.readthedocs.io/ nav: - Home: "index.md" - - Examples: "examples.md" - Contributing: "contributing.md" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3aa69c5d..079a12a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sc-musketeers" -version = "0.1.13" +version = "0.1.20" description = "Deep learning annotation of cell-types with permutation inforced autoencoder" license = "MIT" authors = ["AntoineCollin","Christophe Becavin"] diff --git a/scmusketeers/tools/VERSION b/scmusketeers/tools/VERSION index 7ac4e5e3..baa98378 100644 --- a/scmusketeers/tools/VERSION +++ b/scmusketeers/tools/VERSION @@ -1 +1 @@ -0.1.13 +0.1.20