extract_top_fraction_targets
Get the predicted top n percentage target genes of a ligand of interest.
extract_top_fraction_targets(ligand_oi,top_fraction,ligand_target_matrix,ligands_position = "cols")
The ligand of interest of which top target genes should be returned
A number between 0 and 1 indicating which top fraction of target genes should be returned.
A matrix of ligand-target probabilty scores.
Indicate whether the ligands in the ligand-target matrix are in the rows ("rows") or columns ("cols"). Default: "cols"
A named numeric vector of ligand-target gene probability scores of the top target genes.
# NOT RUN {
## Generate the ligand-target matrix from loaded weighted_networks
weighted_networks = construct_weighted_networks(lr_network, sig_network, gr_network,source_weights_df)
ligands = list("TNF","BMP2",c("IL4","IL13"))
ligand_target_matrix = construct_ligand_target_matrix(weighted_networks, ligands)
targets = extract_top_fraction_targets("BMP2",0.01,ligand_target_matrix)
# }
Run the code above in your browser using DataLab