Skip to main content

Scalable and interpretable identification of shared transcriptional programs across single-cell cohorts via consensus NMF.

Project description

kaleidocell


Installation


Option A — Installation using conda

# Initialize conda (only needed if not already in your shell)
source "$(conda info --base)/etc/profile.d/conda.sh"

# Edit the PROJECT_DIR path such that it points to KaleidoCell/kaleidocell
PROJECT_DIR=/path/to/KaleidoCell/kaleidocell
ENV_DIR=$PROJECT_DIR/.environments/kaleidocell_env

# Create environment in the same folder as your project (remove -p and path if you want it at your conda place)
conda create -p "$ENV_DIR" python=3.11 -y
conda activate "$ENV_DIR"

# Install GPU-enabled PyTorch (example: CUDA 12.4)
pip install torch --index-url https://download.pytorch.org/whl/cu124

# Install kaleidocell
cd "$PROJECT_DIR"
pip install -e .

# Jupyter kernel
pip install ipykernel
python -m ipykernel install --user --name=kaleidocell_env --display-name "kaleidocell_env"

CUDA version — replace cu124 with the tag matching your driver: cu121 (12.1), cu118 (11.8), etc. Run nvidia-smi to check.


Option B — installation using conda via environment.yml

# Initialize conda
source "$(conda info --base)/etc/profile.d/conda.sh"

# Edit the PROJECT_DIR path such that it points to KaleidoCell/kaleidocell
PROJECT_DIR=/path/to/KaleidoCell/kaleidocell
ENV_DIR=$PROJECT_DIR/.environments/kaleidocell_env

cd "$PROJECT_DIR"

# Create environment from file
conda env create -p "$ENV_DIR" -f environment.yml
conda activate "$ENV_DIR"

# Jupyter kernel
python -m ipykernel install --user --name=kaleidocell_env --display-name "kaleidocell_env"

To reactivate later:

source "$(conda info --base)/etc/profile.d/conda.sh"
conda activate "$ENV_DIR"

Option C — Mac (Apple Silicon M1/M2/M3)

PyTorch ships with MPS (Metal Performance Shaders) support out of the box — no separate CUDA wheel is needed. Please note that GPU-acceleration on Mac is only twice as fast as CPU support. We do not recommend running KaleidoCell on Mac. Usage of a high-performance computing machine is recommended. This installation has been tested on a MacBook Pro with Apple M2 Pro chip, 10 cores, and 16 GB of memory.

# Initialize conda (if not already active in your shell)
source "$(conda info --base)/etc/profile.d/conda.sh"

# Edit the PROJECT_DIR path such that it points to KaleidoCell/kaleidocell
PROJECT_DIR=/path/to/KaleidoCell/kaleidocell
ENV_DIR=$PROJECT_DIR/.environments/kaleidocell_env

# Create environment
conda create -p "$ENV_DIR" python=3.11 -y
conda activate "$ENV_DIR"

# Install PyTorch (MPS support is included by default)
pip install torch

# Install kaleidocell
cd "$PROJECT_DIR"
pip install -e .

# Jupyter kernel
pip install ipykernel
python -m ipykernel install --user --name=kaleidocell_env --display-name "kaleidocell_env"

To reactivate later:

source "$(conda info --base)/etc/profile.d/conda.sh"
conda activate "$ENV_DIR"

Option D — Docker (terminal)

A pre-built image with all dependencies is available on Docker Hub. Please note that this installation has been tested on Linux x86_64 systems with NVIDIA GPU support (CUDA 12.4), and usage on Mac or personal computers is not recommended.

# Pull the image
docker pull hdsu/kaleidocell_env:latest

# Run interactively — mount your KaleidoCell folder into /workspace/KaleidoCell
docker run --gpus all -it --rm \
    -v /path/to/KaleidoCell:/workspace/KaleidoCell \
    hdsu/kaleidocell_env:latest

# Run Jupyter Lab and open the quickstart example (open http://localhost:8888 in your browser)
docker run --gpus all -it --rm \
    -v /path/to/KaleidoCell:/workspace/KaleidoCell \
    -p 8888:8888 \
    hdsu/kaleidocell_env:latest \
    jupyter lab --ip=0.0.0.0 --no-browser --allow-root /workspace/KaleidoCell/examples/01_quickstart.ipynb

Option E — Docker (VS Code Dev Container)

Dev Containers let you open the project inside the Docker image directly from VS Code with full IntelliSense, debugging, and Jupyter support. Please note that this installation has been tested on Linux x86_64 systems with NVIDIA GPU support (CUDA 12.4), and usage on Mac or personal computers is not recommended.

  1. Install the Dev Containers extension in VS Code.
  2. Create a .devcontainer/kaleidocell/ folder at the root of your project.
  3. Place the following devcontainer.json inside it:
{
    "name": "kaleidocell",
    "image": "hdsu/kaleidocell_env:latest",
    "runArgs": [
        "--name", "kaleidocell",
        "--gpus", "all"
    ],
    "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
    "workspaceFolder": "/workspace",
    "customizations": {
        "vscode": {
            "extensions": [
                "ms-python.python",
                "ms-python.vscode-pylance",
                "ms-toolsai.jupyter",
                "ms-python.black-formatter"
            ]
        }
    }
}
  1. Open VS Code, press F1Dev Containers: Reopen in Container.

A ready-to-use devcontainer.json is also provided in docker/devcontainer.json.


Verify GPU acceleration

import torch
print("CUDA:", torch.cuda.is_available())
print("MPS: ", torch.backends.mps.is_available())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kaleidocell-0.1.0.tar.gz (5.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kaleidocell-0.1.0-py3-none-any.whl (5.6 MB view details)

Uploaded Python 3

File details

Details for the file kaleidocell-0.1.0.tar.gz.

File metadata

  • Download URL: kaleidocell-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kaleidocell-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8c3524f9e2b15952cb80cd4975f8d104c1af665b4f5bc9b20f1b3ab1e5d6b511
MD5 0c3a261fdaab062819338a6915a14fa5
BLAKE2b-256 6120b2641ae325a10c2ed9f207b65a0985edbe154687ed4f7513d4c8ebc279ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for kaleidocell-0.1.0.tar.gz:

Publisher: publish.yml on JeanRadig/KaleidoCell

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kaleidocell-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kaleidocell-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kaleidocell-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d638b86ff607fd56e17a3c37b575bee24e955f56f6ddb97bec985663692fcf5a
MD5 46b9c8ed5792015071cdc82207942d91
BLAKE2b-256 004d637d7479be82e1cbb63ec4f77bd764aaab74f93ee84d619c33451877c062

See more details on using hashes here.

Provenance

The following attestation bundles were made for kaleidocell-0.1.0-py3-none-any.whl:

Publisher: publish.yml on JeanRadig/KaleidoCell

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page