addMOA: Add MOA annotation to drug data frame

View source: R/utilities.R

addMOAR Documentation

Add MOA annotation to drug data frame

Description

The MOA annotation is a list of MOA name to drug name mappings. This functions add the MOA column to data frame when data frame have a column with compound names

Usage

addMOA(df, drug_col, moa_list)

Arguments

df

data frame that must contains a column with compound names

drug_col

character (1), name of the column that stores compound names

moa_list

a list object of MOA name (e.g. HDAC inhibitor) to compound name mappings

Value

data frame with an added MOAss column

Examples

data("clue_moa_list")
df <- data.frame(pert=c("vorinostat", "sirolimus"), annot1=c("a", "b"), 
                 annot2=1:2)
addMOA(df, "pert", clue_moa_list) 

yduan004/signatureSearch documentation built on Feb. 19, 2024, 9:30 a.m.