runsRGES: Compute sRGES

View source: R/runsRGES_ultimate.R

runsRGESR Documentation

Compute sRGES

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

 runsRGES(dz_signature=NULL,choose_fda_drugs = FALSE,max_gene_size=500,
cells=NULL,output=FALSE,outputFolder='',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.

weight_cell_line

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

permutations

number of permutations, by default 10000.

output

if TRUE, output files is produced.

outputFolder

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

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

#load differential expression example for HCC 
#vs adjacent liver tissue computed in diffExp() function
data("res_example",package='octad')
res_example=subset(res_example,abs(log2FoldChange)>1&padj<0.001)[1:10,]
#run sRGES computation
#sRGES=runsRGES(dz_signature=res_example,max_gene_size=100,permutations=1000,output=FALSE)

Bin-Chen-Lab/OCTAD documentation built on Jan. 28, 2023, 12:04 p.m.