find_targets: Filter drug target nodes

Description Usage Arguments Value

View source: R/drug_targets.R

Description

(INTERNAL) Based on the supplied target molecules, interaction table, graph and annotation this function returns a data frame containing nodes in the network targeted by a drug and a list containing the drug names as names and a vector of node IDs as keys.

Usage

1
find_targets(graphs, target_molecules, interaction_table, annotation, on)

Arguments

graphs

List of two iGraph graph objects (one for each group)

target_molecules

Character string. Identifies the type of the target molecules (e.g., 'protein'). The string must be contained in the 'type' column of the annotation data frame.

interaction_table

Data frame. Specifying the interaction of drugs and target molecules. Must contain a column 'drug_name' containing drug names/identifiers and a column named like the character string given in the 'on' argument, which must be an identifier for the targeted molecule.

annotation

Data frame. Contains the annotation for all the nodes contained in the combined network. Must contain a column 'node_id' (vertex IDs in iGraph graph object) and a column named like the character string given in the 'on' argument, which must be an identifier for the targeted molecule.

on

Character string. Defines the ID that is used to match drugs to their targets. Both supplied data frames ('annotation' and 'interaction_table') must contain a column named like this character string.

Value

A named list. Element 'target_nodes' is a data frame with column 'node_id' (unique node IDs in the iGraph graph object that are targeted by drugs) and columns 'group1' and 'group2' (boolean values specifying whether the node is contained in the combined graph of the group). Element 'drugs_to_target_nodes' contains a named list: elements are 'drug_names' and contain a vector of node IDs that are their specific targets.


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