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

HECTOR automatically selects an available inference backend and adjusts batch sizes to the available memory. CPU inference is used where supported when no accelerator is available. Results are expected to be numerically stable for fixed inputs and settings, although small differences can occur across hardware, backends, batch sizes, or row orderings.

Resource Guidance
GPU VRAM 10 GB or more is recommended for GPU inference with the published human checkpoint; adaptive batching may permit smaller workloads on devices with less memory.
GPU VRAM (comfortable) 16 GB provides additional headroom for larger workloads.
System RAM Workload-dependent. Approximately 16 GB is a useful starting point for the published human checkpoint with a 100,000-cell anchor pool.
CPU-only mode Supported where the selected backend provides CPU execution, but generally slower than accelerated inference.

These estimates use the published human checkpoint (approximately 57 million parameters) with a 100,000-cell by 5,000-gene anchor pool. Smaller anchor pools or fewer genes generally reduce memory requirements, but memory use also includes fixed model and runtime overhead.

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"
license: "AGPL-3.0-or-later"
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-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-1.0-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hector_sc-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-1.0.tar.gz
Algorithm Hash digest
SHA256 9fe4d065e7cd53ee7e4de8cb4f2a3c89c46ef8df4674d383a3fa53e9efa05fcb
MD5 5c551763ed43f2a02285556867034aee
BLAKE2b-256 bab888268935895c7e8b0107f223a9b8a43d469c1d3e02104bf63901e342ea93

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hector_sc-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-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fcc101daf21d9976c05ad9d6500f53d588b6d27ec7fe33f12d2b684bfcdd81b6
MD5 0218df5669c6ae5ddd683d168d819df7
BLAKE2b-256 3b940c22effee602a68da6ff58fb2961d081bdfa1e1caffc8aa958bbe66067ec

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.1

2 files

This release

1.0 This release

2 files

0.1.0

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