Skip to contents

Prepare summarizedExperiment object from diann report.pg_matrix file

Usage

prepare_se(
  pg_matrix,
  expDesign,
  pr_matrix = NULL,
  missing_thr = 0,
  min_peptides = 0,
  impute = "knn",
  mixed_cutoff = "empirically",
  remove_contaminants = TRUE
)

Arguments

pg_matrix

the report.pg_matrix file from DIANN

expDesign

A data frame with the experimental design. Should contain at least 'label', 'condition', and 'replicate' columns.

pr_matrix

Optional argument. If the report.pr_matrix file from DIANN is provided, peptide information will be added to output.

missing_thr

Integer specifying which proteinGroups are filtered out based on missing values.

min_peptides

An integer specifing the cutoff for razor/unique peptides. The default is 0.

impute

Specifies which imputatation method to use (default: knn). No imputation is done when entering 'none'. See details for options.

mixed_cutoff

Either 'empirally' or a value between 0-1. For details, see mixed_imputation

remove_contaminants

A logical value specifying if potential contaminants should be removed from the pg_matrix.

Value

A summarized Experiment object

Details

For standard imputation options, see ?DEP::impute. For mixed imputation, see mixed_imputation

Examples

se <- prepare_se(report.pg_matrix,
                expDesign, missing_thr = 1,
                impute = 'knn') # creates se with missing values imputed

#> Imputing along margin 1 (features/rows).
#> Warning: 178 rows with more than 50 % entries missing;
#>  mean imputation used for these rows
#> Cluster size 5636 broken into 3415 2221 
#> Cluster size 3415 broken into 1448 1967 
#> Done cluster 1448 
#> Cluster size 1967 broken into 1000 967 
#> Done cluster 1000 
#> Done cluster 967 
#> Done cluster 1967 
#> Done cluster 3415 
#> Cluster size 2221 broken into 1421 800 
#> Done cluster 1421 
#> Done cluster 800 
#> Done cluster 2221 

# creates se without imputing missing values.
se <- prepare_se(report.pg_matrix,
                expDesign,
                 missing_thr = 1,
                 impute = 'none')