# 05 Node Details Logic

## Quick Answer
Node Details combines molecular summary, EV evidence, localization, pathway memberships, disease context, and optional miRNA annotation (sequence/exomotif).

## What this does
Documents per-node content shown in Summary, Localization, EV Evidence, Pathways, and Disease panels.

## Inputs
- Node ID and type (`miRNA`, `Gene`, `Protein`)
- Related evidence tables
- Optional RNAcentral annotation lookup for miRNA

## Outputs
- Evidence tables with source and publication links
- EV relevance tags and counts
- miRNA annotation fields: sequence length, motif matches, status
- Persistent quick-stats row above node sub-tabs (type + EV/pathway/disease/LR counts with tab-jump shortcuts)
- EV source bar chart click-filter behavior for narrowing node-level EV evidence tables
- Protein-centric PPI summaries:
  - right-panel one-hop interaction tree,
  - per-row score bar and channel badges to make relative strength/readout clearer,
  - overlay partners are positioned in rings and re-laid with a local concentric layout to avoid overlap,
  - overlay partner nodes are not individually draggable; dragging the central protein moves the overlay group,
  - in-panel `Show On Graph` overlay toggle with explicit ON/OFF status,
  - optional modal PPI network view,
  - STRING evidence channel scores per interaction

## How calculated
Backend joins node identifiers to evidence/pathway/disease tables. EV evidence lookup uses the node ID and, for gene nodes, also checks the linked UniProt protein ID plus any protein aliases in `molecule_summary_data` so evidence stored under protein identifiers is still surfaced in the gene view. For miRNA annotation, local cache is checked first; missing entries may be fetched from RNAcentral and cached. Exomotif matches use configured rule patterns.
For protein nodes, PPI rows are fetched from STRING-derived interactions and ranked by `combined_score`. The right-panel tree applies a UI threshold and view cap for readability; exports include both full and visible slices. When `Show On Graph` is enabled, EVd3x projects one-hop partners onto the main Cytoscape graph (top-capped for readability). Turning overlay off or using clear removes only overlay-inserted nodes/edges and keeps the base analysis graph intact.

## What to download
Node-specific exports include summary and annotation fields (for example sequence, motif status, annotation status). PPI context is exported under:
- `09_ppi_analysis/ppi_tree_full.csv`
- `09_ppi_analysis/ppi_tree_view.csv`

## Known limits
Sequence availability depends on source coverage and cache state. `annotation_status` should be reported with any downstream interpretation.
PPI tree is intentionally one-hop in the UI. It is optimized for interactive interpretation, not for full interactome exploration. If a row points to a partner not yet present in the base graph, use `Show On Graph` to materialize that partner directly in context.
