LFQDataStats | R Documentation |
Decorates LFQData with methods to compute statistics of interactions
Decorates LFQData with methods to compute statistics of interactions
compute stdv, mean and CV per peptide or protein and condition.
lfq
LFQData
stat
either CV or sd (if is_transformed)
statsdf
frame with statistics.
new()
create analyse variances and CV
LFQDataStats$new(lfqdata, stats = c("everything", "interaction", "all"))
lfqdata
LFQData object
stats
if interaction - within group stats, if all then overall CV, if pooled - then pooled variance using grouping information (t.b.d.)
stats()
access data.frame with statistics
LFQDataStats$stats()
data.frame with computed statistics
stats_wide()
access data.frame with statistics in wide format
LFQDataStats$stats_wide()
data.frame with computed statistics in wide format
stats_quantiles()
Determine CV or sd for the quantiles
LFQDataStats$stats_quantiles(probs = c(0.1, 0.25, 0.5, 0.75, 0.9))
probs
for which quantile to determine CV or sd
density()
plots density or ecdf
LFQDataStats$density(ggstat = c("density", "ecdf"))
ggstat
either density or ecdf
ggplot
density_median()
plot density or ecdf of CV or sd for the 50
LFQDataStats$density_median(ggstat = c("density", "ecdf"))
ggstat
either density of ecdf
ggplot
violin()
plot violinplot of CV or sd
LFQDataStats$violin()
ggstat
either density of ecdf
ggplot
violin_median()
plot violinplot of CV or sd for the 50
LFQDataStats$violin_median()
ggplot
stdv_vs_mean()
plot sd vs mean
LFQDataStats$stdv_vs_mean(size = 200)
size
number of points to sample (default 200)
ggplot
power_t_test_quantiles()
compute sample size for entire dataset
LFQDataStats$power_t_test_quantiles( probs = c(0.1, 0.25, 0.5, 0.75, 0.9), delta = c(0.59, 1, 2), power = 0.8, sig.level = 0.05 )
probs
quantiles of sd for which sample size should be computed
delta
effect size
power
power of test
sig.level
significance level.
power_t_test()
compute sample for each protein
LFQDataStats$power_t_test(delta = c(0.59, 1, 2), power = 0.8, sig.level = 0.05)
delta
effect size
power
power of test
sig.level
significance level.
clone()
The objects of this class are cloneable with this method.
LFQDataStats$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other LFQData:
LFQData
,
LFQDataAggregator
,
LFQDataPlotter
,
LFQDataSummariser
,
LFQDataToSummarizedExperiment()
,
LFQDataWriter
# study variance of not normalized data
#source("c:/Users/wewol/prog/prolfqua/R/LFQData.R")
runallfuncs <- function(x){
stopifnot("data.frame" %in% class(x$stats()))
stopifnot("data.frame" %in% class(x$stats_wide()))
stopifnot(c("long", "wide") %in% names(x$stats_quantiles()))
stopifnot("ggplot" %in% class(x$density()))
stopifnot("ggplot" %in% class(x$density_median()))
stopifnot("ggplot" %in% class(x$density("ecdf")))
stopifnot("ggplot" %in% class(x$density_median("ecdf")))
stopifnot("ggplot" %in% class(x$violin()))
stopifnot("ggplot" %in% class(x$violin_median()))
stopifnot("ggplot" %in% class(x$stdv_vs_mean(size = 400)))
if(!x$lfq$is_transformed()){
stopifnot(is.null(x$power_t_test()))
stopifnot(is.null(x$power_t_test_quantiles()))
}
}
bb <- prolfqua::sim_lfq_data_peptide_config()
lfqdata <- LFQData$new(bb$data, bb$config)
lfqstats <- lfqdata$get_Stats()
stopifnot(ncol(lfqstats$stats_wide()) == 30)
lfqstats$violin()
runallfuncs(lfqstats)
x <- lfqstats
#study variance of normalized data
lfqdata <- LFQData$new(bb$data, bb$config)
lfqdata$is_transformed(TRUE)
lfqstats <- lfqdata$get_Stats()
stopifnot(ncol(lfqstats$stats_wide()) == 26)
runallfuncs(lfqstats)
#Slightly different dataset
# estimates statistics for all samples
lfqstats <- lfqdata$get_Stats(stats = "all")
stopifnot(ncol(lfqstats$stats_wide()) == 8)
runallfuncs(lfqstats)
lfqstats <- lfqdata$get_Stats(stats = "interaction")
stopifnot(ncol(lfqstats$stats_wide()) == 20)
runallfuncs(lfqstats)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.