# rodrigo-lusa/argos_project_mestrado architecture

> Architecture diagram of the GitHub repository rodrigo-lusa/argos_project_mestrado, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rodrigo-lusa/argos_project_mestrado
- Repository: https://github.com/rodrigo-lusa/argos_project_mestrado

## Overview

Mestrado is a research workflow for comparing antimicrobial resistomes in Brazilian clinical isolates and environmental metagenomes under a One Health perspective. The principal path collects and classifies isolate metadata, prepares isolate and MAG inputs, processes genomes and metagenomes, then analyzes ARGOS outputs to annotate resistance and produce comparative figures and tables. The graph preserves the documented assembly, binning, and annotation stages, but their internal wiring is summarized because most pipeline scripts were not sampled.

Main entry points: [`02_metagenomas/scripts`](https://github.com/rodrigo-lusa/argos_project_mestrado/tree/main/02_metagenomas/scripts) (Metagenome assembly and binning), [`03_analise/src/resistome.py`](https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/src/resistome.py) (Resistome annotation), [`03_analise/src/paths.py`](https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/src/paths.py) (Project paths), [`03_analise/scripts/02_shared_genes_upset.py`](https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/scripts/02_shared_genes_upset.py) (Shared-gene comparison)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Isolate collection"]
  node_metadata_process["Metadata processing"]
  node_argos_input["ARGOS input builder"]
  node_classify["Priority classification<br/>[classify.py]"]
  node_isolate_genomes["Isolate genome pipeline"]
end

subgraph group_metagenomes["Metagenome processing"]
  node_metagenome_pipeline["Metagenome assembly and binning"]
  node_metagenome_docs["Workflow guidance"]
end

subgraph group_analysis["Resistome analysis"]
  node_analysis_data[("Analysis parquet data")]
  node_paths["Project paths<br/>[paths.py]"]
  node_resistome["Resistome annotation<br/>[resistome.py]"]
  node_annotate_script["Annotation runner"]
  node_contigs["Contig analysis<br/>[contigs.py]"]
  node_shared_genes["Shared-gene comparison"]
end

subgraph group_outputs["Research outputs"]
  node_poster_figures["Poster figures"]
  node_notebooks["Analysis notebooks"]
  node_research_results["Figures and tables"]
end

node_researcher(("Researcher"))
node_public_data[("BV-BRC / NCBI")]
node_sequencing_data[("Sequencing repositories")]
node_argos[("ARGOS outputs")]

node_researcher -->|"runs"| node_metadata_process
node_public_data -->|"provides metadata"| node_metadata_process
node_metadata_process -->|"prepares metadata"| node_argos_input
node_argos_input -->|"uses rules"| node_classify
node_researcher -->|"runs pipeline"| node_isolate_genomes
node_isolate_genomes -->|"produces annotations"| node_argos
node_sequencing_data -->|"provides reads"| node_metagenome_pipeline
node_researcher -->|"runs workflow"| node_metagenome_pipeline
node_metagenome_pipeline -->|"documented by"| node_metagenome_docs
node_metagenome_pipeline -->|"produces bins and annotations"| node_argos
node_argos -->|"supplies tables"| node_analysis_data
node_annotate_script -->|"gets paths"| node_paths
node_annotate_script -->|"runs annotation"| node_resistome
node_resistome -->|"reads configured data"| node_paths
node_shared_genes -->|"gets paths"| node_paths
node_shared_genes -->|"loads annotations"| node_resistome
node_poster_figures -->|"uses contig scores"| node_contigs
node_contigs -->|"uses configured paths"| node_paths
node_poster_figures -->|"uses resistome logic"| node_resistome
node_researcher -->|"runs analyses"| node_notebooks
node_shared_genes -->|"writes comparisons"| node_research_results
node_poster_figures -->|"writes figures"| node_research_results
node_notebooks -->|"produces results"| node_research_results

click node_metadata_process "https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/01_coleta/scripts/process_metadata.py"
click node_argos_input "https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/01_coleta/scripts/build_argos_input.py"
click node_classify "https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/01_coleta/scripts/classify.py"
click node_isolate_genomes "https://github.com/rodrigo-lusa/argos_project_mestrado/tree/main/01_coleta/genomes_pipeline/scripts"
click node_metagenome_pipeline "https://github.com/rodrigo-lusa/argos_project_mestrado/tree/main/02_metagenomas/scripts"
click node_metagenome_docs "https://github.com/rodrigo-lusa/argos_project_mestrado/tree/main/02_metagenomas"
click node_analysis_data "https://github.com/rodrigo-lusa/argos_project_mestrado/tree/main/03_analise/parquet_data"
click node_paths "https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/src/paths.py"
click node_resistome "https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/src/resistome.py"
click node_annotate_script "https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/scripts/01_annotate_resistome.py"
click node_contigs "https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/src/contigs.py"
click node_shared_genes "https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/scripts/02_shared_genes_upset.py"
click node_poster_figures "https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/scripts/03_poster_figures.py"
click node_notebooks "https://github.com/rodrigo-lusa/argos_project_mestrado/tree/main/03_analise/notebooks"
click node_research_results "https://github.com/rodrigo-lusa/argos_project_mestrado/tree/main/03_analise/results"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_metadata_process,node_argos_input,node_classify,node_isolate_genomes toneBlue
class node_metagenome_pipeline,node_metagenome_docs,node_public_data,node_sequencing_data,node_argos toneAmber
class node_analysis_data,node_paths,node_resistome,node_annotate_script,node_contigs,node_shared_genes toneMint
class node_poster_figures,node_notebooks,node_research_results toneRose
class node_researcher toneIndigo
```

## Components

### Isolate collection

- [Metadata processing](https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/01_coleta/scripts/process_metadata.py): `01_coleta/scripts/process_metadata.py`
- [ARGOS input builder](https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/01_coleta/scripts/build_argos_input.py): `01_coleta/scripts/build_argos_input.py`
- [Priority classification](https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/01_coleta/scripts/classify.py): `01_coleta/scripts/classify.py`
- [Isolate genome pipeline](https://github.com/rodrigo-lusa/argos_project_mestrado/tree/main/01_coleta/genomes_pipeline/scripts): `01_coleta/genomes_pipeline/scripts`

### Metagenome processing

- [Metagenome assembly and binning](https://github.com/rodrigo-lusa/argos_project_mestrado/tree/main/02_metagenomas/scripts): `02_metagenomas/scripts`
- [Workflow guidance](https://github.com/rodrigo-lusa/argos_project_mestrado/tree/main/02_metagenomas): `02_metagenomas`

### Resistome analysis

- [Analysis parquet data](https://github.com/rodrigo-lusa/argos_project_mestrado/tree/main/03_analise/parquet_data): `03_analise/parquet_data`
- [Project paths](https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/src/paths.py): `03_analise/src/paths.py`
- [Resistome annotation](https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/src/resistome.py): `03_analise/src/resistome.py`
- [Annotation runner](https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/scripts/01_annotate_resistome.py): `03_analise/scripts/01_annotate_resistome.py`
- [Contig analysis](https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/src/contigs.py): `03_analise/src/contigs.py`
- [Shared-gene comparison](https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/scripts/02_shared_genes_upset.py): `03_analise/scripts/02_shared_genes_upset.py`

### Research outputs

- [Poster figures](https://github.com/rodrigo-lusa/argos_project_mestrado/blob/main/03_analise/scripts/03_poster_figures.py): `03_analise/scripts/03_poster_figures.py`
- [Analysis notebooks](https://github.com/rodrigo-lusa/argos_project_mestrado/tree/main/03_analise/notebooks): `03_analise/notebooks`
- [Figures and tables](https://github.com/rodrigo-lusa/argos_project_mestrado/tree/main/03_analise/results): `03_analise/results`

### Other components

- **Researcher**
- **BV-BRC / NCBI**
- **Sequencing repositories**
- **ARGOS outputs**

## Connections

- Researcher → Metadata processing: runs (evidence: `01_coleta/scripts/process_metadata.py`)
- BV-BRC / NCBI → Metadata processing: provides metadata (evidence: `01_coleta/scripts/process_metadata.py`)
- Metadata processing → ARGOS input builder: prepares metadata (evidence: `README.md`)
- ARGOS input builder → Priority classification: uses rules (evidence: `01_coleta/scripts/build_argos_input.py`)
- Researcher → Isolate genome pipeline: runs pipeline (evidence: `README.md`)
- Isolate genome pipeline → ARGOS outputs: produces annotations (evidence: `README.md`)
- Sequencing repositories → Metagenome assembly and binning: provides reads (evidence: `README.md`)
- Researcher → Metagenome assembly and binning: runs workflow (evidence: `README.md`)
- Metagenome assembly and binning → Workflow guidance: documented by (evidence: `README.md`)
- Metagenome assembly and binning → ARGOS outputs: produces bins and annotations (evidence: `README.md`)
- ARGOS outputs → Analysis parquet data: supplies tables (evidence: `README.md`)
- Annotation runner → Project paths: gets paths (evidence: `03_analise/scripts/01_annotate_resistome.py`)
- Annotation runner → Resistome annotation: runs annotation (evidence: `03_analise/scripts/01_annotate_resistome.py`)
- Resistome annotation → Project paths: reads configured data (evidence: `03_analise/src/resistome.py`)
- Shared-gene comparison → Project paths: gets paths (evidence: `03_analise/scripts/02_shared_genes_upset.py`)
- Shared-gene comparison → Resistome annotation: loads annotations (evidence: `03_analise/scripts/02_shared_genes_upset.py`)
- Poster figures → Contig analysis: uses contig scores (evidence: `03_analise/scripts/03_poster_figures.py`)
- Contig analysis → Project paths: uses configured paths (evidence: `03_analise/src/contigs.py`)
- Poster figures → Resistome annotation: uses resistome logic (evidence: `03_analise/scripts/03_poster_figures.py`)
- Researcher → Analysis notebooks: runs analyses (evidence: `README.md`)
- Shared-gene comparison → Figures and tables: writes comparisons (evidence: `03_analise/scripts/02_shared_genes_upset.py`)
- Poster figures → Figures and tables: writes figures (evidence: `03_analise/scripts/03_poster_figures.py`)
- Analysis notebooks → Figures and tables: produces results (evidence: `README.md`)
