markerMSnSet {pRoloc} | R Documentation

## Extract marker/unknown subsets

### Description

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

### Usage

    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

    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"))))

[Package pRoloc version 1.22.2 Index]