View source: R/Main_functions.R
compute_FDR_from_asymmetry | R Documentation |
Compute the FDR (False Discovery Rate) using the asymmetry of the volcano plot. It uses the fonction f(x) = c / (|x|-x0) with x = log10(fold_change), y=-log10(p_value) by default. Otherwise, custom x and y vectors can be provided. Points with x>x0 and y>f(x) are taken as true positive (TP) Points with x<x0 and y>f(x) are taken as false positive (FP) For a given set of parameters (c,x0), the FDR is given by TP/(TP+FP)
compute_FDR_from_asymmetry( df = NULL, x = NULL, y = NULL, c = seq(from = 0, to = 10, by = 0.1), x0 = seq(from = 0, to = 10, by = 0.1) )
df |
: a data.frame containing columns |
x |
: numeric vector of x values. Only used if |
y |
: numeric vector of y values. Only used if |
c |
: numeric vector |
x0 |
: numeric vector |
a data.frame with a extra column FDR
if df
is not NULL. A vector of FDR values otherwise.
If parameters c
and x0
are vectors, FDR
is taken as the minimum FDR value across all sets of parameters
#' #load data : data("proteinGroups_Cbl") #Run InteRact with default parameters res <- InteRact(proteinGroups_Cbl, bait_gene_name = "Cbl") df_merge <- merge_conditions(res) df_FDR <- compute_FDR_from_asymmetry(df_merge) Interactome <- append_FDR(res, cbind(df_merge, FDR = df_FDR$FDR) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.