Skip to main content

codecov

GlyContact: 3D Analysis of Glycan Structures

GlyContact is a Python package for retrieving, processing, and analyzing 3D glycan structures from GlycoShape/molecular dynamics, NMR, or X-ray crystallography. Indeed, while glycans are traditionally represented as linear text sequences, their branched structures and high flexibility create a complex 3D landscape that affects their biological function.

GlyContact provides a comprehensive toolkit for analyzing 3D glycan structures, enabling researchers to:

  1. Visualize complex glycan structures with 3D-SNFG symbols
  2. Quantify structural properties including solvent accessible surface area (SASA), motif flexibility and torsion angles
  3. Analyze relationships between glycan composition/sequence/class and these structural properties
  4. Compare different glycan structures that are either free, bound to lectins or covalently linked to glycoproteins
  5. Generate structural features for machine learning applications

These capabilities help bridge the gap between glycan sequence and function by revealing the critical spatial arrangements that determine molecular recognition.

Installation

pip install glycontact

An optional [ml] install is available for machine learning features:

pip install glycontact[ml]

If you want to see how you can use GlyContact to work with glycans in lectin complexes or in glycoproteins, check out this Jupyter notebook with some pointers:

Open In Colab

Getting PDB files

GlyContact enables detailed exploration of glycan conformational properties by connecting glycan 3D structural data with their corresponding sequence information.

By default, users can input glycan sequences, which are automatically mapped to the appropriate conformer structures from GlycoShape through built-in functions.

To streamline structural analysis, GlyContact integrates directly with the GlycoShape API, allowing automatic retrieval of structures and eliminating the challenges associated with manual data downloads.

Alternatively, GlyContact can operate independently of GlycoShape if users prefer to supply their own structural data by providing file paths to local PDB files.

Glycan Contact Maps

Contact maps reveal the spatial relationships between monosaccharides in a glycan structure. These maps help identify which parts of the glycan are in close proximity, providing insights into potential functional regions.

from glycontact.process import get_contact_tables
# Get monosaccharide contact tables
glycan = "Gal(b1-4)GlcNAc(b1-2)Man(a1-3)[Gal(b1-4)GlcNAc(b1-2)Man(a1-6)]Man(b1-4)GlcNAc(b1-4)[Fuc(a1-6)]GlcNAc"
contact_tables = get_contact_tables(glycan, level = "monosaccharide")

from glycontact.visualize import draw_contact_map
# Visualize the first contact map
draw_contact_map(contact_tables[0], size = 1.0)
Glycan Gal(b1-4)GlcNAc(b1-2)Man(a1-3)[Gal(b1-4)GlcNAc(b1-2)Man(a1-6)]Man(b1-4)GlcNAc(b1-4)[Fuc(a1-6)]GlcNAc not found locally. Downloading from GlycoShape...

png

Surface Accessibility and Flexibility

The solvent-accessible surface area (SASA) and flexibility of monosaccharides are crucial determinants of glycan-protein interactions. GlyContact calculates these properties and allows visualization of their distribution across the glycan structure.

from glycontact.visualize import plot_glycan_score
plot_glycan_score(glycan, attribute = "SASA")

png

Glycosidic Torsion Angles

Glycosidic torsion angles (phi/psi) determine the overall shape of glycans. GlyContact can analyze these angles across multiple structures to identify preferred conformations, similar to protein Ramachandran plots.

from glycontact.visualize import ramachandran_plot
fig = ramachandran_plot("Gal(b1-4)GlcNAc")

png

Contributing

Contributions to GlyContact are welcome! Please feel free to submit a Pull Request.

Citation

If you use GlyContact in your research, please cite:

Thomès et al., GlyContact analyzes glycan 3D structures at scale. Nat Commun, 16:11136, 2025

License

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


Download files

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

Source Distribution

glycontact-0.4.0.tar.gz (16.1 MB view details)

Uploaded Source

Built Distribution

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

glycontact-0.4.0-py3-none-any.whl (3.1 MB view details)

Uploaded Python 3

File details

Details for the file glycontact-0.4.0.tar.gz.

File metadata

  • Download URL: glycontact-0.4.0.tar.gz
  • Upload date:
  • Size: 16.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for glycontact-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ed708b1e3ec2b04ab971a62c4d9837293723dbe6d90cff817df3ed6566bc601f
MD5 6b2cf7ed0205ae5112209c8923116b77
BLAKE2b-256 2a49f21aba1e0553bdaeb56c05e9975f9c8be526f9e3597071bfc0c5120ada7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for glycontact-0.4.0.tar.gz:

Publisher: python-publish.yml on BojarLab/glycontact

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file glycontact-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: glycontact-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for glycontact-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 221eebb54af12ce7b3977fccd17ab6667fb53e029edf53f327f45c8320006420
MD5 1688dcb447a2a1c670a940b02721ac15
BLAKE2b-256 c65cacf41bbaa7037ef46bcfb2369af4600d70eb3ad93cea67b530df9cbc74ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for glycontact-0.4.0-py3-none-any.whl:

Publisher: python-publish.yml on BojarLab/glycontact

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page