Skip to main content

TagGD: Barcode Demultiplexing Utilities for Spatial Transcriptomics Data

License: MIT Python 3.10 Python 3.11 Python 3.12 PyPI version Build Status

TagGD is a Python-based barcode demultiplexer for Spatial Transcriptomics data. It provides a generalized, optimized, and up-to-date version of the original C++ demultiplexer "findIndexes," available here.

For the original peer-reviewed reference to the program, see PLOS ONE.

Overview

The primary goal of TagGD is to extract cDNA barcodes from input files (FASTQ, FASTA, SAM, or BAM) and match them against a list of reference barcodes using a k-mer-based approach. Matched reads are output with barcode and spatial information added to each record.

TagGD is versatile and can be used to demultiplex any type of index if a reference file is provided. Users can even create fake spatial coordinates (X, Y) for general-purpose demultiplexing tasks.

Key Features

  • Supports FASTQ, FASTA, SAM, and BAM formats.
  • Handles multiple indexes per read.
  • K-mer-based matching for efficient and accurate demultiplexing.
  • Outputs matched, unmatched, and ambiguous reads with annotated barcodes.
  • Multiple options and distance metrice.
  • Fast and memmory efficient.

Requirements

  • python 3.10 or higher
  • cython
  • pysam
  • numpy
  • dnaio
  • pytest (testing)

Installation

From Source

If you are using a virtual environment like Anaconda:

git clone https://github.com/your-repo/taggd.git
cd taggd
python setup.py build
python setup.py install

or using pip

git clone https://github.com/your-repo/taggd.git
cd taggd
pip install .

Using pip

Install directly from PyPI:

pip install taggd

Building the Project

If you are contributing, testing or making changes to the code, you may need to build or rebuild the Cython extensions:

python setup.py build_ext --inplace

Testing the Project

pytest

Usage

Basic Command

To see all available options, run:

taggd_demultiplex -h

Input Reference File Format

The reference file should contain barcodes and optional spatial coordinates, formatted as follows:

BARCODE X Y

Example:

ACGTACGT 0 0
TGCATGCA 1 1

Example Commands

Example

taggd_demultiplex   --k 6   --max-edit-distance 3   --overhang 2   --subprocesses 4   --seed randomseed   <barcodes.tsv>   <input_file>   <output_prefix>

Output

TagGD generates the following output files:

  • <output_prefix>_matched.*: Reads that matched reference barcodes.
  • <output_prefix>_unmatched.*: Reads that did not match any reference barcodes.
  • <output_prefix>_ambiguous.*: Reads that matched multiple barcodes.
  • <output_prefix>_results.tsv: Summary statistics of the run.

Options

Run taggd_demultiplex -h to view all available options and their descriptions.


Contact

For questions, bug reports, or contributions, please contact:

Metadata

Release files for taggd 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for taggd 0.4.0
File Size Uploaded Provenance Actions
taggd-0.4.0.tar.gz 431.2 kB Without provenance Details for taggd-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for taggd 0.4.0
File Interpreter ABI Platform Actions
taggd-0.4.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details for taggd-0.4.0-cp310-cp310-macosx_11_0_arm64.whl

Total release size: 631.1 kB

Release files / taggd-0.4.0.tar.gz

Download URL taggd-0.4.0.tar.gz
Size 431.2 kB
Tags Source
SHA-256 checksum
How to use checksums
452af6d66615c00de2a4a205a5cc2a22d94a259b4c99e5c16981baaf34fca18e
BLAKE2b-256 checksum
How to use checksums
2bfb909594bd17cc81c283192643bbb8abb0b93bca53f713bd9fe951d5717732
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / taggd-0.4.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL taggd-0.4.0-cp310-cp310-macosx_11_0_arm64.whl
Size 199.9 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d2ca2cdcb4733f61b80095a9d92ffcae4681ac6bdc350dd8db829390f498162d
BLAKE2b-256 checksum
How to use checksums
fb24d4d6ae804bf1621c37a7b02a4d5c00e06db00271f7d1800912e6acef1310
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Security for taggd 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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