R/tidyMS_stats.R
summarize_stats.Rd
Compute mean, sd, and CV for all Peptides, or proteins, for all interactions and all samples.
Compute mean, sd, and CV for e.g. Peptides, or proteins, for all samples.
summarize stats output (compute quantiles)
Other stats:
INTERNAL_FUNCTIONS_BY_FAMILY
,
lfq_power_t_test_proteins()
,
lfq_power_t_test_quantiles()
,
lfq_power_t_test_quantiles_V2()
,
plot_stat_density()
,
plot_stat_density_median()
,
plot_stat_violin()
,
plot_stat_violin_median()
,
plot_stdv_vs_mean()
,
pooled_V2()
Other stats:
INTERNAL_FUNCTIONS_BY_FAMILY
,
lfq_power_t_test_proteins()
,
lfq_power_t_test_quantiles()
,
lfq_power_t_test_quantiles_V2()
,
plot_stat_density()
,
plot_stat_density_median()
,
plot_stat_violin()
,
plot_stat_violin_median()
,
plot_stdv_vs_mean()
,
pooled_V2()
Other stats:
INTERNAL_FUNCTIONS_BY_FAMILY
,
lfq_power_t_test_proteins()
,
lfq_power_t_test_quantiles()
,
lfq_power_t_test_quantiles_V2()
,
plot_stat_density()
,
plot_stat_density_median()
,
plot_stat_violin()
,
plot_stat_violin_median()
,
plot_stdv_vs_mean()
,
pooled_V2()
bb <- prolfqua::sim_lfq_data_protein_config()
#> creating sampleName from fileName column
#> completing cases
#> completing cases done
#> setup done
config <- bb$config
data <- bb$data
res1 <- summarize_stats(data, config)
#> completing cases
res2 <- prolfqua::sim_lfq_data_2Factor_config()
#> creating sampleName from fileName column
#> completing cases
#> completing cases done
#> setup done
res2$config$table$factorDepth <- 2
stats <- summarize_stats(res2$data, res2$config)
#> completing cases
stopifnot(nrow(stats) == 40)
stats <- summarize_stats(res2$data, res2$config, factor_key = res2$config$table$factor_keys()[1])
#> completing cases
stopifnot(nrow(stats) == 20)
stats <- summarize_stats(res2$data, res2$config, factor_key = res2$config$table$factor_keys()[2])
#> completing cases
stopifnot(nrow(stats) == 20)
stats <- summarize_stats(res2$data, res2$config, factor_key = NULL)
#> completing cases
stopifnot(nrow(stats) == 10)
bb <- prolfqua::sim_lfq_data_protein_config()
#> creating sampleName from fileName column
#> completing cases
#> completing cases done
#> setup done
res1 <- summarize_stats_all(bb$data, bb$config)
#> completing cases
stopifnot((res1 |> dplyr::filter(group_ == "All") |> nrow()) == (res1 |> nrow()))
res2 <- prolfqua::sim_lfq_data_2Factor_config()
#> creating sampleName from fileName column
#> completing cases
#> completing cases done
#> setup done
resSt <- summarize_stats_all(res2$data, res2$config)
#> completing cases
library(ggplot2)
bb1 <- prolfqua::sim_lfq_data_peptide_config()
#> creating sampleName from fileName column
#> completing cases
#> completing cases done
#> setup done
config <- bb1$config
data <- bb1$data
stats_res <- summarize_stats(data, config)
#> completing cases
sq <- summarize_stats_quantiles(stats_res, config)
sq <- summarize_stats_quantiles(stats_res, config, stats = "CV")
bb <- prolfqua::sim_lfq_data_peptide_config()
#> creating sampleName from fileName column
#> completing cases
#> completing cases done
#> setup done
config <- bb$config
data <- bb$data
config$table$get_response()
#> [1] "abundance"
stats_res <- summarize_stats(data, config)
#> completing cases
sq <- summarize_stats_quantiles(stats_res, config)
sq <- summarize_stats_quantiles(stats_res, config, stats = "sd")
stats_res <- summarize_stats(data, config)
#> completing cases
xx <- summarize_stats_quantiles(stats_res, config, probs = seq(0,1,by = 0.1))
ggplot2::ggplot(xx$long, aes(x = probs, y = quantiles, color = group_)) + geom_line() + geom_point()