Pgltools: a genomic arithmetic tool suite for manipulation of Hi-C peak and other chromatin interaction data

William W. Greenwald, He Li, Erin N. Smith, Paola Benaglio, Naoki Nariai, Kelly A. FrazerBMC Bioinformatics 2017 · DOI

TL;DR

Researchers have developed "pgltools," a new software suite and file format (PGL) to standardize and efficiently analyze paired-genomic-loci data, crucial for understanding 3D genome organization. This tool addresses the lack of unified methods for manipulating and comparing complex chromatin interaction datasets, enabling deeper biological insights.

What Problem Does This Paper Address?

The 3D organization of the human genome plays a critical role in gene regulation. Techniques like Hi-C and ChIA-PET generate "genomic interaction" data, revealing which DNA regions physically interact. While tools exist for analyzing single genomic loci (like the BED format and bedtools), there's been a significant gap in handling paired-genomic-loci data. Existing formats are often program-specific, lack flexibility in locus bin sizes, or are cumbersome for complex analyses like merging, intersecting, or comparing interactions across different experiments or cell types. This makes it challenging to fully leverage the wealth of available genomic interaction data for deeper biological discovery.

Methods

The core contribution of this paper is the introduction of the Paired-Genomic-Loci (PGL) file standard and the accompanying pgltools software suite.

  • PGL File Standard: This is a human-readable text file format designed specifically for paired-genomic-loci data. It requires six columns: chromosome and start/end positions for locus A, followed by chromosome and start/end positions for locus B. Crucially, it allows for user-defined annotations (like p-values or chromatin states) and enforces a standardized ordering of loci (chromosome alphabetically, then position numerically) to simplify programmatic manipulation.
  • pgltools Software Suite: This is a Python-based analysis tool suite that operates on PGL files. It offers a wide range of "genomic arithmetic" operations, analogous to bedtools for single loci. Key operations include:
  • Intersection, Union, and Subtraction: Comparing PGL files to find overlapping, unique, or differential interactions.
  • Merging: Combining nearby interactions within a file.
  • Filtering: Selecting interactions within specific genomic regions (window operation).
  • Conversion: Tools to convert common formats (like SAM, BEDPE, triplet sparse matrix) into PGL, and PGL into visualization-ready formats (UCSC Genome Browser, Juicebox).
  • 1D Operations: Functions to integrate PGL data with single-locus BED files (intersect1D, closest1D, subtract1D).
  • Core Overlap Function: Many pgltools operations rely on a sophisticated overlap function that can efficiently find overlapping loci even when they are not sequential in the file, a key difference from single-locus tools. This function is designed to handle the non-sequential nature of locus B overlaps in sorted PGL files.
  • Implementation: Pgltools is implemented in Python 2.7 and can be run via a UNIX package or as a Python module (PyGLtools). It leverages the PyPy compiler for significant speedups (5-7 fold) and memory reduction (approx. 25%).

Datasets

The paper does not explicitly list specific datasets used for training or evaluation. Instead, it describes the types of data pgltools is designed to handle, such as Hi-C and ChIA-PET data, and mentions that test datasets are available in the pgltools GitHub repository.

Key Insights and Ideas

  • The Need for Standardization: The paper powerfully articulates the long-standing need for a standardized file format and a comprehensive tool suite for paired-genomic-loci data, highlighting how this gap has hindered progress in the field.
  • "Genomic Arithmetic" for Pairs: Extending the concept of genomic arithmetic (operations like intersection, union, subtraction) from single loci to paired loci is a significant conceptual leap. Pgltools makes this a reality, enabling complex comparative analyses.
  • Handling Non-Sequential Overlaps: The development of an overlap function that efficiently handles non-sequential locus B overlaps in sorted PGL files is a critical technical innovation, directly addressing a limitation of existing tools.
  • Bridging the Gap to Biological Interpretation: By providing tools for annotation, comparison, and conversion to visualization formats, pgltools directly facilitates the interpretation of chromatin interaction data in the context of gene regulation and other biological processes.

Key Results

  • Pgltools Functionality: The paper details a suite of operations that allow for efficient manipulation and comparison of paired-genomic-loci data, including intersection, merging, subtraction, windowing, and conversion between formats.
  • Performance: The use of the PyPy compiler results in approximately 5-7 fold decrease in run times and a 25% reduction in memory consumption compared to standard CPython.
  • Usability: Pgltools is available as a user-friendly UNIX package and a Python module, making it accessible for both command-line users and those building custom pipelines.
  • Example Applications: The paper suggests potential applications, such as determining if eQTLs and eGenes fall within chromatin interactions, demonstrating the tool's utility for biological discovery.

Limitations and Future Work

  • Python 2.7 Dependency: The current implementation is in Python 2.7. While portable, Python 2 is nearing end-of-life, suggesting a future need for Python 3 compatibility.
  • Community Contribution: The authors explicitly state that the cross-platform nature of Python "poises pgltools for community contribution," implying that further development and feature expansion are anticipated.
  • Specific Biological Applications: While example applications are mentioned, the paper focuses on the tool's development. Future work could involve showcasing more in-depth biological case studies using pgltools.

Summary updated

BibTeX
@article{greenwald2017pgltools,
  author = {William W. Greenwald and He Li and Erin N. Smith and Paola Benaglio and Naoki Nariai and Kelly A. Frazer},
  title = {{Pgltools: a genomic arithmetic tool suite for manipulation of Hi-C peak and other chromatin interaction data}},
  journal = {BMC Bioinformatics},
  year = {2017},
  doi = {10.1186/s12859-017-1621-0},
}
Figure