Skip to main content

A Python package for integrating biological sequence data with a conceptual HoloToL framework.

Project description

HoloToL Framework Python Package

Overview

The holotol_framework is a Python package designed for integrating biological sequence data from NCBI with a conceptual "HoloToL" (Holographic Tree of Life) framework. It provides tools for:

  • NCBI Data Loading: Efficiently searching and fetching nucleotide sequences from the NCBI database with rate limiting and error handling.
  • Biological Data Processing: Converting raw DNA sequences into numerical features (e.g., nucleotide composition, GC content, dinucleotide frequencies) suitable for analysis.
  • Extended HoloToL Framework: A conceptual framework that models biological species as quantum states, exploring evolutionary dynamics, entanglement, and a "consciousness field" based on biological features.
  • Comprehensive Pipeline: A complete workflow to fetch data for various organisms, process it, load it into the HoloToL framework, and simulate evolutionary dynamics.

This package is intended for research and conceptual exploration of biological systems through a quantum-inspired lens.

Installation

To install the holotol_framework package, follow these steps:

  1. Clone the repository (if you haven't already): ```bash git clone <repository_url> cd holotol-framework-package ``` (Replace <repository_url> with the actual URL of your repository.)

  2. Navigate to the root directory of the package (where setup.py is located).

  3. Install the package using pip: ```bash pip install . ```

This will install the holotol_framework package and all its required dependencies.

Dependencies

The package relies on the following Python libraries:

  • numpy
  • pandas
  • biopython
  • scikit-learn
  • scipy

These will be automatically installed when you run pip install ..

Usage

Running the Comprehensive Pipeline

The package includes a comprehensive pipeline that fetches data, processes it, and runs the HoloToL simulation. You can execute it directly from the command line:

```bash python -m holotol_framework.pipeline ```

Important: Before running, ensure you have set your NCBI email address in the holotol_framework/data_loader.py file. NCBI requires an email for Entrez access.

Using Individual Components

You can also import and use the individual classes and functions in your own Python scripts:

```python from holotol_framework.data_loader import NCBIDataLoader from holotol_framework.data_processor import BiologicalDataProcessor from holotol_framework.framework import ExtendedHoloToLFramework from holotol_framework.pipeline import comprehensive_ncbi_holotol_pipeline

--- Example 1: Run the full pipeline ---

print("Running the comprehensive HoloToL pipeline...") results = comprehensive_ncbi_holotol_pipeline() print("\nPipeline results saved to 'holotol_ncbi_results.json'")

--- Example 2: Using individual components ---

print("\n--- Demonstrating individual components ---")

Initialize data loader (IMPORTANT: Set your NCBI email)

loader = NCBIDataLoader(email="your.email@example.com")

Fetch sequences for a specific organism

print("Fetching sequences for Homo sapiens...") sequences = loader.get_organism_dataset("Homo sapiens", max_sequences=5)

if sequences: # Process sequences into features processor = BiologicalDataProcessor() features, names = processor.process_sequences(sequences)

if features.size > 0:
    print(f"Processed {len(sequences)} sequences into features of shape {features.shape}")

    # Initialize HoloToL framework
    framework = ExtendedHoloToLFramework(num_species=len(sequences))

    # Load biological data into the framework
    framework.load_biological_data(features, names)

    # Run evolutionary simulation
    print("Running quantum evolution simulation...")
    evolution_results = framework.evolutionary_dynamics(time_steps=25)

    print("\nSimulation complete. Final entropy:", evolution_results['entropy_history'][-1])
    print("Final consciousness complexity:", framework.calculate_complexity())
else:
    print("No valid features extracted.")

else: print("No sequences found for Homo sapiens.") ```

Important Notes

  • NCBI Email: You must set your email address in the NCBIDataLoader class (located in holotol_framework/data_loader.py) for NCBI Entrez access. This is a requirement from NCBI. ```python

    In holotol_framework/data_loader.py

    Entrez.email = "your.email@example.com" # <--- CHANGE THIS ```
  • Rate Limiting: The NCBIDataLoader includes a rate limit to comply with NCBI's usage policies. Do not modify this unless you understand the implications.
  • Conceptual Framework: The "HoloToL" framework is a conceptual model. Its quantum mechanics and consciousness aspects are theoretical constructs for exploring biological data.

License

This project is open-sourced under the MIT License. See the LICENSE file for more details.

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

holotol_framework-0.1.4.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

holotol_framework-0.1.4-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file holotol_framework-0.1.4.tar.gz.

File metadata

  • Download URL: holotol_framework-0.1.4.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for holotol_framework-0.1.4.tar.gz
Algorithm Hash digest
SHA256 7b1ddbc91b4ddb12bc2f6b05d92980e6827d2a362afebf448fdde45b07a6ce5f
MD5 130881f8fbc7aff5d5d36d415db29d0c
BLAKE2b-256 048a6b63858461b80c6708b5600ad99d01dcfd02049894f958e9476a13cec60d

See more details on using hashes here.

File details

Details for the file holotol_framework-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for holotol_framework-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9a78cc14c92cb1019ced84e181a8d4c3d412a2861b2e2f4229f0770a9d2e25b2
MD5 825488d994da6111e7c852d70c815f3c
BLAKE2b-256 72fdad2796bc11ec735b26fbe6674992f1e71d32310cca1003ce7acdd0133f41

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