E.g compute number of peptides for each protein
summarize_hierarchy(
pdata,
config,
hierarchy = config$table$hierarchy_keys_depth(),
factors = character()
)
data.frame
AnalysisConfiguration
for which hierarchy level (default up to hierarchy depth)
which factors to include
Other summary:
INTERNAL_FUNCTIONS_BY_FAMILY
,
hierarchy_counts()
,
hierarchy_counts_sample()
,
nr_B_in_A_per_sample()
bb <- 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
data <- bb$data
configur <- bb$config
summarize_hierarchy(data, configur)
#> # A tibble: 10 × 3
#> protein_Id isotopeLabel_n peptide_Id_n
#> <chr> <int> <int>
#> 1 0EfVhX~0087 1 3
#> 2 7cbcrd~5725 1 1
#> 3 9VUkAq~4703 1 1
#> 4 BEJI92~5282 1 2
#> 5 CGzoYe~2147 1 1
#> 6 DoWup2~5896 1 1
#> 7 Fl4JiV~8625 1 4
#> 8 HvIpHG~9079 1 2
#> 9 JcKVfU~9653 1 7
#> 10 SGIVBl~5782 1 6
summarize_hierarchy(data, configur, factors = character())
#> # A tibble: 10 × 3
#> protein_Id isotopeLabel_n peptide_Id_n
#> <chr> <int> <int>
#> 1 0EfVhX~0087 1 3
#> 2 7cbcrd~5725 1 1
#> 3 9VUkAq~4703 1 1
#> 4 BEJI92~5282 1 2
#> 5 CGzoYe~2147 1 1
#> 6 DoWup2~5896 1 1
#> 7 Fl4JiV~8625 1 4
#> 8 HvIpHG~9079 1 2
#> 9 JcKVfU~9653 1 7
#> 10 SGIVBl~5782 1 6
summarize_hierarchy(data, configur,
hierarchy = configur$table$hierarchy_keys_depth() )
#> # A tibble: 10 × 3
#> protein_Id isotopeLabel_n peptide_Id_n
#> <chr> <int> <int>
#> 1 0EfVhX~0087 1 3
#> 2 7cbcrd~5725 1 1
#> 3 9VUkAq~4703 1 1
#> 4 BEJI92~5282 1 2
#> 5 CGzoYe~2147 1 1
#> 6 DoWup2~5896 1 1
#> 7 Fl4JiV~8625 1 4
#> 8 HvIpHG~9079 1 2
#> 9 JcKVfU~9653 1 7
#> 10 SGIVBl~5782 1 6
summarize_hierarchy(data, configur,
hierarchy = NULL, factors = configur$table$factor_keys_depth() )
#> # A tibble: 3 × 4
#> group_ isotopeLabel_n protein_Id_n peptide_Id_n
#> <chr> <int> <int> <int>
#> 1 A 1 10 28
#> 2 B 1 10 28
#> 3 Ctrl 1 10 28
configur$table$hierarchyDepth = 1
summarize_hierarchy(data, configur,
factors = configur$table$factor_keys_depth())
#> # A tibble: 30 × 4
#> # Groups: group_ [3]
#> group_ protein_Id isotopeLabel_n peptide_Id_n
#> <chr> <chr> <int> <int>
#> 1 A 0EfVhX~0087 1 3
#> 2 A 7cbcrd~5725 1 1
#> 3 A 9VUkAq~4703 1 1
#> 4 A BEJI92~5282 1 2
#> 5 A CGzoYe~2147 1 1
#> 6 A DoWup2~5896 1 1
#> 7 A Fl4JiV~8625 1 4
#> 8 A HvIpHG~9079 1 2
#> 9 A JcKVfU~9653 1 7
#> 10 A SGIVBl~5782 1 6
#> # ℹ 20 more rows
configur$table$hierarchyDepth = 2
summarize_hierarchy(data, configur)
#> # A tibble: 28 × 3
#> # Groups: protein_Id [10]
#> protein_Id peptide_Id n
#> <chr> <chr> <int>
#> 1 0EfVhX~0087 ITLb4x1q 1
#> 2 0EfVhX~0087 ahQLlQY7 1
#> 3 0EfVhX~0087 dJkdz7so 1
#> 4 7cbcrd~5725 D5dQ4nKk 1
#> 5 9VUkAq~4703 eIC06D7g 1
#> 6 BEJI92~5282 HBkZvdhT 1
#> 7 BEJI92~5282 qQ1GK8Un 1
#> 8 CGzoYe~2147 mjHSHhoe 1
#> 9 DoWup2~5896 KVUnZ6oZ 1
#> 10 Fl4JiV~8625 GsUIOl6Q 1
#> # ℹ 18 more rows
configur$table$hierarchyDepth = 3
summarize_hierarchy(data, configur )
#> # A tibble: 28 × 3
#> # Groups: protein_Id [10]
#> protein_Id peptide_Id n
#> <chr> <chr> <int>
#> 1 0EfVhX~0087 ITLb4x1q 1
#> 2 0EfVhX~0087 ahQLlQY7 1
#> 3 0EfVhX~0087 dJkdz7so 1
#> 4 7cbcrd~5725 D5dQ4nKk 1
#> 5 9VUkAq~4703 eIC06D7g 1
#> 6 BEJI92~5282 HBkZvdhT 1
#> 7 BEJI92~5282 qQ1GK8Un 1
#> 8 CGzoYe~2147 mjHSHhoe 1
#> 9 DoWup2~5896 KVUnZ6oZ 1
#> 10 Fl4JiV~8625 GsUIOl6Q 1
#> # ℹ 18 more rows
configur$table$hierarchyDepth = 4
summarize_hierarchy(data, configur )
#> # A tibble: 28 × 3
#> # Groups: protein_Id [10]
#> protein_Id peptide_Id n
#> <chr> <chr> <int>
#> 1 0EfVhX~0087 ITLb4x1q 1
#> 2 0EfVhX~0087 ahQLlQY7 1
#> 3 0EfVhX~0087 dJkdz7so 1
#> 4 7cbcrd~5725 D5dQ4nKk 1
#> 5 9VUkAq~4703 eIC06D7g 1
#> 6 BEJI92~5282 HBkZvdhT 1
#> 7 BEJI92~5282 qQ1GK8Un 1
#> 8 CGzoYe~2147 mjHSHhoe 1
#> 9 DoWup2~5896 KVUnZ6oZ 1
#> 10 Fl4JiV~8625 GsUIOl6Q 1
#> # ℹ 18 more rows