# egtortuero/viga architecture

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

- Interactive diagram: https://gitdiagram.com/egtortuero/viga
- Repository: https://github.com/egtortuero/viga

## Overview

##### Main Components

a) Input Processing Layer:
- FASTA file input handler
- Modifiers text file processor

b) Core Processing Pipeline:
- RNA Detection Module:
- tRNA detection (ARAGORN)
- rRNA and ncRNA detection (INFERNAL with RFAM)
- CRISPR detection (PILERCR)

c) Protein Analysis Pipeline:
- ORF Prediction Module:
- Prodigal/MetaProdigal
- Prodigal-GV (alternative)
- Protein Function Prediction Module:
- DIAMOND pipeline
- BLAST pipeline
- HMMER/pyHMMER pipeline

d) Database Integration Layer:
- RFAM database
- RefSeq Viral Proteins
- PVOGs
- RVDB
- VOGs

e) Output Generation Layer:
- GFF format output
- Sequence annotation output

**[Input Layer]**
- ↓
**[Pre-processing]**
- ↓
**[Parallel Processing Pipelines]**
- ↓
**[Integration Layer]**
- ↓
**[Output Generation]**

##### Technical Details

- Input file format specifications
- Database format requirements
- Threading configuration
- Tool version dependencies
- Output format specifications

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and classes
    classDef input fill:#b3d9ff,stroke:#333
    classDef processing fill:#90EE90,stroke:#333
    classDef database fill:#FFE5B4,stroke:#333
    classDef thirdparty fill:#FFA07A,stroke:#333
    classDef output fill:#b3d9ff,stroke:#333
    classDef pipeline fill:#DDA0DD,stroke:#333

    %% Input Layer
    subgraph Input
        FASTA[FASTA Input]:::input
        MOD[Modifiers File]:::input
    end

    %% Core Pipeline
    VIGA[VIGA Pipeline]:::processing
    click VIGA "https://github.com/EGTortuero/viga/blob/master/VIGA.py"

    %% Installation & Setup
    INSTALL[System Installation]:::processing
    click INSTALL "https://github.com/EGTortuero/viga/blob/master/install.sh"
    DB_SETUP[Database Setup]:::processing
    click DB_SETUP "https://github.com/EGTortuero/viga/blob/master/create_dbs.sh"
    DOCS[Documentation]:::processing
    click DOCS "https://github.com/EGTortuero/viga/blob/master/README.md"

    %% Core Processing Modules
    subgraph Processing
        SHAPE[Contig Shape Prediction]:::processing
        RNA_DETECT[RNA Detection]:::processing
        PROTEIN[Protein Analysis]:::processing
    end

    %% RNA Detection Pipeline
    subgraph RNA_Pipeline
        TRNA[tRNA Detection<br>ARAGORN]:::thirdparty
        RRNA[rRNA/ncRNA Detection<br>INFERNAL]:::thirdparty
        CRISPR[CRISPR Detection<br>PILERCR]:::thirdparty
    end

    %% Protein Analysis Pipeline
    subgraph Protein_Pipeline
        ORF[ORF Prediction]:::processing
        FUNC[Function Prediction]:::processing
        
        subgraph ORF_Tools
            PRODIGAL[Prodigal/MetaProdigal]:::thirdparty
            PRODIGAL_GV[Prodigal-GV]:::thirdparty
        end
        
        subgraph Function_Tools
            DIAMOND[DIAMOND]:::thirdparty
            BLAST[BLAST]:::thirdparty
            HMMER[HMMER/pyHMMER]:::thirdparty
        end
    end

    %% Databases
    subgraph Databases
        RFAM[RFAM]:::database
        REFSEQ[RefSeq Viral]:::database
        PVOGS[PVOGs]:::database
        RVDB[RVDB]:::database
        VOGS[VOGs]:::database
    end

    %% Output Layer
    subgraph Output
        GFF[GFF Format]:::output
        SEQ_ANN[Sequence Annotations]:::output
    end

    %% Relationships
    FASTA & MOD --> VIGA
    VIGA --> Processing
    INSTALL --> VIGA
    DB_SETUP --> Databases
    
    SHAPE & RNA_DETECT & PROTEIN --> RNA_Pipeline
    RNA_DETECT --> RNA_Pipeline
    
    PROTEIN --> Protein_Pipeline
    ORF --> ORF_Tools
    FUNC --> Function_Tools
    
    RNA_Pipeline --> Output
    Protein_Pipeline --> Output
    
    RFAM -.-> RNA_Pipeline
    REFSEQ & PVOGS & RVDB & VOGS -.-> Function_Tools

    %% Legend
    subgraph Legend
        L1[Input/Output]:::input
        L2[Processing]:::processing
        L3[Database]:::database
        L4[Third-party Tool]:::thirdparty
        L5[Pipeline]:::pipeline
    end
```
