markerMSnSet: Extract marker/unknown subsets

Description Usage Arguments Value Author(s) See Also Examples

View source: R/MSnSet.R

Description

These function extract the marker or unknown proteins into a new MSnSet.

Usage

1
2
3
markerMSnSet(object, fcol = "markers")

unknownMSnSet(object, fcol = "markers")

Arguments

object

An instance of class MSnSet

fcol

The name of the feature data column, that will be used to separate the markers from the proteins of unknown localisation. When the markers are encoded as vectors, features of unknown localisation are defined as fData(object)[, fcol] == "unknown". For matrix-encoded markers, unlabelled proteins are defined as rowSums(fData(object)[, fcol]) == 0. Default is "markers".

Value

An new MSnSet with marker/unknown proteins only.

Author(s)

Laurent Gatto

See Also

sampleMSnSet testMSnSet and markers for markers encoding.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library("pRolocdata")
data(dunkley2006)
mrk <- markerMSnSet(dunkley2006)
unk <- unknownMSnSet(dunkley2006)
dim(dunkley2006)
dim(mrk)
dim(unk)
table(fData(dunkley2006)$markers)
table(fData(mrk)$markers)
table(fData(unk)$markers)
## matrix-encoded markers
dunkley2006 <- mrkVecToMat(dunkley2006)
dim(markerMSnSet(dunkley2006, "Markers"))
stopifnot(all.equal(featureNames(markerMSnSet(dunkley2006, "Markers")),
                    featureNames(markerMSnSet(dunkley2006, "markers"))))
dim(unknownMSnSet(dunkley2006, "Markers"))
stopifnot(all.equal(featureNames(unknownMSnSet(dunkley2006, "Markers")),
                    featureNames(unknownMSnSet(dunkley2006, "markers"))))

pRoloc documentation built on Nov. 8, 2020, 6:26 p.m.