filter_proteins: Filter proteins based on missing values

Description Usage Arguments Value Examples

View source: R/functions.R

Description

filter_proteins filters a proteomic dataset based on missing values. Different types of filtering can be applied, which range from only keeping proteins without missing values to keeping proteins with a certain percent valid values in all samples or keeping proteins that are complete in at least one condition.

Usage

1
2
filter_proteins(se, type = c("complete", "condition", "fraction"),
  thr = NULL, min = NULL)

Arguments

se

SummarizedExperiment, Proteomics data (output from make_se() or make_se_parse()).

type

"complete", "condition" or "fraction", Sets the type of filtering applied. "complete" will only keep proteins with valid values in all samples. "condition" will keep proteins that have a maximum of 'thr' missing values in at least one condition. "fraction" will keep proteins that have a certain fraction of valid values in all samples.

thr

Integer(1), Sets the threshold for the allowed number of missing values in at least one condition if type = "condition".

min

Numeric(1), Sets the threshold for the minimum fraction of valid values allowed for any protein if type = "fraction".

Value

A filtered SummarizedExperiment object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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
stringent_filter <- filter_proteins(se, type = "complete")
less_stringent_filter <- filter_proteins(se, type = "condition", thr = 0)

arnesmits/DEP documentation built on Aug. 7, 2019, 10:44 a.m.