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.1.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.1-py3-none-any.whl (5.6 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kaleidocell-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 07d9b01533499290b8135c2c0b8b2ed8233aaa791c477d61034e8f6a89eb040f
MD5 72d08fe14bc8d1890e1465758293b3ed
BLAKE2b-256 62f832ef6658fe391cefe97b16574faeb9c589d181250f6fa83d18b1ad7089f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for kaleidocell-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: kaleidocell-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97ead641023a619124158dfb49f92af02ef6724e89abc60f02e82c25abe6d52b
MD5 51e64221abd177ab6b2b27d26bdc14f2
BLAKE2b-256 c310456c3f24376a9f5517c34cce35fc199711033c23b792e2989c0c59a3949b

See more details on using hashes here.

Provenance

The following attestation bundles were made for kaleidocell-0.1.1-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