Sample subset of proteins/peptides/precursors
Usage
sample_subset(size, pdata, hierarchy_keys_depth)
Arguments
- size
size of sample
- pdata
tidy table
- hierarchy_keys_depth
character vector — hierarchy columns at current depth
See also
Other configuration:
AnalysisConfiguration,
ContrastConfiguration,
INTERNAL_FUNCTIONS_BY_FAMILY,
R6_extract_values(),
complete_cases(),
make_interaction_column(),
make_reduced_hierarchy_config(),
separate_hierarchy(),
setup_analysis(),
table_factors(),
table_factors_size()
Examples
bb <- sim_lfq_data_peptide_config(Nprot = 5)
#> creating sampleName from file_name column
#> completing cases
#> completing cases done
#> setup done
subset <- sample_subset(2, bb$data, bb$config$hierarchy_keys_depth())
#> Sampling 2protein_Id
#> Joining with `by = join_by(protein_Id)`
length(unique(subset[[bb$config$hierarchy_keys_depth()[1]]]))
#> [1] 2