E.g. number of proteins, peptides, precursors in the dataset

hierarchy_counts(pdata, config)

Arguments

pdata

data.frame

config

AnalysisConfiguration

Examples


bb <- prolfqua::sim_lfq_data_peptide_config()
#> creating sampleName from fileName column
#> Warning: no nr_children column specified in the data, adding column nr_children and setting to 1.
#> completing cases

config <- bb$config$clone(deep=TRUE)
data <- bb$data

x <- hierarchy_counts(data, config)
x$protein_Id
#> [1] 10
stopifnot(ncol(x) == length(config$table$hierarchy_keys()) + 1)
# select non existing protein
data0 <- data |> dplyr::filter( protein_Id == "XYZ")
tmp <- hierarchy_counts(data0, config)
stopifnot(nrow(tmp) == 0)