calculate_p_value_bootstrap: Calculate ligand p-values from the bootstrapped ligand...

View source: R/application_prediction.R

calculate_p_value_bootstrapR Documentation

Calculate ligand p-values from the bootstrapped ligand activity analysis

Description

calculate_p_value_bootstrap Calculate the p-value for each ligand from the bootstrapped ligand activity analysis

Usage

calculate_p_value_bootstrap(bootstrap_results, ligand_activities, metric = "aupr_corrected")

Arguments

bootstrap_results

Output of bootstrap_ligand_activity_analysis

ligand_activities

Output of predict_ligand_activities

metric

Metric to use (Default: "aupr_corrected")

Value

Data frame with the ligand name, the number of times the bootstrapped value had a higher score than the observed (total), and the p-value for each ligand, calculated as total/length(bootstrap_results)

Examples

## Not run: 
permutations <- bootstrap_ligand_activity_analysis(expressed_genes_receiver, geneset_oi, background_expressed_genes,
                           ligand_target_matrix, potential_ligands, n_iter = 10)
p_values <- calculate_p_value_bootstrap(permutations, ligand_activities, metric = "aupr_corrected")

## End(Not run)

saeyslab/nichenetr documentation built on April 27, 2024, 9:24 p.m.