predict_ligand_activities: Predict activities of ligands in regulating expression of a...

View source: R/application_prediction.R

predict_ligand_activitiesR Documentation

Predict activities of ligands in regulating expression of a gene set of interest

Description

predict_ligand_activities Predict activities of ligands in regulating expression of a gene set of interest. Ligand activities are defined as how well they predict the observed transcriptional response (i.e. gene set) according to the NicheNet model.

Usage

predict_ligand_activities(geneset, background_expressed_genes,ligand_target_matrix, potential_ligands, single = TRUE,...)

Arguments

geneset

Character vector of the gene symbols of genes of which the expression is potentially affected by ligands from the interacting cell.

background_expressed_genes

Character vector of gene symbols of the background, non-affected, genes (can contain the symbols of the affected genes as well).

ligand_target_matrix

The NicheNet ligand-target matrix denoting regulatory potential scores between ligands and targets (ligands in columns).

potential_ligands

Character vector giving the gene symbols of the potentially active ligands you want to define ligand activities for.

single

TRUE if you want to calculate ligand activity scores by considering every ligand individually (recommended). FALSE if you want to calculate ligand activity scores as variable importances of a multi-ligand classification model.

...

Additional parameters for get_multi_ligand_importances if single = FALSE.

Value

A tibble giving several ligand activity scores. Following columns in the tibble: $test_ligand, $auroc, $aupr and $pearson.

Examples

## Not run: 
weighted_networks = construct_weighted_networks(lr_network, sig_network, gr_network,source_weights_df)
ligands = list("TNF","BMP2","IL4")
ligand_target_matrix = construct_ligand_target_matrix(weighted_networks, ligands, ltf_cutoff = 0, algorithm = "PPR", damping_factor = 0.5, secondary_targets = FALSE)
potential_ligands = c("TNF","BMP2","IL4")
geneset = c("SOCS2","SOCS3", "IRF1")
background_expressed_genes = c("SOCS2","SOCS3","IRF1","ICAM1","ID1","ID2","ID3")
ligand_activities = predict_ligand_activities(geneset = geneset, background_expressed_genes = background_expressed_genes, ligand_target_matrix = ligand_target_matrix, potential_ligands = potential_ligands)

## End(Not run)


saeyslab/nichenetr documentation built on March 26, 2024, 9:22 a.m.