Skip to main content

Python toolkit for analyzing high-throughput T and B cell receptor sequencing data

Project description

LymphoSeq - Python Toolkit for AIRR-Seq Analysis

A Python implementation of the LymphoSeq2 R package for analyzing high-throughput sequencing of T and B cell receptors.

Overview

LymphoSeq provides a comprehensive toolkit for importing, manipulating, and visualizing Adaptive Immune Receptor Repertoire Sequencing (AIRR-seq) data from various platforms including:

  • Adaptive Biotechnologies ImmunoSEQ
  • BGI IR-SEQ
  • 10X Genomics VDJ sequencing
  • MiXCR pipeline outputs

Features

  • Multi-platform support: Import data from major AIRR-seq platforms
  • AIRR standard compliance: Full support for AIRR Community data standards
  • Automatic field mapping: Platform-specific columns automatically converted to AIRR standard names
  • High-performance parsing: Optimized for large datasets with parallel processing
  • 10X single-cell support: Merge paired alpha/beta chains for bulk-style analysis
  • Comprehensive analysis: Clonality, diversity, and repertoire comparison tools
  • Database integration: Search VDJdb, McPAS-TCR, and IEDB for known antigen specificities
  • Rich visualizations: Interactive plots and publication-ready figures

Documentation

  • AIRR Field Mappings: Complete documentation of platform-specific column mappings to AIRR standard fields
  • 10X Chain Merging Guide: How to merge alpha/beta chains from 10X single-cell data
  • Command-line interface: Easy-to-use CLI for batch processing

Installation

pip install lymphoseq

For development installation:

git clone https://github.com/shashidhar22/lymphoseq.git
cd lymphoseq
pip install -e ".[dev]"

Quick Start

Bulk TCR-Seq Data

import lymphoseq as ls

# Import AIRR-seq data
data = ls.read_immunoseq("path/to/data/")

# Calculate repertoire diversity metrics
diversity = ls.clonality(data)

# Visualize clonal expansion
fig = ls.plot_clonality(data)
fig.show()

10X Single-Cell Data

import lymphoseq as ls

# Read 10X data
data_10x = ls.read_10x("path/to/10x_data/")

# Merge alpha and beta chains for bulk-style analysis
merged = ls.merge_chains(data_10x)

# Now use any bulk analysis function
clonality = ls.clonality(merged)
diversity = ls.diversity_metrics(merged)

# Search for known antigen specificities
annotated = ls.search_db(merged, databases="all", chain="trb")

# Visualize
fig = ls.plot_top_seqs(merged, top=50)
fig.show()

Command Line Usage

# Import and analyze data
lymphoseq import --input data/ --output results/

# Calculate diversity metrics
lymphoseq analyze clonality --input results/data.parquet --output results/

Documentation

Full documentation is available at lymphoseq.readthedocs.io

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

This package is inspired by and compatible with the original LymphoSeq2 R package by Elena Wu, Shashidhar Ravishankar, and David Coffey.

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

lymphoseq-0.1.0.tar.gz (81.6 kB view details)

Uploaded Source

Built Distribution

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

lymphoseq-0.1.0-py3-none-any.whl (82.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lymphoseq-0.1.0.tar.gz
  • Upload date:
  • Size: 81.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for lymphoseq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4e6cb439acb662f90645047eef5a87592dba33b3c3efd231162d23168b764992
MD5 a6ebe4c18f104ba4e4128ae8e29ba358
BLAKE2b-256 d48b96d5d59950df22cca55dcffacf7cde5f60378ee8a79e63938aa0a27fcc42

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lymphoseq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 82.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for lymphoseq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6956d4f3cf67e419d66872f6792380e378e3f44c863d089724655d5538882aec
MD5 0268219df5acb12e1f813a6c6bb9d61e
BLAKE2b-256 dc1580ba70b52bef2afaac347f82f664e0ebedb4a62e716ec266ac420b3d5ac2

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