testMSnSet: Create a stratified 'test' 'MSnSet'

Description Usage Arguments Value Author(s) See Also Examples

View source: R/MSnSet.R

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

1
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).

Author(s)

Lisa Breckels

See Also

sampleMSnSet unknownMSnSet markerMSnSet

Examples

1
2
3
4
5
library(pRolocdata)
data(tan2009r1)
sample <- testMSnSet(tan2009r1)
getMarkers(sample, "test")
all(dim(sample) == dim(markerMSnSet(tan2009r1)))

pRoloc documentation built on Nov. 8, 2020, 6:26 p.m.