Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
finishing doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jkobject committed Aug 7, 2024
1 parent 77a09b6 commit 88ae26f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 42 deletions.
52 changes: 16 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,21 @@ scPRINT can be used to perform the following analyses:

![figure1](figure1.png)

## Install `scPRINT` in developers mode
## Install `scPRINT`

For the moment scPRINT has been tested on MacOS and Linux (Ubuntu 20.04) with Python 3.10.

If you want to be using flashattention2, know that it only supports triton 2.0 MLIR's version and torch==2.0.0 for now.


```python
conda create -n "[whatever]" python==3.10
git clone https://github.com/jkcobject/scPRINT
pip install 'lamindb[jupyter,bionty]'
pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1
# install the dev tooling if you need it too
pip install -e "scPRINT[dev]"
pip install -r requirements-dev.txt
pip install triton==2.0.0.dev20221202 --no-deps # only if you have a compatible gpu (e.g. not available for apple GPUs for now, see https://github.com/triton-lang/triton?tab=readme-ov-file#compatibility)
# install triton as mentioned in .toml if you want to
mkdocs serve # to view the dev documentation
git clone https://github.com/jkobject/scPRINT
#one of
pip install scPRINT # OR
pip install scPRINT[dev] # for the dev dependencies (building etc..) AND/OR [dev,flash]
pip install scPRINT[flash] && pip install -e "git+https:/
/github.com/triton-lang/triton.git@legacy-backend
#egg=triton&subdirectory=python" # to use flashattention2, you will need to install triton 2.0.0.dev20221202 specifically, working on removing this dependency # only if you have a compatible gpu (e.g. not available for apple GPUs for now, see https://github.com/triton-lang/triton?tab=readme-ov-file#compatibility)
```

We make use of some additional packages we developed alongside scPRint.
Expand All @@ -61,31 +58,6 @@ Please refer to their documentation for more information:

In that case, connect with google or github to [lamin.ai](https://lamin.ai/login), then be sure to connect before running anything (or before starting a notebook): `lamin login <email> --key <API-key>`. Follow the instructions on [their website](https://docs.lamin.ai/guide).

## Install it from PyPI

If you want to use flashattention2, know that it only supports triton 2.0 MLIR's version and torch==2.0.0 for now.

```bash
pip install 'lamindb[jupyter,bionty]'
```

then install scPRINT

```bash
pip install scprint
```
> if you have a GPU that you want to use, you will benefit from flashattention. and you will have to do some more specific installs:
1. find the version of torch 2.0.0 / torchvision 0.15.0 / torchaudio 2.0.0 that match your nvidia drivers on the torch website.
2. apply the install command
3. do `pip install pytorch-fast-transformers torchtext==0.15.1`
4. do `pip install triton==2.0.0.dev20221202 --no-deps`

You should be good to go. You need those specific versions for everything to work...

This is not my fault, scream at nvidia :wink:


## Usage

### scPRINT's basic commands
Expand Down Expand Up @@ -182,4 +154,12 @@ Acknowledgement:
[laminDB](https://lamin.ai/)
[lightning](https://lightning.ai/)

## Work in progress:

1. remove the triton dependencies
2. add version with additional labels (tissues, age) and organisms (mouse, zebrafish) and more datasets from cellxgene
3. version with separate transformer blocks for the encoding part of the bottleneck learning and for the cell embeddings
4. improve classifier to output uncertainties and topK predictions when unsure
5.

Awesome Large Cell Model created by Jeremie Kalfon.
10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
name = "scprint"
version = "1.0.0"
license = "MIT"
description = ""
description = "scPRINT is a Large Cell Model for Gene Network Inference, Denoising and more from scRNAseq data"
authors = ["jeremie kalfon"]
readme = ["README.md", "LICENSE"]
repository = "https://github.com/jkobject/scPrint"
keywords = ["scRNAseq","transformer","GRN","gene regulatory network","scPrint","large cell model","foundation model"]


[tool.poetry.dependencies]
lamindb = "<=0.69.9"
bionty = "<=0.42.6"
python = "3.10"
python = "^3.10"
cellxgene-census = "*"
anndata = "*"
matplotlib = "*"
Expand All @@ -32,7 +31,7 @@ decoupler = "*"
Bio = "*"
attridict = "*"
gget = "*"
fair-esm = { git = "https://github.com/facebookresearch/esm.git", branch = "main" }
fair-esm = "*"
hydra-core = "*"
lightning = "*"
pynndescent = ">=0.5.11"
Expand All @@ -58,7 +57,6 @@ torch = "2.0.0"
torchvision = ">=0.15.0"
torchaudio = ">=2.0.0"
torchtext = ">=0.15.1"
galore-torch = { git = "https://github.com/jiaweizzhao/GaLore", branch = "master", optional = true }
pytorch-fast-transformers = { version = "*", optional = true }
triton = { git = "https://github.com/triton-lang/triton", tag = "legacy-backend", subdirectory = "python", optional = true }
pytest = { version = "^7.4.3", optional = true }
Expand Down Expand Up @@ -91,7 +89,7 @@ dev = [

flash = [
"torchtext",
"triton",
# "triton",
"torch",
"torchvision",
"torchaudio",
Expand Down

0 comments on commit 88ae26f

Please sign in to comment.