mechanochat.tools.crosstalk_analysis#
- mechanochat.tools.crosstalk_analysis(args, input_exp, RecTFDB, TFTGDB)[source]#
Signal-TF-target gene crosstalk inference (SigXTalk) [Hou2025].
A hypergraph neural network is trained on signal-TF-target triplets built from the expression correlations of the two prior networks, and the pathway regulatory strength (PRS) of the predicted triplets is obtained by regressing each target gene on its signals and TFs.
- Parameters:
args (
argparse.Namespace) –Hyperparameters. Fields used here and in the SigXTalk helpers:
device : torch device string, falls back to CPU when CUDA is unavailable
seed : seed for random / numpy / torch, also enables deterministic cuDNN
corr_type : correlation used to score the prior edges
thres : (thres1, thres2) score thresholds for signal-TF and TF-target edges
hgnn_dims, linear_dims : layer widths of the HGNN predictor
train_size, batch_size, lr, epochs : training settings
epoch_output, metrics_output : verbosity flags
input_exp (
pandas.DataFrame) – Expression matrix with cells as rows and genes as columns.RecTFDB (
pandas.DataFrame) – Prior signal -> TF network.TFTGDB (
pandas.DataFrame) – Prior TF -> target gene network.
- Returns:
pred_results (
pandas.DataFrame) – All candidate (Signal, TF, TG) triplets with the predicted score pred_label.importances (
pandas.DataFrame) – Regression importance of the triplets kept (pred_label >= 0.75), with two normalized columns: fidelity (importance divided by the total per target gene) and specificity (importance divided by the total per signal).
References
[Hou2025]Hou, J., Zhao, W. & Nie, Q. Dissecting crosstalk induced by cell-cell communication using single-cell transcriptomic data. Nat Commun 16, 5970 (2025).