Skip to content

Repository files navigation

superinformation

A Python framework for information-theoretic analysis of genomic Sequence Ontology features

Tests Python Release License: MIT DOI


Overview

superinformation is an open-source Python framework for the information-theoretic analysis of genomic Sequence Ontology (SO) features. The framework provides a reproducible implementation of the Superinformation measure together with computational workflows for entropy profiling, Characteristic Information Scale (CIS) analysis, geometric analysis, and reproducible scientific analyses.

The repository was developed to enable systematic comparison of Sequence Ontology features across multiple genomes using a unified computational pipeline. Rather than focusing on a single biological question, the framework provides reusable methods that can be incorporated into broader comparative genomics and genome annotation studies.

The software separates reusable computational methods from project-specific analyses, providing a modular package suitable for reproducible research.


Scientific Background

Shannon entropy has long been used to quantify the information content of biological sequences. However, conventional entropy measures summarise the average randomness of a sequence and may fail to distinguish sequences that possess identical nucleotide frequencies but substantially different structural organisation.

To address this limitation, Bose and Chouhan introduced the Superinformation measure, an information-theoretic quantity describing the entropy of entropy, or equivalently, the variation in entropy across different regions of a sequence. Their work demonstrated that Superinformation provides improved discrimination between coding and non-coding DNA sequences compared with several previously reported approaches (Bose and Chouhan, 2011).

This repository does not introduce the Superinformation measure itself. Instead, it provides a reproducible computational framework that implements the methodology described by Bose and Chouhan (2011) while extending it with additional analyses for genomic Sequence Ontology features, including Characteristic Information Scale (CIS) analysis and geometry-based feature analysis.


Framework Overview

The framework separates reusable computational methods from project-specific analyses. Scientific algorithms are implemented as reusable Python modules, while exploratory analyses, publication figures, and manuscript-specific workflows remain independent from the core package.

Scientific workflow of the project methodology

Figure 1: Scientific workflow of the project methodology.

The computational workflow begins with entropy estimation from genomic sequences. Superinformation is then computed from the resulting entropy distributions. Downstream analyses include CIS analysis and geometry-based feature comparisons, which collectively support biological interpretation.

The Characteristic Information Scale (CIS) is operationally defined as B50: the block size at which Superinformation declines to 50% of its value at the smallest evaluated block size. When the 50% threshold lies between sampled block sizes, CIS is estimated by linear interpolation. If the threshold is not reached within the evaluated block-size range, CIS is reported as undefined (NaN).

Framework Capabilities

The framework provides a modular collection of computational methods for information-theoretic analysis of genomic Sequence Ontology features.

Current capabilities include:

  • Shannon entropy profiling across multiple block sizes.
  • Superinformation calculation from entropy distributions.
    • Characteristic Information Scale (CIS) analysis using the B50 criterion.
  • Geometry-based comparison of Sequence Ontology features.
  • Hierarchical clustering, principal component analysis (PCA), and Uniform Manifold Approximation and Projection (UMAP).
  • Entropy profile and variance analysis.
  • A modular software architecture separating reusable computational methods from exploratory research workflows.

Together, these components provide an end-to-end computational framework for reproducible information-theoretic analysis of genomic sequence features.


Scope

The framework is intended for computational genomics, comparative genomics, and information-theoretic analysis of genomic sequence features.

Although the accompanying study focuses on Sequence Ontology annotations across multiple reference genomes, the computational methods have been designed to remain sufficiently modular for adaptation to related sequence analysis problems.

The repository is intended to serve both as the reference software implementation accompanying the associated manuscript and as a reusable foundation for future methodological development.


Repository Structure

The repository is organised into reusable software components, documentation, representative outputs, tests, and supporting project resources.

superinformation/
│   .gitignore
│   CHANGELOG.md
│   CITATION.cff
│   LICENSE
│   MANIFEST.in
│   pyproject.toml
│   pytest.ini
│   README.md
│   requirements.txt
│
├───.github
│   └───workflows
│           tests.yml
│
├───data
│       README.md
│
├───docs
│       README.md
│
├───examples
│       01_entropy_pipeline.py
│       02_superinformation_pipeline.py
│       03_cis_pipeline.py
│       04_geometry_pipeline.py
│       05_complete_workflow.py
│       example_data.py
│       README.md
│
├───methods
│       pipeline.svg
│
├───paper
│       README.md
│
├───results
│   │   README.md
│   │
│   ├───figures
│   │       entropy_analysis.pdf
│   │       entropy_analysis.png
│   │       feature_analysis.pdf
│   │       feature_analysis.png
│   │       geometry_analysis.pdf
│   │       geometry_analysis.png
│   │       validation_analysis.pdf
│   │       validation_analysis.png
│   │
│   ├───sample_outputs
│   │       CIS_values.csv
│   │       SI_feature_matrix_geometry_filtered.csv
│   │       SI_feature_PCA_coordinates_filtered.csv
│   │       SI_feature_UMAP_coordinates_filtered.csv
│   │       superinformation_values.csv
│   │
│   └───tables
│           baseline_correlation_summary.csv
│           CIS_feature_summary.csv
│           entropy_summary_stats.csv
│           IPS_feature_summary.csv
│           ontology_recovery_summary.csv
│
├───src
│   └───superinformation
│           cis.py
│           entropy.py
│           geometry.py
│           py.typed
│           superinformation.py
│           __init__.py
│
├───supplementary
│       README.md
│
└───tests
        conftest.py
        test_cis.py
        test_entropy.py
        test_examples.py
        test_geometry.py
        test_superinformation.py
        __init__.py

The repository follows several design principles:

  • reusable scientific methods are implemented within src/superinformation/;
  • documentation is maintained independently of the source code;
  • representative outputs are stored under results/;
  • executable examples demonstrate the public computational workflows;
  • automated tests verify the core scientific API and example workflows; and
  • project-specific intermediate analyses and development artifacts are intentionally excluded from the public repository.

Package Architecture

The computational framework is implemented as a Python package using a src layout.

src/superinformation/

Module Purpose
entropy.py Shannon entropy calculation and entropy profiling
superinformation.py Superinformation computation and entropy distribution analysis
cis.py CIS analysis
geometry.py Distance analysis, clustering, PCA, and UMAP

Dependencies

The framework is implemented in Python 3.10+ and relies on commonly used scientific computing libraries, including NumPy, pandas, SciPy, scikit-learn, UMAP, matplotlib, and Biopython.

Complete dependency information is provided in requirements.txt and pyproject.toml.


Installation

Clone the repository and create a virtual environment:

git clone https://github.com/sarvezh1/superinformation.git
cd superinformation
python -m venv .venv

Activate the environment.

Linux / macOS

source .venv/bin/activate

Windows

.venv\Scripts\activate

Install the package and its dependencies:

pip install -e .

For development and testing:

pip install -e ".[dev]"

Quick Start

Import the package:

from superinformation import (
    compute_entropy_profile,
    compute_superinformation,
    compute_cis,
    compute_pca,
)

A typical workflow consists of:

  1. computing entropy profiles from genomic sequences;
  2. calculating Superinformation;
  3. analysing CIS;
  4. comparing Sequence Ontology features using geometric analyses; and
  5. interpreting or validating the resulting outputs.

Complete executable examples are provided in the examples/ directory.

The full demonstration workflow can be run with:

python examples/05_complete_workflow.py

Individual stages can also be executed independently using the corresponding example scripts.


Testing

The repository includes unit and regression tests covering the core scientific modules and executable example workflows.

Install the development dependencies and run the complete test suite with:

pip install -e ".[dev]"
pytest

Version 1.0.0 contains 54 tests covering entropy analysis, Superinformation computation, Characteristic Information Scale (CIS) analysis, geometry workflows, and the executable examples.

Test coverage can be evaluated with:

pytest --cov=superinformation --cov-report=term-missing

The v1.0.0 release achieves 85% overall line coverage, with the public computational API covered by behavioural tests.

Continuous integration is configured through GitHub Actions to run the test suite automatically on repository updates.


Computational Workflow

The framework follows a modular workflow in which each stage performs a well-defined computational task. Outputs generated by one stage can serve as inputs for subsequent analyses, allowing individual components to be used independently or as part of a complete analysis pipeline.

Stage Description
Entropy Compute block-wise Shannon entropy profiles from genomic sequences.
Superinformation Quantify the distribution of entropy values using the Superinformation measure.
CIS Estimate the B50 Characteristic Information Scale and summarize its variation across Sequence Ontology features and species.
Geometry Compare features using distance metrics, hierarchical clustering, principal component analysis (PCA), and Uniform Manifold Approximation and Projection (UMAP).

Each stage is implemented as an independent module to promote modularity, reproducibility, and reuse.


Results

Representative outputs generated by the framework are provided within the results/ directory.

These include summary tables, representative analyses, figure panels, and sample outputs illustrating the expected structure and behaviour of the computational workflows.

results/
├── README.md
├── figures/
├── sample_outputs/
└── tables/

Large intermediate files, temporary analysis products, and computational caches are intentionally excluded from the repository. Representative outputs are provided to document the expected structure and behaviour of the computational workflows.

See results/README.md for additional information about the included outputs.


Documentation

Documentation is distributed across the repository according to purpose:

Resource Purpose
README.md Framework overview, installation, usage, and scientific context
examples/README.md Guidance for running the example workflows
results/README.md Description of representative outputs, tables, and figures
data/README.md Data availability and repository data policy
docs/README.md Additional project documentation
paper/README.md Manuscript-related materials
supplementary/README.md Supplementary material associated with the study

Citation

If you use this repository in academic work, please cite both the accompanying manuscript describing the framework and the original publication introducing the Superinformation measure.

Original Superinformation Method

R. Bose and S. Chouhan. Alternate Measure of Information Useful for DNA Sequences. Physical Review E, 83, 051918 (2011).

Superinformation Framework

Citation details for the accompanying manuscript will be added upon publication.

Software archive

Superinformation v1.0.0 is permanently archived on Zenodo:

DOI: 10.5281/zenodo.21757934

For citation metadata, see CITATION.cff.


Contributing

Bug reports, feature requests, and suggestions for improvements are welcome through the GitHub issue tracker.

Contributions should preserve the modular design of the framework and include appropriate documentation and testing where applicable.


License

This project is distributed under the MIT License.

See the LICENSE file for the complete license text.


Repository Status

Version 1.0.0 represents the first stable public release of the Superinformation framework.

The repository includes:

  • reusable scientific methods implemented as a Python package;
  • executable example workflows;
  • representative results, tables, and figures;
  • automated tests and continuous integration; and
  • supporting documentation for the computational framework.

Future development will prioritise compatibility with the computational methods described in the accompanying manuscript.

About

A multiscale information-theoretic framework for quantifying genomic sequence organization across Sequence Ontology features.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages