nr_obs_experiment: Aggregates e.g. protein abundances from peptide abundances

View source: R/tidyMS_R6_TransitionCorrelations.R

nr_obs_experimentR Documentation

Aggregates e.g. protein abundances from peptide abundances

Description

Aggregates e.g. protein abundances from peptide abundances

Usage

nr_obs_experiment(
  data,
  config,
  from_children = TRUE,
  name_nr_child = "nr_child_exp"
)

Arguments

data

tidy data

config

prolfqua config

from_children

TRUE compute from nr_children column, FALSE - do not use nr_children column

name_nr_child

how to name column

Examples

dd <- prolfqua::sim_lfq_data_peptide_config()


xd <- nr_obs_experiment(dd$data, dd$config, from_children = FALSE)
xd <- nr_obs_experiment(dd$data, dd$config, from_children = TRUE)
stopifnot(min(xd$nr_child_exp) == 1)
dp <- prolfqua::sim_lfq_data_protein_config()
nr_obs_experiment(dp$data, dp$config)
nr_obs_experiment(dp$data, dp$config, from_children = FALSE)


dd <- prolfqua::sim_lfq_data_peptide_config()
dd$config$table$hierarchyDepth <- 2
xpep <- nr_obs_experiment(dd$data,dd$config)
stopifnot(all(xpep$nr_child_exp == 1))
xpep <- nr_obs_experiment(dd$data,dd$config, from_children = FALSE)
stopifnot(all(xpep$nr_child_exp == 1))


wolski/prolfqua documentation built on Dec. 4, 2024, 11:18 p.m.