# zahrasattari-hub/volcano_plot_analysis architecture

> Architecture diagram of the GitHub repository zahrasattari-hub/volcano_plot_analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zahrasattari-hub/volcano_plot_analysis
- Repository: https://github.com/zahrasattari-hub/volcano_plot_analysis

## Overview

1. This repository is a single-purpose R analysis project for differential protein abundance in secretome samples, centered on generating a volcano plot from hormone-treated vs untreated mammary epithelial cell cultures.

2. The main executable artifact is `Volcano-Plot-Analysis.R`, which contains the end-to-end analysis workflow. There is no multi-service or layered application structure; the architecture is a linear data-analysis pipeline.

3. The primary input data is the Excel workbook `mer_proteins.xlsx`, which contains the proteomics abundance measurements and the sample metadata needed to define treatment groups. That workbook is the external data boundary for the analysis.

4. The workflow begins by importing the protein abundance matrix and using metadata to separate samples into experimental conditions. This is the point where raw experimental data is transformed into analysis-ready inputs.

5. A design matrix is then created to represent the treatment structure. This matrix is the key intermediate artifact that connects the sample metadata to the statistical modeling step.

6. Differential abundance is computed using the `limma` framework. Protein-wise linear models are fitted, followed by empirical Bayes moderation to stabilize variance estimates across proteins, which is the core statistical engine of the repository.

7. The statistical outputs include log2 fold changes, raw p-values, and multiple-testing adjusted p-values for each detected protein. These results form the main analytical output table that downstream classification and visualization depend on.

8. Proteins are categorized into upregulated, downregulated, or not significantly changed groups using predefined fold-change and significance thresholds. This classification step creates the biological interpretation layer on top of the model results.

9. The visualization subsystem produces a volcano plot, using the differential abundance statistics to place proteins by effect size and significance. The plot is the primary presentation artifact for the repository.

10. A small annotation step labels selected proteins of biological interest directly on the figure, making the plot both quantitative and interpretive rather than purely statistical.

11. The only notable project-level tooling visible here is the R project file `volcano_plot_analysis.Rproj`, indicating the repository is meant to be opened and run in RStudio or another R-aware IDE. The image reference in the README shows the expected plot output, `Rplot.jpeg`, as the final deliverable.

12. In architecture terms, the repository is best drawn as: Excel input + metadata → R/limma statistical pipeline → classified differential protein results → annotated volcano plot output. There are no backend APIs, databases, or interactive components beyond the analysis script and generated figure.

Main entry points: [`Volcano-Plot-Analysis.R`](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R) (Volcano plot), [`mer_proteins.xlsx`](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/mer_proteins.xlsx) (Protein data), [`volcano_plot_analysis.Rproj`](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/volcano_plot_analysis.Rproj) (R project), [`README.md`](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/README.md) (README)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Analysis pipeline"]
  node_input_workbook[("Protein data<br/>Excel workbook<br/>[mer_proteins.xlsx]")]
  node_script["Analysis script<br/>R workflow"]
  node_import_transform["Import step<br/>data prep"]
  node_design_matrix["Design matrix<br/>model input"]
  node_limma_model["limma fit<br/>statistical model"]
  node_results_table["Results table<br/>diff abundance"]
  node_classification["Protein classes<br/>thresholding"]
  node_volcano_plot["Volcano plot<br/>visualization"]
  node_annotation["Label proteins<br/>annotation"]
  node_final_image["Plot output<br/>image artifact"]
  node_ide_project["R project<br/>RStudio project"]
  node_readme["README<br/>documentation<br/>[README.md]"]
end

node_input_workbook -->|"source data"| node_import_transform
node_script -->|"drives"| node_import_transform
node_import_transform -->|"builds"| node_design_matrix
node_design_matrix -->|"inputs"| node_limma_model
node_limma_model -->|"emits"| node_results_table
node_results_table -->|"filters"| node_classification
node_results_table -->|"plots"| node_volcano_plot
node_classification -->|"colors"| node_volcano_plot
node_annotation -->|"labels"| node_volcano_plot
node_volcano_plot -->|"renders"| node_final_image
node_ide_project -.->|"opens"| node_script
node_readme -.->|"shows"| node_final_image

click node_input_workbook "https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/mer_proteins.xlsx"
click node_script "https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R"
click node_import_transform "https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R"
click node_design_matrix "https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R"
click node_limma_model "https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R"
click node_results_table "https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R"
click node_classification "https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R"
click node_volcano_plot "https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R"
click node_annotation "https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R"
click node_ide_project "https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/volcano_plot_analysis.Rproj"
click node_readme "https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/README.md"

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_input_workbook,node_script,node_import_transform,node_design_matrix,node_limma_model,node_results_table,node_classification,node_volcano_plot,node_annotation,node_final_image,node_ide_project,node_readme toneBlue
```

## Components

### Analysis pipeline

End-to-end differential protein abundance workflow

- [Protein data](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/mer_proteins.xlsx): Excel workbook · Proteomics abundances and sample metadata · `mer_proteins.xlsx`
- [Analysis script](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R): R workflow · Main executable analysis pipeline · `Volcano-Plot-Analysis.R`
- [Import step](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R): data prep · Loads abundance matrix and separates treatment groups · `Volcano-Plot-Analysis.R`
- [Design matrix](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R): model input · Encodes experimental treatment structure · `Volcano-Plot-Analysis.R`
- [limma fit](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R): statistical model · Linear modeling and empirical Bayes moderation · `Volcano-Plot-Analysis.R`
- [Results table](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R): diff abundance · log2 fold changes, p-values, and adjusted p-values · `Volcano-Plot-Analysis.R`
- [Protein classes](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R): thresholding · Upregulated, downregulated, and not significant groups · `Volcano-Plot-Analysis.R`
- [Volcano plot](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R): visualization · Primary figure combining effect size and significance · `Volcano-Plot-Analysis.R`
- [Label proteins](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/Volcano-Plot-Analysis.R): annotation · Marks selected proteins of interest on the figure · `Volcano-Plot-Analysis.R`
- **Plot output**: image artifact · Rendered volcano plot figure
- [R project](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/volcano_plot_analysis.Rproj): RStudio project · Project entry for running the analysis in an R-aware IDE · `volcano_plot_analysis.Rproj`
- [README](https://github.com/zahrasattari-hub/volcano_plot_analysis/blob/master/README.md): documentation · Describes the analysis and expected output · `README.md`

## Connections

- Protein data → Import step: source data · Workbook provides proteomics measurements and metadata
- Analysis script → Import step: drives · Main script performs the import and preprocessing
- Import step → Design matrix: builds · Treatment metadata is converted into model structure
- Design matrix → limma fit: inputs · Design matrix defines the linear model
- limma fit → Results table: emits · Model fitting produces differential abundance statistics
- Results table → Protein classes: filters · Significance and fold-change thresholds assign protein classes
- Results table → Volcano plot: plots · Statistics are mapped to volcano plot coordinates
- Protein classes → Volcano plot: colors · Regulated groups inform visual emphasis
- Label proteins → Volcano plot: labels · Selected proteins are annotated on the figure
- Volcano plot → Plot output: renders · Plot is saved as the final image artifact
- R project → Analysis script: opens · Project file supports interactive execution in RStudio
- README → Plot output: shows · README references the expected output image
