manual_impute: Imputation by random draws from a manually defined...

Description Usage Arguments Value Examples

View source: R/functions.R

Description

manual_impute imputes missing values in a proteomics dataset by random draws from a manually defined distribution.

Usage

1
manual_impute(se, scale = 0.3, shift = 1.8)

Arguments

se

SummarizedExperiment, Proteomics data (output from make_se() or make_se_parse()). It is adviced to first remove proteins with too many missing values using filter_missval() and normalize the data using normalize_vsn().

scale

Numeric(1), Sets the width of the distribution relative to the standard deviation of the original distribution.

shift

Numeric(1), Sets the left-shift of the distribution (in standard deviations) from the median of the original distribution.

Value

An imputed SummarizedExperiment object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Load example
data <- UbiLength
data <- data[data$Reverse != "+" & data$Potential.contaminant != "+",]
data_unique <- make_unique(data, "Gene.names", "Protein.IDs", delim = ";")

# Make SummarizedExperiment
columns <- grep("LFQ.", colnames(data_unique))
exp_design <- UbiLength_ExpDesign
se <- make_se(data_unique, columns, exp_design)

# Filter and normalize
filt <- filter_missval(se, thr = 0)
norm <- normalize_vsn(filt)

# Impute missing values manually
imputed_manual <- impute(norm, fun = "man", shift = 1.8, scale = 0.3)

squirrelandr/DEP documentation built on May 7, 2019, 9:31 a.m.