# 15 Reproducibility and Citation

## Quick Answer
Reproducible EVd3x reporting requires capturing query inputs, parameter settings, module versions, and exported metadata, then citing EVd3x and source methods.

Public repository: <https://github.com/JonathanWeerakkody/EVd3x>

## What this does
Defines a minimal reproducibility checklist for papers and preprints.

## Inputs
- Query strings
- Mode and direction
- Top-N and caps
- Export bundles and manifests

## Outputs
- Methods-ready records for supplementary materials
- Citation pointers for EVd3x and statistical methods
- Deployment runbooks and environment templates for reproducible self-hosting
- Website and command-line checklist for dual-domain VPS hosting

## How calculated
Not computational. This section maps provenance fields (`timestamp`, processing notes, truncation metadata, canonicalization/version tags) to reporting requirements.

## What to download
Archive:
- full CSV bundle
- graph exports
- `citations.bib`
- source manifest files (`docs_index.json`, `manifest.json`)
- deployment artifacts when self-hosting:
  - `infra/dual-app-vps/docker-compose.yml`
  - `infra/dual-app-vps/Caddyfile`
  - `infra/dual-app-vps/DEPLOYMENT.md`
  - env templates (`.env.*.example`)

## Deployment quick path (dual-domain VPS)
Use the exact sequence in `infra/dual-app-vps/DEPLOYMENT.md`. The runbook includes:
- provider console steps (Hetzner project/server creation),
- local key setup and SSH commands,
- VPS bootstrap, Docker Compose startup, and systemd auto-start,
- Squarespace DNS record steps for two custom domains,
- HTTPS verification and cutover/rollback checks.

Required web consoles:
- `https://console.hetzner.com/`
- `https://account.squarespace.com/domains`

## Figure Mode + Methods Snippet (Phase 6)

EVd3x includes a **Figure Mode** toggle (header bar, camera icon) for paper-oriented workflows.

When Figure Mode is active, a **Copy Methods Snippet** button produces a structured text block containing:
- Query, mode, direction, Top-N
- Pathway p-value cutoff and active sources
- Disease canonicalization version and grouping key
- Cell communication scoring method and detail cap (with truncation warning if applicable)
- Selected cell types
- PPI min-score threshold and view cap
- Database credits (ExoCarta, Vesiclepedia, SVAtlas, miRTarBase, TarBase, TargetScan, STRING, KEGG, Reactome, GO, WikiPathways, DisGeNET, ClinVar, OMIM, Orphanet, CellPhoneDB, OmniPath, CellTalkDB, Cellinker)
- Export timestamp

**Workflow:**
1. Run your query in EVd3x.
2. Apply lens filters as needed.
3. Enable Figure Mode → click **Copy Methods Snippet**.
4. Paste into figure legend or supplementary methods.
5. Download the full ZIP bundle. `00_metadata/figure_settings.csv` preserves the same state.

## Minimum reproducibility checklist

For every figure generated in EVd3x, record:

| Field | Where to find |
|---|---|
| Query string | Methods snippet / `session_metadata.csv` |
| Mode (Molecule/Collection) | Methods snippet |
| Direction | Methods snippet |
| Top-N | Methods snippet |
| Pathway p-value cutoff | Methods snippet / `figure_settings.csv` |
| Pathway sources | Methods snippet / `figure_settings.csv` |
| Disease grouping version | Methods snippet / `processing_notes` in manifest |
| Selected cell types | Methods snippet / `figure_settings.csv` |
| Communication scoring method | Methods snippet / `figure_settings.csv` |
| Communication detail cap | Methods snippet / manifest |
| miRNA-target expansion strategy | Methods / Supplementary Table S2 |
| miRNA bridge class and confidence fields | Bridge export / Supplementary Table S7 |
| PPI threshold | Methods snippet / manifest |
| EVd3x version/timestamp | `session_metadata.csv` |
| View truncation | Manifest `is_truncated` fields |

For the Alzheimer manuscript case study, also record the natural-language query, the visible first-pass PSEN1 state, the 25 molecule interactive guard, the expanded target/network-neighbor state, pathway `p <= 0.05` and `q <= 0.10`, and STRING `combined_score >= 700`.

## Known limits
Reproducibility depends on preserving versions of both EVd3x code and underlying parquet data snapshots.
If you deploy multiple services on one VPS, include infrastructure version and domain/DNS cutover timestamp in your methods appendix.
The methods snippet reflects UI state at the time of copy. Always verify against the exported `figure_settings.csv` for archival precision.
