intensity_summary_by_hkeys: Summarizes the intensities within hierarchy

View source: R/tidyMS_aggregation.R

intensity_summary_by_hkeysR Documentation

Summarizes the intensities within hierarchy

Description

Summarizes the intensities within hierarchy

Usage

intensity_summary_by_hkeys(data, config, func)

Arguments

func

- a function working on a matrix of intensities for each protein.

Value

retuns function object

See Also

Other aggregation: INTERNAL_FUNCTIONS_BY_FAMILY, aggregate_intensity_topN(), estimate_intensity(), medpolish_estimate(), medpolish_estimate_df(), medpolish_estimate_dfconfig(), medpolish_protein_estimates(), plot_estimate(), plot_hierarchies_add_quantline(), plot_hierarchies_line(), plot_hierarchies_line_df(), rlm_estimate(), rlm_estimate_dfconfig()

Other deprecated: INTERNAL_FUNCTIONS_BY_FAMILY, medpolish_protein_estimates()

Examples



bb <- prolfqua_data('data_ionstar')$filtered()
stopifnot(nrow(bb$data) == 25780)
config <- old2new(bb$config$clone(deep = TRUE))
data <- bb$data
x <- intensity_summary_by_hkeys(data, config, func = medpolish_estimate)

res <- x("unnest")
res$data |> dim()

config <- old2new(bb$config$clone(deep = TRUE))
config$table$hierarchyDepth <- 1

x <- intensity_summary_by_hkeys(data, config, func = medpolish_estimate)
dd <- x(value = "plot")
stopifnot(nrow(dd) == length(unique(bb$data$protein_Id)))

dd$plot[[2]]

# example how to add peptide count information
tmp <- summarize_hierarchy(data, config)
tmp <- dplyr::inner_join(tmp, x("wide")$data, by = config$table$hierarchy_keys_depth())


wolski/prolfqua documentation built on May 12, 2024, 10:16 p.m.