View source: R/pipeline_functions.R
cal.Activity | R Documentation |
cal.Activity
calculates the activity value for each driver.
This function requires two inputs, the driver-to-target list object target_list
and the expression matrix.
cal.Activity(
target_list = NULL,
igraph_obj = NULL,
cal_mat = NULL,
es.method = "weightedmean",
std = TRUE,
memory_constrain = FALSE
)
target_list |
list, the driver-to-target list object. Either igraph_obj or target_list is necessary for this function.
The names of the list elements are drivers.
Each element is a data frame, usually contains at least three columns.
"target", target gene names;
"MI", mutual information;
"spearman", spearman correlation coefficient.
"MI" and "spearman" is necessary if es.method="weightedmean".
Users can call |
igraph_obj |
igraph object, optional. Either igraph_obj or target_list is necessary for this function.
Users can call |
cal_mat |
numeric matrix, the expression matrix of genes/transcripts. |
es.method |
character, method applied to calculate the activity value. User can choose from "mean", "weightedmean", "maxmean" and "absmean". Default is "weightedmean". |
std |
logical, if TRUE, the expression matrix will be normalized by column. Default is TRUE. |
memory_constrain |
logical, if TRUE, the calculation strategy will not use Matrix Cross Products, which is memory consuming. Default is FALSE. |
Return a matrix of activity values. Rows are drivers, columns are samples.
analysis.par <- list()
analysis.par$out.dir.DATA <- system.file('demo1','driver/DATA/',package = "NetBID2")
NetBID.loadRData(analysis.par=analysis.par,step='ms-tab')
ac_mat <- cal.Activity(target_list=analysis.par$merge.network$target_list,
cal_mat=Biobase::exprs(analysis.par$cal.eset),
es.method='weightedmean')
ac_mat <- cal.Activity(igraph_obj=analysis.par$merge.network$igraph_obj,
cal_mat=Biobase::exprs(analysis.par$cal.eset),
es.method='maxmean')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.