# roshchupkin/hase architecture

> Architecture diagram of the GitHub repository roshchupkin/hase, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/roshchupkin/hase
- Repository: https://github.com/roshchupkin/hase

## Overview

a. Input Flow (Left side)
- Raw Data Input → Data Converters
- Supported formats (VCF, CSV, etc.)

b. Processing Flow (Center)
- Data Loading → Processing → Results
- Chunked processing (5000 SNPs chunks as mentioned)

c. Output Flow (Right side)
- Results Generation
- Statistical Output

##### Key Technical Elements to Highlight

a. Dependencies (Use a side panel)
- HDF5
- BLAS/LAPACK
- Python Scientific Stack (numpy, scipy, pandas)

- Parallel Processing Capabilities
- Chunked Data Processing
- High-dimensional Analysis

##### Additional Elements

- Version Information
- System Requirements
- External Dependencies
- Scale Indicators (for data handling capacity)

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef tools fill:#e67e22,stroke:#d35400,color:white
    classDef storage fill:#9b59b6,stroke:#8e44ad,color:white
    classDef input fill:#2ecc71,stroke:#27ae60,color:white
    classDef output fill:#e74c3c,stroke:#c0392b,color:white
    classDef dep fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Main Application
    MA["Main Application"]:::core
    click MA "https://github.com/roshchupkin/hase/blob/master/hase.py"
    CF["Configuration"]:::core
    click CF "https://github.com/roshchupkin/hase/blob/master/config.py"

    subgraph Core["Core Processing Layer"]
        DH["Data Handler"]:::core
        click DH "https://github.com/roshchupkin/hase/blob/master/hdgwas/data.py"
        RE["Regression Engine"]:::core
        click RE "https://github.com/roshchupkin/hase/blob/master/hdgwas/regression.py"
        PH["Protocol Handler"]:::core
        click PH "https://github.com/roshchupkin/hase/blob/master/hdgwas/protocol.py"
        HM["Hash Management"]:::core
        click HM "https://github.com/roshchupkin/hase/blob/master/hdgwas/hash.py"
        DC["Data Converter"]:::core
        click DC "https://github.com/roshchupkin/hase/blob/master/hdgwas/converter.py"
    end

    subgraph Tools["Tools Layer"]
        VCF["VCF2hdf5"]:::tools
        click VCF "https://github.com/roshchupkin/hase/blob/master/tools/VCF2hdf5.py"
        M2H["minimac2hdf5"]:::tools
        click M2H "https://github.com/roshchupkin/hase/blob/master/tools/minimac2hdf5.py"
        PIT["Probe Info Tools"]:::tools
        click PIT "https://github.com/roshchupkin/hase/blob/master/tools/addProbesInfo.py"
        AT["Analysis Tools"]:::tools
        click AT "https://github.com/roshchupkin/hase/blob/master/tools/analyzer.py"
        MT["Mapping Tools"]:::tools
        click MT "https://github.com/roshchupkin/hase/blob/master/tools/mapper.py"
    end

    subgraph Storage["Data Storage Layer"]
        GS["Genotype Storage"]:::storage
        click GS "https://github.com/roshchupkin/hase/tree/master/test/ExampleStudy/examplestudy/genotype/"
        PS["Phenotype Storage"]:::storage
        click PS "https://github.com/roshchupkin/hase/tree/master/test/ExampleStudy/phenotype/"
        CS["Covariate Storage"]:::storage
        click CS "https://github.com/roshchupkin/hase/tree/master/test/ExampleStudy/covariates/"
        IS["Individual Storage"]:::storage
        click IS "https://github.com/roshchupkin/hase/tree/master/test/ExampleStudy/examplestudy/individuals/"
        PDS["Probe Storage"]:::storage
        click PDS "https://github.com/roshchupkin/hase/tree/master/test/ExampleStudy/examplestudy/probes/"
    end

    subgraph Dependencies["External Dependencies"]
        HDF["HDF5"]:::dep
        BLAS["BLAS/LAPACK"]:::dep
        PSS["Python Scientific Stack"]:::dep
    end

    %% Input/Output
    RDI[/"Raw Data Input"/]:::input
    RES[\"Results Output"\]:::output

    %% Relationships
    MA --> CF
    RDI --> Tools
    Tools --> Core
    Core --> Storage
    Storage --> Core
    Core --> RES
    Dependencies --> Core

    %% Legend
    subgraph Legend
        L1["Core Component"]:::core
        L2["Tool Component"]:::tools
        L3["Storage Component"]:::storage
        L4[/"Input"/]:::input
        L5[\"Output"\]:::output
        L6["Dependency"]:::dep
    end
```
