prepare_ligand_receptor_visualization: Prepare ligand-receptor visualization

View source: R/application_prediction.R

prepare_ligand_receptor_visualizationR Documentation

Prepare ligand-receptor visualization

Description

prepare_ligand_receptor_visualization Prepare a matrix of ligand-receptor interactions for visualization.

Usage

prepare_ligand_receptor_visualization(
  lr_network_top_df_long,
  best_upstream_ligands,
  order_hclust = "both"
)

Arguments

lr_network_top_df_long

A data frame with three columns, from, to and weight, containing the ligand-receptor interactions and their weights.

best_upstream_ligands

Character vector of ligands of interest. This will only be used if order_hclust = "receptors" or order_hclust = "none".

order_hclust

"both", "ligands", "receptors", or "none". If "both", the ligands and receptors are ordered by hierarchical clustering. If "ligands" or "receptors" only the ligands or receptors are ordered hierarchically. If "none", no hierarchical clustering is performed, and the ligands are ordered based on best_upstream_ligands, and the receptors are ordered alphabetically.

Value

A matrix of ligand-receptor interactions for visualization.

Examples

## Not run: 
ligand_receptor_network = prepare_ligand_receptor_visualization(best_upstream_ligands = best_upstream_ligands, expressed_receptors = expressed_receptors, lr_network = lr_network, weighted_networks_lr_sig = weighted_networks_lr_sig, order_hclust = TRUE)

## End(Not run)


browaeysrobin/nichenetr documentation built on Sept. 9, 2024, 11:25 a.m.