clean_profiles: Preprocess a co-elution profile matrix

Description Usage Arguments Value Examples

View source: R/clean_profiles.R

Description

Clean a matrix of co-elution/co-fractionation profiles by (1) imputing single missing values with the average of neighboring values, (2) replacing missing values with random, near-zero noise, and (3) smoothing with a moving average filter.

Usage

1
2
3
4
5
6
7
clean_profiles(
  profile_matrix,
  impute_NA = TRUE,
  smooth = TRUE,
  smooth_width = 4,
  noise_floor = 0.001
)

Arguments

profile_matrix

a numeric matrix of co-elution profiles, with proteins in rows, or a MSnSet object

impute_NA

if true, impute single missing values with the average of neighboring values

smooth

if true, smooth the chromatogram with a moving average filter

smooth_width

width of the moving average filter, in fractions

noise_floor

mean value of the near-zero noise to add

Value

a cleaned matrix

Examples

1
2
3
data(scott)
mat <- scott[c(1, 16), ]
mat_clean <- clean_profiles(mat)

fosterlab/PrInCE-R documentation built on Dec. 11, 2020, 3:51 p.m.