Skip to content

Ines-gpm/genetic-variant-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genetic Variant Management System

A modular Python system for the simulation, storage, prioritization, and analysis of DNA genetic variants, developed as an academic project in Bioinformatics.


Overview

Genetic variant analysis is a core task in modern bioinformatics, particularly in the study of rare diseases, clinical genomics, and personalized medicine. Managing large numbers of variants efficiently requires robust data structures, algorithmic optimization, and well-designed software architecture.

This project implements a complete simulated workflow for handling DNA variants, emphasizing:

  • Efficient data management
  • Priority-based review mechanisms
  • Algorithmic complexity analysis
  • Modular object-oriented design
  • Reproducible simulation of bioinformatics pipelines

The system models how genetic variants might be processed in research or clinical environments, from generation to prioritization and review.


Biological Context

Genetic variants are changes in DNA sequences that may affect gene function. Identifying and prioritizing clinically relevant variants is essential for:

  • Diagnosis of rare genetic diseases
  • Precision medicine
  • Pharmacogenomics
  • Biomedical research

This project uses a simplified impact model based on biological intuition:

  • Variants near the beginning of a sequence may be more disruptive
  • Larger mutations may have greater impact
  • Mutation type affects severity (e.g., deletions vs substitutions)

System Architecture

The system is composed of several modular components, each implemented as a class.

VarianteGenetica

Represents an individual DNA variant.

Attributes:

  • Unique identifier (ID)
  • DNA sequence
  • Mutation type (substitution, insertion, deletion)
  • Position within the genome
  • Length of affected sequence
  • Computed biological impact score

GestorVariantes

Manages collections of variants using two complementary structures:

  • A list → for ordering, iteration, and export
  • A dictionary → for constant-time lookup by ID

ColaPrioritariaRevision

Implements a priority queue where variants with the highest impact are reviewed first, simulating clinical triage.


HistorialRevision

Implements a stack (Last-In, First-Out) to track reviewed variants and allow undo operations.


SimuladorVariantes

Generates synthetic variants for testing, including random DNA sequences, mutation types, positions, and lengths.


AnalizadorEficiencia

Measures execution times of operations and relates them to theoretical complexity.


ReiniciadorSistema

Resets the system to its initial state, clearing stored variants and restarting ID counters.


Biological Impact Model

Variant impact is computed using a simplified scoring formula:

impact = (100 − position) + (length × 2) + mutation_penalty

Where mutation penalties reflect relative severity:

Mutation Type Penalty
Substitution Low
Insertion Medium
Deletion High

This model captures basic biological assumptions without relying on real genomic data.


Example Workflow

A typical execution of the system includes:

  1. Generate a batch of simulated variants
  2. Store variants efficiently
  3. Display current state
  4. Perform fast lookup by ID
  5. Sort variants by impact
  6. Prioritize variants for review
  7. Track reviewed variants
  8. Undo the latest review if needed
  9. Measure algorithm performance
  10. Export results to file
  11. Reset the system

Project Structure

genetic-variant-management-system/
│
├── main.py                     # Entry point
├── README.md
│
├── src/                        # Source code
│   ├── __init__.py
│   ├── genetic_variant.py
│   ├── variant_management.py
│   ├── prioritary_queue.py
│   ├── historial_revision.py
│   ├── variant_simulator.py
│   ├── efficiency_analyzer.py
│   └── system_set_0.py
│
├── examples/                   # Example outputs
│   └── sorted_genetic_variants.txt
│
├── notebook/                   # Original Jupyter notebook
│   └── variant_management.ipynb
│
└── docs/                       # Documentation
    └── report.pdf

How to Run

Requirements

  • Python 3.x
  • No external dependencies required

Run the program

From the project root directory:

python main.py

Example Output

Sample exported results can be found in:

examples/sorted_genetic_variants.txt

Algorithmic Complexity

The system uses efficient structures for different tasks:

Operation Structure Complexity
Search by ID Dictionary O(1)
Sorting variants Timsort O(n log n)
Priority queue insertion Ordered list O(n)
Stack operations List O(1)

Educational Purpose

This project was developed for:

Data Structures and Algorithms — Bachelor’s Degree in Bioinformatics

It demonstrates how classical computer science techniques can be applied to real problems in genomics and biomedical data processing.


Possible Future Improvements

Potential extensions include:

  • Using heapq for more efficient priority queues (O(log n))
  • Supporting real genomic formats (e.g., simplified VCF)
  • Adding persistent storage
  • Implementing a graphical user interface
  • Integrating real biological databases
  • Adding unit tests
  • Parallel processing for large datasets

Author

Inés García de la Peña Marco Undergraduate Student in Bioinformatics


License

This project is intended for academic and educational use.


Acknowledgements

Inspired by real-world challenges in clinical genomics and bioinformatics research.

About

Modular Pyhton system for genetic variant storage, prioritisation and clinical review - OPP design with Big-O justified algorithm choices.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages