Skip to main content

🎨 A toolkit to explore the Aignostics OpenTME dataset.

Project description

License CI Dependabot Renovate enabled codecov Ruff Copier

🎨 TME Studio

Welcome to TME Studio! This readme explains the content of TME Studio, and the dataset it is built on: OpenTME.

Already familiar and just want to get started? Move on to the Setup instructions.

Content

What is OpenTME?

OpenTME is an open-source project by Aignostics that provides academic researchers with pre-computed quantitative TME (Tumor Micro-Environment) features across H&E-stained WSIs from The Cancer Genome Atlas (TCGA). It provides comprehensive spatial outputs characterizing key cellular and tissue components of the TME, including cancer cells, immune cells, and stromal features, as well as their relationships within the tissue architecture.

All outputs were generated using Atlas H&E-TME, Aignostics' AI-powered computational pathology application for the automated identification and quantification of TME features in FFPE H&E-stained tissue samples.

What is TME Studio?

TME Studio contains a set of tutorials and example notebooks to help you explore OpenTME. TME Studio is provided as an entry point into OpenTME, and intended to accelerate research output from the OpenTME data.

Content

The structure of the notebooks in this repo looks as follows:

tme_studio/
|-- aignostics_tme_studio/
    |-- src/
        |-- notebooks/
            |-- demo/
            |-- examples/
            |-- tutorials/
  • Tutorials: Tutorials: Step-by-step notebooks to help users get started, covering foundational tasks such as loading and exploring the dataset, and providing a guide through the OpenTME features.

  • Examples: Concise notebooks demonstrating specific analysis types, such as immune desert classification and Kaplan–Meier survival plots. The examples showcase what types of analyses might be possible with OpenTME. Note that these are examples, and are not statistically rigorous, but may be used as a starting point for your own analysis.

  • Demo: contains a demo notebook showcasing all features in OpenTME and some example analyses.

If you are unfamiliar with the OpenTME dataset, we suggest beginning at src/aignostics_tme_studio/notebooks/tutorials/1_getting_started.py. To get a feeling for all the different features you can find in OpenTME, have a look at the demo notebook src/aignostics_tme_studio/notebooks/demo/demo.py.

Setup instructions

To run the TME Studio notebooks, follow these installation instructions:

Prerequisites

Tool Version Purpose
mise latest Task runner & tool version manager
Git latest Version control

Installing mise

mise manages tool versions (Python, uv, trivy, etc.) and runs all project tasks. Install it first:

curl https://mise.run | sh

# activate mise in the current shell and add to shell config for future sessions
echo 'eval "$(mise activate --shims bash)"' >> ~/.bashrc
source ~/.bashrc

For .zsh users:

echo 'eval "$(mise activate --shims zsh)"' >> ~/.zshrc
source ~/.zshrc

For other shells, see mise installation docs.

Verify the installation:

mise --version

# Check path - mise shims should be first in the PATH to ensure the correct tool versions are used
echo $PATH

which uv # Path should contain the `mise/shims/uv` shim, not a system-wide uv installation; please do not install uv in the same directory as `mise` to avoid conflicts

Cloning the repository

Authenticate with GitHub using the Github CLI to clone the repository:

gh auth login

gh repo clone aignostics/tme-studio

cd tme-studio
mise trust
gh auth setup-git

Installation

# Install all dev dependencies, pre-commit hooks, and keyring tooling
mise run install

# Verify everything works
mise run lint

# List all existing mise tasks
mise tasks

This runs uv sync --all-extras to install all dependencies (including private registry packages), then sets up pre-commit hooks.

🤗 Hugging Face access

  1. Make sure you have a Hugging Face account. If you don't have one, you can create one for free at hf.co/join.
  2. Get access to the dataset by going to https://huggingface.co/datasets/Aignostics/OpenTME and clicking "Access

Note: You will eceive an email from Hugging Face as soon as your access request has been reviewed. This may take a few working days.

Note: No need to download the dataset! The tutorials will show you how to access the dataset via the Hugging Face API.

  1. Download the Hugging Face CLI
  2. Log into hugging face by calling
hf auth login

Enter your access token created on https://huggingface.co/settings/tokens.

Note: If you have an invalid token, you can force logging in by calling hf auth login \--force

Starting Marimo

You are now ready to explore the notebooks! 🎨

Start marimo by calling the following command and opening the URL in your browser:

uv run marimo edit

Use the marimo UI opened in your browser to navigate to the notebooks.

Alternatively, you can run

uv run marimo edit path/to/notebook.py

to open a specific notebook directly.

Further Reading

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

aignostics_tme_studio-0.1.2.tar.gz (6.3 MB view details)

Uploaded Source

Built Distribution

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

aignostics_tme_studio-0.1.2-py3-none-any.whl (6.3 MB view details)

Uploaded Python 3

File details

Details for the file aignostics_tme_studio-0.1.2.tar.gz.

File metadata

  • Download URL: aignostics_tme_studio-0.1.2.tar.gz
  • Upload date:
  • Size: 6.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for aignostics_tme_studio-0.1.2.tar.gz
Algorithm Hash digest
SHA256 29ac99c5ca32e958911bd95d7e70374531ff23916bf9cae1e0416d76a163f075
MD5 e5c04e9a5dc41c9acd39de21eb5b168b
BLAKE2b-256 7c0c4e46f87ff2b60360dfe30ab7100d8a1c476501b4ce93a24e380b071999f3

See more details on using hashes here.

File details

Details for the file aignostics_tme_studio-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: aignostics_tme_studio-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for aignostics_tme_studio-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d8caa0634b3cbe89b3c5c6b17280cc8d3cbadf47fa9a5652657b526f8298d3e6
MD5 887f1790630289324b781eeea8e6d240
BLAKE2b-256 b2be514579ae70a3b52d00e9264084dc897d804a83082ec385d8d648106a19f0

See more details on using hashes here.

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