get_drug_response_score: Calculate drug response score

Description Usage Arguments Value Examples

View source: R/pipeline_functions.R

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

1
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

1
2
3
4
5
6
7
8
9
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)

molnet-org/molnet documentation built on Dec. 21, 2021, 8:59 p.m.