# costalab/crosstalker architecture

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

- Interactive diagram: https://gitdiagram.com/costalab/crosstalker
- Repository: https://github.com/costalab/crosstalker

## Overview

CrossTalkeR is an R framework for analyzing and visualizing ligand–receptor communication, especially changes between biological conditions. The user workflow is to provide communication results, run analysis, and inspect network, ranking, statistical, and pathway visualizations; report generation can be performed separately on existing results. The README documents these capabilities, but no runtime R source was excerpted, so internal call ownership and links between analysis stages cannot be verified. Subsystem paths below identify relevant files from the tree, not inspected implementations.

Main entry points: [`R/generate_report.R`](https://github.com/costalab/crosstalker/blob/master/R/generate_report.R) (Analyze LR)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Communication analysis"]
  node_analyze["Analyze LR<br/>[generate_report.R]"]
  node_single["Single condition<br/>[single_condition.R]"]
  node_comparative["Comparative conditions"]
  node_report["Report generation<br/>[generate_report.R]"]
end

subgraph group_network["Network statistics"]
  node_cci["Cell communication"]
  node_gci["Cell-gene communication"]
  node_fisher["Fisher filtering"]
  node_rankings["Network rankings"]
end

subgraph group_visuals["Visual analysis"]
  node_plots["Network plots<br/>[plot.R]"]
  node_heatmap["Heatmaps<br/>[plot.R]"]
  node_volcano["Volcano plots<br/>[plot.R]"]
  node_pca["PCA rankings<br/>[plot.R]"]
  node_sankey["Sankey plots<br/>[plot.R]"]
end

subgraph group_extensions["Analysis extensions"]
  node_progeny["PROGENy enrichment"]
  node_tf["TF signaling"]
  node_liana["LIANA+ results"]
  node_scseqcomm["scSeqComm results"]
end

node_user(("Analyst"))
node_lr_input["LR results"]

node_user -->|"provides"| node_lr_input
node_user -->|"runs analysis"| node_analyze
node_analyze -->|"separate report"| node_report
node_user -->|"generates report"| node_report
node_lr_input -->|"analyzes results"| node_analyze
node_liana -.->|"compatible input"| node_analyze
node_scseqcomm -.->|"compatible input"| node_analyze

click node_analyze "https://github.com/costalab/crosstalker/blob/master/R/generate_report.R"
click node_single "https://github.com/costalab/crosstalker/blob/master/R/single_condition.R"
click node_comparative "https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R"
click node_report "https://github.com/costalab/crosstalker/blob/master/R/generate_report.R"
click node_cci "https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R"
click node_gci "https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R"
click node_fisher "https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R"
click node_rankings "https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R"
click node_plots "https://github.com/costalab/crosstalker/blob/master/R/plot.R"
click node_heatmap "https://github.com/costalab/crosstalker/blob/master/R/plot.R"
click node_volcano "https://github.com/costalab/crosstalker/blob/master/R/plot.R"
click node_pca "https://github.com/costalab/crosstalker/blob/master/R/plot.R"
click node_sankey "https://github.com/costalab/crosstalker/blob/master/R/plot.R"
click node_progeny "https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R"
click node_tf "https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R"

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_analyze,node_single,node_comparative,node_report toneBlue
class node_cci,node_gci,node_fisher,node_rankings toneAmber
class node_plots,node_heatmap,node_volcano,node_pca,node_sankey toneMint
class node_progeny,node_tf,node_liana,node_scseqcomm toneRose
class node_user,node_lr_input toneIndigo
```

## Components

### Communication analysis

- [Analyze LR](https://github.com/costalab/crosstalker/blob/master/R/generate_report.R): `R/generate_report.R`
- [Single condition](https://github.com/costalab/crosstalker/blob/master/R/single_condition.R): `R/single_condition.R`
- [Comparative conditions](https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R): `R/comparative_condition.R`
- [Report generation](https://github.com/costalab/crosstalker/blob/master/R/generate_report.R): `R/generate_report.R`

### Network statistics

- [Cell communication](https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R): `R/comparative_condition.R`
- [Cell-gene communication](https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R): `R/comparative_condition.R`
- [Fisher filtering](https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R): `R/comparative_condition.R`
- [Network rankings](https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R): `R/comparative_condition.R`

### Visual analysis

- [Network plots](https://github.com/costalab/crosstalker/blob/master/R/plot.R): `R/plot.R`
- [Heatmaps](https://github.com/costalab/crosstalker/blob/master/R/plot.R): `R/plot.R`
- [Volcano plots](https://github.com/costalab/crosstalker/blob/master/R/plot.R): `R/plot.R`
- [PCA rankings](https://github.com/costalab/crosstalker/blob/master/R/plot.R): `R/plot.R`
- [Sankey plots](https://github.com/costalab/crosstalker/blob/master/R/plot.R): `R/plot.R`

### Analysis extensions

- [PROGENy enrichment](https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R): `R/comparative_condition.R`
- [TF signaling](https://github.com/costalab/crosstalker/blob/master/R/comparative_condition.R): `R/comparative_condition.R`
- **LIANA+ results**
- **scSeqComm results**

### Other components

- **Analyst**
- **LR results**

## Connections

- Analyst → LR results: provides (evidence: `README.md`)
- Analyst → Analyze LR: runs analysis (evidence: `README.md`)
- Analyze LR → Report generation: separate report (evidence: `README.md`)
- Analyst → Report generation: generates report (evidence: `README.md`)
- LR results → Analyze LR: analyzes results (evidence: `README.md`)
- LIANA+ results → Analyze LR: compatible input (evidence: `README.md`)
- scSeqComm results → Analyze LR: compatible input (evidence: `README.md`)
