# some-earth-2514/gnps_local architecture

> Architecture diagram of the GitHub repository some-earth-2514/gnps_local, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/some-earth-2514/gnps_local
- Repository: https://github.com/some-earth-2514/gnps_local

## Overview

GNPS Local is a single-user, offline metabolomics analysis application. A researcher uploads MS/MS spectra and, for FBMN, a feature-quantification table through the local API; the runner manages jobs and executes workflow code that produces molecular networks and library annotations. The tree also documents molecular networking, GC-MS processing, and library conversion capabilities. Workflow wiring beyond the sampled API and excerpts is inferred from names and the README, so uncertain internal processing links are omitted.

Main entry points: [`local_runner/orchestrator.py`](https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/orchestrator.py) (Job manager), [`local_runner/app.py`](https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/app.py) (HTTP API), [`local_runner/workflows/fbmn.py`](https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/workflows/fbmn.py) (FBMN), [`local_runner/workflows/molecular_networking.py`](https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/workflows/molecular_networking.py) (Molecular networking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Local interface"]
  node_api["HTTP API<br/>[app.py]"]
end

subgraph group_execution["Job execution"]
  node_job_manager["Job manager<br/>[orchestrator.py]"]
  node_job_files["Job files<br/>[orchestrator.py]"]
end

subgraph group_analysis["Analysis workflows"]
  node_fbmn["FBMN<br/>[fbmn.py]"]
  node_molecular_networking["Molecular networking"]
  node_mcn["Molecular networking &#40;MCN&#41;<br/>[mcn.py]"]
  node_gc_workflow["GC-MS workflow<br/>[mshub_gc.py]"]
  node_library_annotations["Library annotations"]
end

subgraph group_capabilities["Supporting capabilities"]
  node_fbmn_tools["FBMN processing"]
  node_legacy_networking["Network outputs"]
  node_library_conversion["Library conversion"]
  node_gc_processing["GC-MS processing"]
end

node_researcher(("Researcher"))

node_researcher -->|"submits data"| node_api
node_api -->|"submits jobs"| node_job_manager
node_api -->|"queries status"| node_job_manager
node_job_manager -->|"stores job data"| node_job_files
node_job_manager -->|"dispatches FBMN"| node_fbmn
node_job_manager -->|"dispatches workflow"| node_molecular_networking
node_job_manager -->|"dispatches workflow"| node_mcn
node_job_manager -->|"dispatches workflow"| node_gc_workflow
node_job_manager -->|"dispatches workflow"| node_library_annotations
node_fbmn -->|"uses processing"| node_fbmn_tools
node_gc_workflow -->|"uses processing"| node_gc_processing
node_molecular_networking -.->|"uses networking tools"| node_legacy_networking
node_mcn -.->|"uses networking tools"| node_legacy_networking
node_library_annotations -.->|"optional conversion"| node_library_conversion
node_job_manager -->|"returns job results"| node_api

click node_api "https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/app.py"
click node_job_manager "https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/orchestrator.py"
click node_job_files "https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/orchestrator.py"
click node_fbmn "https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/workflows/fbmn.py"
click node_molecular_networking "https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/workflows/molecular_networking.py"
click node_mcn "https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/workflows/mcn.py"
click node_gc_workflow "https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/workflows/mshub_gc.py"
click node_library_annotations "https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/workflows/getGNPS_library_annotations_local.py"
click node_fbmn_tools "https://github.com/some-earth-2514/gnps_local/tree/main/feature-based-molecular-networking/tools/feature-based-molecular-networking/scripts"
click node_legacy_networking "https://github.com/some-earth-2514/gnps_local/tree/main/metabolomics-snets-v2/tools/metabolomicsnetsv2/scripts"
click node_library_conversion "https://github.com/some-earth-2514/gnps_local/tree/main/library_conversion/tools/library_conversion/bin"
click node_gc_processing "https://github.com/some-earth-2514/gnps_local/tree/main/mshub-gc/tools/mshub-gc/proc"

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_api toneBlue
class node_job_manager,node_job_files toneAmber
class node_fbmn,node_molecular_networking,node_mcn,node_gc_workflow,node_library_annotations toneMint
class node_fbmn_tools,node_legacy_networking,node_library_conversion,node_gc_processing toneRose
class node_researcher toneIndigo
```

## Components

### Local interface

- [HTTP API](https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/app.py): `local_runner/app.py`

### Job execution

- [Job manager](https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/orchestrator.py): `local_runner/orchestrator.py`
- [Job files](https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/orchestrator.py): `local_runner/orchestrator.py`

### Analysis workflows

- [FBMN](https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/workflows/fbmn.py): `local_runner/workflows/fbmn.py`
- [Molecular networking](https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/workflows/molecular_networking.py): `local_runner/workflows/molecular_networking.py`
- [Molecular networking (MCN)](https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/workflows/mcn.py): `local_runner/workflows/mcn.py`
- [GC-MS workflow](https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/workflows/mshub_gc.py): `local_runner/workflows/mshub_gc.py`
- [Library annotations](https://github.com/some-earth-2514/gnps_local/blob/main/local_runner/workflows/getGNPS_library_annotations_local.py): `local_runner/workflows/getGNPS_library_annotations_local.py`

### Supporting capabilities

- [FBMN processing](https://github.com/some-earth-2514/gnps_local/tree/main/feature-based-molecular-networking/tools/feature-based-molecular-networking/scripts): `feature-based-molecular-networking/tools/feature-based-molecular-networking/scripts`
- [Network outputs](https://github.com/some-earth-2514/gnps_local/tree/main/metabolomics-snets-v2/tools/metabolomicsnetsv2/scripts): `metabolomics-snets-v2/tools/metabolomicsnetsv2/scripts`
- [Library conversion](https://github.com/some-earth-2514/gnps_local/tree/main/library_conversion/tools/library_conversion/bin): `library_conversion/tools/library_conversion/bin`
- [GC-MS processing](https://github.com/some-earth-2514/gnps_local/tree/main/mshub-gc/tools/mshub-gc/proc): `mshub-gc/tools/mshub-gc/proc`

### Other components

- **Researcher**

## Connections

- Researcher → HTTP API: submits data
- HTTP API → Job manager: submits jobs
- HTTP API → Job manager: queries status
- Job manager → Job files: stores job data
- Job manager → FBMN: dispatches FBMN
- Job manager → Molecular networking: dispatches workflow
- Job manager → Molecular networking (MCN): dispatches workflow
- Job manager → GC-MS workflow: dispatches workflow
- Job manager → Library annotations: dispatches workflow
- FBMN → FBMN processing: uses processing
- GC-MS workflow → GC-MS processing: uses processing
- Molecular networking → Network outputs: uses networking tools
- Molecular networking (MCN) → Network outputs: uses networking tools
- Library annotations → Library conversion: optional conversion
- Job manager → HTTP API: returns job results
