dataset_filter_custom: Custom dataset filtering rules that also enable one-sided...

dataset_filter_customR Documentation

Custom dataset filtering rules that also enable one-sided filtering

Description

Apply filtering rules to the peptide table and store results in a new intensity column. Normalization must be applied separately, see example below.

You can tweak columns "group" and "exclude" in the samples table to define desired groups and exclude either outlier samples, or entire conditions, as desired.

Usage

dataset_filter_custom(
  peptides,
  samples,
  col_intensity,
  peptide_min_detect,
  peptide_frac_detect,
  protein_min_peptides,
  groups_min_pass
)

Arguments

peptides

typically dataset$peptides

samples

typically dataset$samples , but with mutations to the group and exclude columns

col_intensity

designated intensity column in dataset$peptides table that will contain the output/results. Naming convention is very strict, must start with "intensity_" and be followed only by lowercase letters, numbers or underscores

peptide_min_detect

minimum number of samples, per group (in samples table), where a peptide must be detected to count as 'valid' (per group). Value > 0

peptide_frac_detect

minimum fraction of samples, per group (in samples table), where a peptide must be detected to count as 'valid' (per group). Value between 0 and 1

protein_min_peptides

minimum number of 'valid' peptides, per group (in samples table), that a protein must have to count as 'valid' (per group). Value > 0

groups_min_pass

minimum number of groups in which a protein must be 'valid' in order to be retained in the results. Value > 0

Value

peptides input table with results stored in column col_intensity

Examples

## Not run: 
dataset$peptides = dataset_filter_custom(
  dataset$peptides,
  dataset$samples %>% mutate(group = tissue_type),
  col_intensity = "intensity_all_group",
  peptide_min_detect = 5,
  peptide_frac_detect = 0.75,
  protein_min_peptides = 2,
  groups_min_pass = 1  # one-sided group filtering
)

dataset = normalize_peptide_intensity_column(
  dataset,
  col_intensity = "intensity_all_group",  # same column name as above !
  norm_algorithm = c("mwmb", "modebetween_protein"),
  rollup_algorithm = "maxlfq"
)

## End(Not run)

ftwkoopmans/msdap documentation built on March 5, 2025, 12:15 a.m.