These function extract the marker or unknown proteins into a new
MSnSet
.
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 asrowSums(fData(object)[, fcol]) == 0
. Default is"markers"
.
See also
sampleMSnSet
testMSnSet
and
markers
for markers encoding.
Examples
library("pRolocdata")
data(dunkley2006)
mrk <- markerMSnSet(dunkley2006)
unk <- unknownMSnSet(dunkley2006)
dim(dunkley2006)
#> [1] 689 16
dim(mrk)
#> [1] 261 16
dim(unk)
#> [1] 428 16
table(fData(dunkley2006)$markers)
#>
#> ER lumen ER membrane Golgi Mitochondrion PM
#> 14 45 28 55 46
#> Plastid Ribosome TGN unknown vacuole
#> 20 19 13 428 21
table(fData(mrk)$markers)
#>
#> ER lumen ER membrane Golgi Mitochondrion PM
#> 14 45 28 55 46
#> Plastid Ribosome TGN vacuole
#> 20 19 13 21
table(fData(unk)$markers)
#>
#> unknown
#> 428
## matrix-encoded markers
dunkley2006 <- mrkVecToMat(dunkley2006)
dim(markerMSnSet(dunkley2006, "Markers"))
#> [1] 261 16
stopifnot(all.equal(featureNames(markerMSnSet(dunkley2006, "Markers")),
featureNames(markerMSnSet(dunkley2006, "markers"))))
dim(unknownMSnSet(dunkley2006, "Markers"))
#> [1] 428 16
stopifnot(all.equal(featureNames(unknownMSnSet(dunkley2006, "Markers")),
featureNames(unknownMSnSet(dunkley2006, "markers"))))