Skip to main content

HECTOR

Hierarchical Embedding for Ontology-guided Trajectory Recognition and Analysis of single-cell sequencing data

HECTOR packages the current HECTOR inference and trajectory analysis code as a research-preview Python distribution. The package source is under hector/.

Installation

On Linux or WSL2 with an NVIDIA graphics card:

pip install "hector-sc[cuda12]"

On everything else — Mac, Windows, or Linux without an NVIDIA card:

pip install hector-sc

Either command installs the complete feature set; there are no other optional extras to choose from. HECTOR selects its inference backend automatically: TensorFlow on Linux, Windows, and Intel Macs, or MLX on Apple Silicon Macs.

The cuda12 extra adds TensorFlow's pip-managed NVIDIA CUDA runtime libraries, the prebuilt cupy-cuda12x wheel used for live VRAM measurement and CUDA memory-pool management, and the RAPIDS libraries cuml-cu12 and cugraph-cu12, which accelerate reduce_dimensions() and evaluate_cells(). Every package in the extra is gated to Linux, so on Mac and Windows the bracketed form installs nothing extra and is equivalent to the plain command.

Model Checkpoints

The packaged registry exposes two model entries hosted in Hugging Face repo polligator/HECTOR. Access to the hosted checkpoints is managed separately; authorized users can authenticate with Hugging Face before using a registry key.

  • human -> file human.h5 (Homo sapiens)
  • mouse -> file mouse.h5 (Mus musculus)

Basic usage:

import anndata
import hector

adata = anndata.read_h5ad("example_data.h5ad")
predictor = hector.HECTOR("human")
predictions = predictor.predict(adata)
predictor.write_predictions(adata, predictions)

Local checkpoint paths still work — pass a file path instead of a registry key:

import hector

predictor = hector.HECTOR("/path/to/your/checkpoint.h5")

Hardware Requirements

Inference runs on GPU by default (auto-batched to fit available VRAM) and falls back to CPU when no GPU is visible. Per-cell embeddings are deterministic: the same input on the same hardware and settings reproduces bit-identical results. Across different batch sizes, row orderings, or hardware, embeddings agree to within float32 rounding.

requirement
GPU VRAM (minimum) 10 GB. Batch size is auto-sized to fit the VRAM actually available; you do not set it.
GPU VRAM (recommended) 16 GB for comfortable headroom
System RAM ~16 GB (model + 100k-cell anchor pool + working set)
CPU-only mode Feasible. ~3.6× slower than GPU. ~4 min for 100k cells, ~43 min for 1M cells on a typical workstation CPU.

Numbers measured on the human checkpoint (57 M parameters; 100 000-cell × 5 000-gene anchor pool). Smaller anchor pools or fewer genes will reduce the footprint proportionally.

Package Layout

  • hector/predictor.py: public predictor API and high-level inference workflows
  • hector/predictor_support.py: internal model definitions, preprocessing, GRIT, and data utilities
  • hector/trajectory.py: public trajectory configuration, analyzer orchestration, and shared layout/color helpers
  • hector/trajectory_support.py: internal trajectory placement, ambiguity, clustering, and overlap helpers
  • hector/trajectory_render.py: Plotly and matplotlib trajectory renderers
  • hector/__init__.py: package exports plus model registry, cache, and download helpers

Citation

title: "Hierarchical Embedding for Ontology-guided Trajectory Recognition and Analysis"
authors: Junya Zhang
version: "0.1.0"
date-released: "2026-05-10"
license: "AGPL-3.0-only"
repository-code: "https://github.com/Polligator/HECTOR"

License

The source code is released under the GNU Affero General Public License v3.0. See LICENSE for details.

The project name, logo, icons, and related branding are not licensed under the AGPLv3. Modified versions should not use the project name or branding in a way that suggests they are official, endorsed by, or affiliated with the original project.

Contributions

External code contributions are not currently accepted.

Bug reports, reproducibility reports, installation issues, and feature suggestions are welcome through GitHub Issues.

This policy helps keep copyright ownership clear while the project is under active research and development.

Download files

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

Source Distribution

hector_sc-0.1.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

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

hector_sc-0.1.0-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hector_sc-0.1.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.6

File hashes

Hashes for hector_sc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 65b1ddc81a4eeb169b91f3ebbd6a669edaddf407a72b3c888fd76194e92ae5cd
MD5 2d17748a28a211929423022b9592ccab
BLAKE2b-256 27ade3be4787e1d40f0cb1300876574f3000ba72f29a32fbfcde5abc9751da18

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hector_sc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.6

File hashes

Hashes for hector_sc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32e84a85252fd04b95f54e9d6c6d606abf3696f1d8096617ad89f7847b47b5f9
MD5 3d324fa0106d2da66f6b80995f936aef
BLAKE2b-256 110469262dc69ec4670877433a8802899436a5612eb3649a75a4396b0d360ae1

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.1

2 files

1.0

2 files

This release

0.1.0 This release

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page