Adds markers to the data
The function adds a 'markers' feature variable. These markers are
read from a comma separated values (csv) spreadsheet file. This
markers file is expected to have 2 columns (others are ignored)
where the first is the name of the marker features and the second
the group label. Alternatively, a markers named vector as provided
pRolocmarkers function can also be used.
addMarkers(object, markers, mcol = "markers", fcol, verbose = TRUE)
- An instance of class
characterwith the name the markers' csv file or a named character of markers as provided by
characterof length 1 defining the feature variable label for the newly added markers. Default is
- An optional feature variable to be used to match against the markers. If missing, the feature names are used.
logicalindicating if number of markers and marker table should be printed to the console.
It is essential to assure that
fcol, see below) and marker names (first column) match,
i.e. the same feature identifiers and case fold are used.
A new instance of class
MSnSetwith an additional
library("pRolocdata") data(dunkley2006) atha <- pRolocmarkers("atha") try(addMarkers(dunkley2006, atha)) ## markers already exists fData(dunkley2006)$markers.org <- fData(dunkley2006)$markers fData(dunkley2006)$markers <- NULL marked <- addMarkers(dunkley2006, atha) fvarLabels(marked) ## if 'makers' already exists marked <- addMarkers(marked, atha, mcol = "markers2") fvarLabels(marked) stopifnot(all.equal(fData(marked)$markers, fData(marked)$markers2)) plot2D(marked) addLegend(marked, where = "topleft", cex = .7)