R/AnalysisConfiguration.R
hierarchy_counts.Rd
E.g. number of proteins, peptides, precursors in the dataset
hierarchy_counts(pdata, config)
data.frame
AnalysisConfiguration
Other summary:
INTERNAL_FUNCTIONS_BY_FAMILY
,
hierarchy_counts_sample()
,
nr_B_in_A_per_sample()
,
summarize_hierarchy()
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)