pRoloc (version 1.12.4)

testMSnSet: Create a stratified 'test' MSnSet

Description

This function creates a stratified 'test' MSnSet which can be used for algorihtmic development. A "MSnSet" containing only the marker proteins, as defined in fcol, is returned with a new feature data column appended called test in which a stratified subset of these markers has been relabelled as 'unknowns'.

Usage

testMSnSet(object, fcol = "markers", size = 0.2, seed)

Arguments

object
An instance of class "MSnSet"
fcol
The feature meta-data column name containing the marker definitions on which the data will be stratified. Default is markers.
size
The size of the data set to be extracted. Default is 0.2 (20 percent).
seed
The optional random number generator seed.

Value

An instance of class "MSnSet" which contains only the proteins that have a labelled localisation i.e. the marker proteins, as defined in fcol and a new column in the feature data slot called test which has part of the labels relabelled as "unknown" class (the number of proteins renamed as "unknown" is according to the parameter size).

See Also

sampleMSnSet unknownMSnSet markerMSnSet

Examples

Run this code
library(pRolocdata)
data(tan2009r1)
sample <- testMSnSet(tan2009r1)
getMarkers(sample, "test")
all(dim(sample) == dim(markerMSnSet(tan2009r1)))

Run the code above in your browser using DataLab