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

jkobject/scPRINT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scprint

codecov CI

Awesome Large Transcriptional Model created by Jeremie Kalfon

scprint = single cell pretrained regulation inference neural network from transcripts

using:

Install it from PyPI

first have a good version of pytorch installed

you might need to make it match your cuda version etc..

We only support torch>=2.0.0

then install laminDB

pip install 'lamindb[jupyter,bionty]'

then install scPrint

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 in 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.. not my fault, scream at nvidia, pytorch, Tri Dao and OpenAI 😉

in dev mode

conda create ...
git clone https://github.com/jkobject/scPRINT
git clone https://github.com/jkobject/GRnnData
git clone https://github.com/jkobject/benGRN
cd scPRINT
git checkout dev
git submodule init
git submodule update
pip install -e scDataloader
pip install -e ../GRnnData/
pip install -e ../benGRN/
tall torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1
# install pytorch as mentionned above if you have a GPU
pip install -e .[dev]
pip install 'lamindb[jupyter,bionty]'
pip install triton==2.0.0.dev20221202 --no-deps
# install triton as mentioned in .toml if you want to
mkdocs serve # to view the dev documentation

Usage

from lightning.pytorch import Trainer
from scprint import scPrint
from scdataloader import DataModule

...
model = scPrint(...)
trainer = Trainer(...)
trainer.fit(model, datamodule=datamodule)
$ python -m scPrint/__main__.py
#or
$ scprint fit/train/predict/test

for more information on usage please see the documentation in https://jkobject.com/scPrint

Development

Read the CONTRIBUTING.md file.

What is included?

  • 📃 Documentation structure using mkdocs
  • 🧪 Testing structure using pytest If you want codecov Reports and Automatic Release to PyPI
    On the new repository settings->secrets add your PYPI_API_TOKEN and CODECOV_TOKEN (get the tokens on respective websites)
  • ✅ Code linting using flake8
  • 📊 Code coverage reports using codecov
  • 🛳️ Automatic release to PyPI using twine and github actions.

acknowledgement: python template scGPT laminDB