Function that allows for removing or keeping specific proteins from any DEprot object class.

# S3 method for class 'proteins'
filter(DEprot.object, proteins, mode = "keep")

Arguments

DEprot.object

Object of class DEprot.

proteins

String vector indicating a list of proteins to be use as filtering criteria. It must correspond to the counts rown names and 'prot.id' column of the analyses object.

mode

String indicating the mode to use for the filtering. If 'keep' the proteins are selected and kept, while if 'remove' the proteins are discarded. Default: "keep".

Value

An object of class DEprot (S4 vector).

Author

Sebastian Gregoricchio

Examples

# Remove a subset of proteins
dpo <- filter.proteins(DEprot.object = DEprot::test.toolbox$dpo.raw,
                       proteins = c("protein.29","protein.30"),
                       mode = "remove")

# Retain a subset of proteins
dpo <- filter.proteins(DEprot.object = DEprot::test.toolbox$dpo.raw,
                       proteins = c("protein.29","protein.30"),
                       mode = "keep")