Learn R Programming

molnet (version 0.1.0)

get_drug_response_score: Calculate drug response score

Description

This function takes the differential graph (generated in differential_score), the a drug targets object (containing target node names and drugs and their targets; generated in determine_drug_targets) and the supplied drug-target interaction table (formatted in make_drug_target) to calculate the differential drug response score. The score is the median of all differential scores of the edges adjacent to all drug target nodes of a particular drug.

Usage

get_drug_response_score(differential_graph, drug_targets, interaction_table)

Arguments

differential_graph

iGraph graph object containing differential scores for all edges. Output of differential_score

drug_targets

Named list containing two elements (`target_nodes` and `drugs_to_target_nodes`). Output of determine_drug_targets. `target_nodes` is a vector containing network node names of the nodes that are targeted by the available drugs. `drugs_to_target_nodes` is a dictionary-like list that maps drugs to the nodes that they target.

interaction_table

Data frame. Element `interaction_table` of `drug_target_interaction` created by make_drug_target. Contains at least two columns: `drug_name` containing names of drugs and a column named with an identifier present in the targeted layer.

Value

Data frame containing drug name and associated differential drug response score

Examples

Run this code
# NOT RUN {
data(drug_gene_interactions)
drug_target_interaction <- make_drug_target(target_molecules='protein',
interaction_table=drug_gene_interactions, match_on='gene_name')


data(drug_targets_example)
data(differential_score_graph_example)
drug_response_score <- get_drug_response_score(differential_score_graph_example,
drug_targets_example[["targets"]], drug_target_interaction$interaction_table)
# }

Run the code above in your browser using DataLab