Skip to main content

Pytacs: Python-implemented Topology-Aware Cell Segmentation for high-resolution spatial transcriptomics

Project description

Pytacs - Python-implemented Topology-Aware Cell Segmentation

Copyright (C) 2025 Xindong Liu

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

A tool for segmenting/integrating sub-cellular spots in high-resolution spatial transcriptomics into single-cellular spots and cell-type mapping.

Ideas are inspired by (Benjamin et al., 2024)'s work TopACT (see https://gitlab.com/kfbenjamin/topact). But Pytacs has improved it in several ways:

  1. The shape of predicted cells can be diverse rather than a rectangle/grid, rendering higher accuracy;
  2. Random-Walk-based aggregation strategy with comparative computational speed, making it more "topology-aware", and rendering higher accuracy especially at cell boundaries;

Requirements

This package is released on PyPi now! It could be simply installed by pip install pytacs (the package name yet might change).

For conda users,

conda create -n pytacs python=3.12 -y
conda activate pytacs
pip install pytacs

For python3 users, first make sure your python is of version 3.12, and then in your working directory,

python -m venv pytacs
source pytacs/bin/activate
python -m pip install pytacs

For developers, requirements (at develop time) are listed in requirements.in (initial dependencies), requirements.txt (full dependencies) and requirements.tree.txt (for a tree view).

For developers using Poetry, the dependencies lock file is poetry.lock and the project information including main dependencies is listed in pyproject.toml.

To use it for downstream analysis in combination with Squidpy, it is recommended to use a seperate virtual environment to install Squidpy.

Usage

In the future, there will be a well-prepared recipe module for users to use conveniently.

For detailed usage, see Basic_Usage_of_pytacs.md

Demo

Demo

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

pytacs-2025.9.15.tar.gz (62.0 kB view details)

Uploaded Source

Built Distribution

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

pytacs-2025.9.15-py3-none-any.whl (65.7 kB view details)

Uploaded Python 3

File details

Details for the file pytacs-2025.9.15.tar.gz.

File metadata

  • Download URL: pytacs-2025.9.15.tar.gz
  • Upload date:
  • Size: 62.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.8 Linux/5.4.0-216-generic

File hashes

Hashes for pytacs-2025.9.15.tar.gz
Algorithm Hash digest
SHA256 0769c5f8c5b034d2bd003869980fac38d654dc7c6272cf5e2b8dd86547ddc27e
MD5 692de03301be9cb4fe28a7e666b8df9c
BLAKE2b-256 2a4592ed81459c717245aeb413c74cd391695bd046e21f09245bc229312ae6b8

See more details on using hashes here.

File details

Details for the file pytacs-2025.9.15-py3-none-any.whl.

File metadata

  • Download URL: pytacs-2025.9.15-py3-none-any.whl
  • Upload date:
  • Size: 65.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.8 Linux/5.4.0-216-generic

File hashes

Hashes for pytacs-2025.9.15-py3-none-any.whl
Algorithm Hash digest
SHA256 f59f5c088d40e71af690ac781e0f26387eba179700a7df6d55d07a506621b90a
MD5 bfada0816408d4967cbe8eb4a2dda889
BLAKE2b-256 07b996649e7e8dcd689e8cef1a06d41f788a6a45acaf4dda58e9c3ac0850b723

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