Convenience accessor to the organelle markers in an MSnSet
.
This function returns the organelle markers of an MSnSet
instance. As a side effect, it print out a marker table.
getMarkers(object, fcol = "markers", names = TRUE, verbose = TRUE)
An instance of class "MSnSet"
.
The name of the markers column in the featureData
slot. Default is "markers"
.
A logical
indicating if the markers vector should
be named. Ignored if markers are encoded as a matrix.
If TRUE
, a marker table is printed and the markers
are returned invisibly. If FALSE
, the markers are returned.
A character
(matrix
) of length (ncol)
ncol(object)
, depending on the vector or matrix encoding of
the markers.
See getMarkerClasses
to get the classes
only. See markers
for details about spatial markers
storage and encoding.
library("pRolocdata")
data(dunkley2006)
## marker vectors
myVmarkers <- getMarkers(dunkley2006)
#> organelleMarkers
#> ER lumen ER membrane Golgi Mitochondrion PM
#> 14 45 28 55 46
#> Plastid Ribosome TGN unknown vacuole
#> 20 19 13 428 21
head(myVmarkers)
#> AT1G09210 AT1G21750 AT1G51760 AT1G56340 AT2G32920 AT2G47470
#> "ER lumen" "ER lumen" "ER lumen" "ER lumen" "ER lumen" "ER lumen"
## marker matrix
dunkley2006 <- mrkVecToMat(dunkley2006, mfcol = "Markers")
myMmarkers <- getMarkers(dunkley2006, fcol = "Markers")
#> Localisation count:
#> 0 1
#> 428 261
#> Single localisations:
#> ER lumen ER membrane Golgi Mitochondrion PM
#> 14 45 28 55 46
#> Plastid Ribosome TGN vacuole
#> 20 19 13 21
#> Multiple localisations:
#> none
head(myMmarkers)
#> ER lumen ER membrane Golgi Mitochondrion PM Plastid Ribosome TGN
#> AT1G09210 1 0 0 0 0 0 0 0
#> AT1G21750 1 0 0 0 0 0 0 0
#> AT1G51760 1 0 0 0 0 0 0 0
#> AT1G56340 1 0 0 0 0 0 0 0
#> AT2G32920 1 0 0 0 0 0 0 0
#> AT2G47470 1 0 0 0 0 0 0 0
#> vacuole
#> AT1G09210 0
#> AT1G21750 0
#> AT1G51760 0
#> AT1G56340 0
#> AT2G32920 0
#> AT2G47470 0