runsRGES: Compute sRGES

Description Usage Arguments Value See Also Examples

View source: R/runsRGES_ultimate.R

Description

Compute sRGES, a score indicating the reveral potency of each drug. It first computes RGES (Reverse Gene Expression Score) for individual instances and then summarizes RGES of invididual drugs (one drug may have multiple instances under different treatment conditions).

Usage

1
2
 runsRGES(dz_signature=NULL,choose_fda_drugs = FALSE,max_gene_size=500, 
                     cells=NULL,outputFolder=NULL,weight_cell_line=NULL,permutations=10000)

Arguments

dz_signature

disease signature. Make sure input data frame has a gene Symbol column, otherwise an error is produced. It must be an UPPERCASE gene symbol.

choose_fda_drugs

if TRUE, only FDA approved drugs are used.

max_gene_size

maximum number of disease genes used for drug prediction. By default 50 for each side (up/down).

cells

cell ids in lincs_sig_info file used for prediction. By default, all cell lines are used.

outputFolder

folder path to store drug results, by default write results to working directory.

weight_cell_line

by default NULL, if !NULL, an output object from computeCellLine is estimated (see example).

permutations

number of permutations, by default 10000.

Value

The function returns RGES data.frame

containing scores and p.values for every instance. data.frame contains drug id in pert_iname collumn, n contains the number of instances for this drug, mean, median and sd of sRGES RGES sores.

Besides, a number of additional files in the sourced directory:

dz_sig_used.csv

contains genes in the disease signature used for computing reverse gene expression scores.

sRGES.csv

contains the same data as returned data.frame.

all__lincs_score.csv

includes information of RGES.

See Also

diffExp, octadDrugEnrichment, computeCellLine, topLineEval

Examples

1
2
3
4
5
6
7
8
HCC_primary=subset(phenoDF,cancer=='liver hepatocellular carcinoma'&sample.type == 'primary') #select data
case_id=HCC_primary$sample.id #select cases
HCC_adjacent=subset(phenoDF,cancer=='liver hepatocellular carcinoma'&sample.type == 'adjacent'&data.source == 'TCGA') #select data
control_id=HCC_adjacent$sample.id #select cases
res=diffExp(case_id,control_id,source='octad.small',output=TRUE)
res=subset(res,abs(log2FoldChange)>2)
#run sRGES computation
runsRGES(dz_signature=res)

Bin-Chen-Lab/octad_desktop documentation built on Oct. 28, 2020, 11:13 a.m.