View source: R/AnalysisConfiguration.R
hierarchy_counts_sample | R Documentation |
Count distinct elements for each level of hierarchy per sample
hierarchy_counts_sample(pdata, configuration, nr_children = 1)
pdata |
data.frame |
config |
|
Other summary:
INTERNAL_FUNCTIONS_BY_FAMILY
,
hierarchy_counts()
,
nr_B_in_A_per_sample()
,
summarize_hierarchy()
bb <- prolfqua::sim_lfq_data_peptide_config()
config <- bb$config
data <- bb$data
res <- hierarchy_counts_sample(data, config, nr_children = 1)
x <- res("long")
# filters on peptide level
res <- hierarchy_counts_sample(data, config, nr_children = 2)
x2 <- res("long")
# filters on protein level based on peptide count
bb <- prolfqua::sim_lfq_data_protein_config()
res <- hierarchy_counts_sample(bb$data, bb$config, nr_children = 2)
x1 <- res()
res <- hierarchy_counts_sample(bb$data, bb$config, nr_children = 1)
x2 <- res()
x1$nr_children <- 2
x2$nr_children <- 1
xl <- dplyr::bind_rows(x1, x2)
xl$nr_children |> table()
nudgeval <- -mean(xl$protein_Id) * 0.05
ggplot2::ggplot(xl, ggplot2::aes(x = sampleName, y = protein_Id, fill = as.character(nr_children)) ) +
ggplot2::geom_bar(stat = "identity", position = ggplot2::position_dodge())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.