Keep only the proteins with enough peptides
Source:R/tidyMS_data_setup.R
filter_proteins_by_peptide_count.RdKeeps the rows of the proteins with at least `config$min_peptides_protein` children at the next hierarchy level, counted by [nr_B_in_A()], and adds that count. The package dataset `data_ionstar` calls it from its `filtered()` method.
Value
list with the filtered `data` and the `name` of the count column, `NULL` when the hierarchy has no child level
See also
Other preprocessing:
INTERNAL_FUNCTIONS_BY_FAMILY,
apply_to_response_matrix(),
get_robscales(),
nr_B_in_A(),
robust_scale(),
scale_with_subset()
Examples
istar <- prolfqua::sim_lfq_data_peptide_config()
#> creating sampleName from file_name column
#> completing cases
#> completing cases done
#> setup done
filtered <- prolfqua:::filter_proteins_by_peptide_count(istar$data, istar$config)
stopifnot(all(filtered$data[[filtered$name]] >= istar$config$min_peptides_protein))