Title: | Application of gene classifiers |
---|---|
Description: | This packages aims for easy accessible application of classifiers which have been published in literature using an ExpressionSet as input. |
Authors: | R Kuiper [cre, aut] |
Maintainer: | R Kuiper <[email protected]> |
License: | GPL-2 |
Version: | 1.31.0 |
Built: | 2024-11-29 06:10:03 UTC |
Source: | https://github.com/bioc/geneClassifiers |
Extract Parts of an Object
## S4 method for signature 'FixedExpressionData,ANY,ANY' x[i, j, ..., drop = TRUE] ## S4 method for signature 'FixedExpressionData,ANY,missing' x[i, j, ..., drop = TRUE] ## S4 method for signature 'FixedExpressionData,missing,ANY' x[i, j, ..., drop = TRUE] ## S4 method for signature 'FixedExpressionData,ANY,missing' x[[i, j, ...]] ## S4 method for signature 'FixedExpressionData,missing,ANY' x[[i, j, ...]] ## S4 method for signature 'FixedExpressionData,ANY,ANY' x[[i, j, ...]]
## S4 method for signature 'FixedExpressionData,ANY,ANY' x[i, j, ..., drop = TRUE] ## S4 method for signature 'FixedExpressionData,ANY,missing' x[i, j, ..., drop = TRUE] ## S4 method for signature 'FixedExpressionData,missing,ANY' x[i, j, ..., drop = TRUE] ## S4 method for signature 'FixedExpressionData,ANY,missing' x[[i, j, ...]] ## S4 method for signature 'FixedExpressionData,missing,ANY' x[[i, j, ...]] ## S4 method for signature 'FixedExpressionData,ANY,ANY' x[[i, j, ...]]
x |
An object of class |
i |
the rows index |
j |
the column index |
... |
unused |
drop |
unused |
An object of class FixedExpressionData
Other fixed data information extraction functions: dim,FixedExpressionData-method
,
getNormalizationMethod
,
getTargetValue
data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0", targetValue=500) dim(myData) dim(myData[1:10,1:3]) dim(myData[[1:10,1:3]])
data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0", targetValue=500) dim(myData) dim(myData[1:10,1:3]) dim(myData[[1:10,1:3]])
This class stores classifier related information This is information on probe-sets used and their weightings, means, standard deviations and covariance structure as observed in the classifiers training data, and the description of the procedure on how to preprocess new data prior to application of the classifier.
name
A character string indicating the name of the classifier
description
A short description of the classifier
citations
A character vector of citations to literature
normalizationMethod
A character string indicating the normalization method to apply
eventChain
A list of preprocessing steps
probeNames
A character vector
intercept
A numeric value
weights
A numeric vector
decisionBoundaries
A numeric vector with values that separate the risk-groups
doRun
A function which is called for the actual classification
means
A numeric vector of probe-set means as observed in the trainingsset (if available)
sds
A numeric vector of probe-set standard deviations as observed in the trainingsset (if available)
.geneClassifierVersion
An object of class package_version
This class stores classifier results as obtained after running
the runClassifier
function.
classifierParameters
An object of class ClassifierParameters
in which the applied classifier parameters are stored.
score
A numeric vector of resulting classifier scores
batchCorrection
A character vector indicating wheter batch correction was applied
weightingType
A character string indicating wheter the weighting type was complete (i.e. no missing data), reweighted (i.e. missing data was handled based on correction using the covariance structure in the classifiers training data), or reduced (i.e. missing data but not reweighting the original probeset weighting)
.geneClassifierVersion
An object of class package_version
Retrieve the dimension of an object.
## S4 method for signature 'FixedExpressionData' dim(x)
## S4 method for signature 'FixedExpressionData' dim(x)
x |
an R object, for example a matrix, array or data frame. |
Retrieves the 'dim attribute of the object. It is 'NULL' or a vector of mode 'integer'.
Other fixed data information extraction functions: [,FixedExpressionData,ANY,ANY-method
,
getNormalizationMethod
,
getTargetValue
data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0", targetValue=500) dim(myData) dim(myData[1:10,1:3])
data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0", targetValue=500) dim(myData) dim(myData[1:10,1:3])
An ExpressionSet
. The data contains a sample of gene expression
data from patients included in the HOVON65/GMMG-HD4 trial on multiple myeloma.
The data was MAS5.0 normalized to a target value of 500.
exampleMAS5
exampleMAS5
An object of class ExpressionSet
with 374 rows and 25 columns.
This class stores gene expression data together with
information on the normalization method and additional normalization related
parameters. In order to ensure the data is not manipulated in unforeseen
ways, manipulation is strictly controled through adding transformations
which are predefined in the TransformationProcess
-class. Upon reading
the data by the exprs
function, the transformations areperformed in
the order the were added.
normalizationMethod
A character string indicating the normalization
method that was applied to the data. Possible values are give by
getNormalizationMethods
.
expressionEnvironment
A locked environment in which the expression matrix is stored.
normalizationParameters
A list with normalization specific values.
transformationProcess
A locked environment to which the transformation processes are added.
.geneClassifierVersion
An object of class package_version
getBatchCorrection
returns TRUE or FALSE
indicating whether correction was applied
getBatchCorrection(object) ## S4 method for signature 'ClassifierResults' getBatchCorrection(object)
getBatchCorrection(object) ## S4 method for signature 'ClassifierResults' getBatchCorrection(object)
object |
An object of class |
TRUE or FALSE
Other classifier results: getClassifications
,
getScores
, getWeightingType
myData <- setNormalizationMethod(exampleMAS5, "MAS5.0",targetValue=500) results <- runClassifier('EMC92', myData) getBatchCorrection( results )
myData <- setNormalizationMethod(exampleMAS5, "MAS5.0",targetValue=500) results <- runClassifier('EMC92', myData) getBatchCorrection( results )
getCitations
Obtain citations to the classifier
getCitations(object) ## S4 method for signature 'ClassifierParameters' getCitations(object)
getCitations(object) ## S4 method for signature 'ClassifierParameters' getCitations(object)
object |
An object of class |
A character vector
Other classifier information functions: getClassifier
,
getDecisionBoundaries
,
getDescription
,
getEventChain
, getIntercept
,
getMeans
,
getNormalizationMethod
,
getProbeNames
, getSds
,
getTrainingData
, getWeights
aClassifier <- getClassifier("EMC92") getCitations(aClassifier)
aClassifier <- getClassifier("EMC92") getCitations(aClassifier)
getClassifications
returns the resulting classifications.
getClassifications(object) ## S4 method for signature 'ClassifierResults' getClassifications(object)
getClassifications(object) ## S4 method for signature 'ClassifierResults' getClassifications(object)
object |
An object of class |
A vector of orderd factors with classifications per sample
Other classifier results: getBatchCorrection
,
getScores
, getWeightingType
myData <- setNormalizationMethod(exampleMAS5, "MAS5.0",targetValue=500) results <- runClassifier('EMC92', myData) getScores( results ) getClassifications( results )
myData <- setNormalizationMethod(exampleMAS5, "MAS5.0",targetValue=500) results <- runClassifier('EMC92', myData) getScores( results ) getClassifications( results )
getClassifier
returns a requested classifier definition.
getClassifier(value) ## S4 method for signature 'ClassifierResults' getClassifier(value) ## S4 method for signature 'character' getClassifier(value)
getClassifier(value) ## S4 method for signature 'ClassifierResults' getClassifier(value) ## S4 method for signature 'character' getClassifier(value)
value |
Either a text value indicating a classifier name
(see |
The return value is a classifier definition which
is encoded in an object of class ClassifierParameters
.
This can be used as input argument for the runClassifier
function.
ClassifierParameters
and runClassifier
Other classifier information functions: getCitations
,
getDecisionBoundaries
,
getDescription
,
getEventChain
, getIntercept
,
getMeans
,
getNormalizationMethod
,
getProbeNames
, getSds
,
getTrainingData
, getWeights
getClassifier("EMC92")
getClassifier("EMC92")
getDecisionBoundaries
returns the a numeric vector
of boundary values that separate the risk groups.
getDecisionBoundaries(object) ## S4 method for signature 'ClassifierParameters' getDecisionBoundaries(object)
getDecisionBoundaries(object) ## S4 method for signature 'ClassifierParameters' getDecisionBoundaries(object)
object |
An object of class |
A numeric vector
Other classifier information functions: getCitations
,
getClassifier
,
getDescription
,
getEventChain
, getIntercept
,
getMeans
,
getNormalizationMethod
,
getProbeNames
, getSds
,
getTrainingData
, getWeights
aClassifier <- getClassifier("EMC92") getDecisionBoundaries(aClassifier)
aClassifier <- getClassifier("EMC92") getDecisionBoundaries(aClassifier)
getDescription
returns the descriptive text associated
with the classifier.
getDescription(object) ## S4 method for signature 'ClassifierParameters' getDescription(object)
getDescription(object) ## S4 method for signature 'ClassifierParameters' getDescription(object)
object |
An object of class |
A character string describing the classifier
Other classifier information functions: getCitations
,
getClassifier
,
getDecisionBoundaries
,
getEventChain
, getIntercept
,
getMeans
,
getNormalizationMethod
,
getProbeNames
, getSds
,
getTrainingData
, getWeights
aClassifier <- getClassifier("EMC92") getDescription(aClassifier)
aClassifier <- getClassifier("EMC92") getDescription(aClassifier)
getEventChain
returns the event chain encoded in the
in the classifier. The eventchain indicates what preprocessing
steps are performed by the runClassifier
function
prior to classification.
getEventChain(object) ## S4 method for signature 'ClassifierParameters' getEventChain(object)
getEventChain(object) ## S4 method for signature 'ClassifierParameters' getEventChain(object)
object |
An object of class |
Returns the event chain encoded in the in the classifier encoded as a named list.
showClassifierList getClassifier runClassifier
Other classifier information functions: getCitations
,
getClassifier
,
getDecisionBoundaries
,
getDescription
, getIntercept
,
getMeans
,
getNormalizationMethod
,
getProbeNames
, getSds
,
getTrainingData
, getWeights
aClassifier <- getClassifier("EMC92") getEventChain(aClassifier)
aClassifier <- getClassifier("EMC92") getEventChain(aClassifier)
getIntercept
returns the numeric value of the
classifier's intercept.
getIntercept(object) ## S4 method for signature 'ClassifierParameters' getIntercept(object)
getIntercept(object) ## S4 method for signature 'ClassifierParameters' getIntercept(object)
object |
An object of class |
A numeric value
Other classifier information functions: getCitations
,
getClassifier
,
getDecisionBoundaries
,
getDescription
,
getEventChain
, getMeans
,
getNormalizationMethod
,
getProbeNames
, getSds
,
getTrainingData
, getWeights
aClassifier <- getClassifier("EMC92") getIntercept(aClassifier)
aClassifier <- getClassifier("EMC92") getIntercept(aClassifier)
getMeans
returns the reference means encoded in the
in the classifier.
getMeans(object) ## S4 method for signature 'ClassifierParameters' getMeans(object)
getMeans(object) ## S4 method for signature 'ClassifierParameters' getMeans(object)
object |
An object of class |
Returns a numeric vector of probe set means as observed in the reference data
showClassifierList getClassifier runClassifier
Other classifier information functions: getCitations
,
getClassifier
,
getDecisionBoundaries
,
getDescription
,
getEventChain
, getIntercept
,
getNormalizationMethod
,
getProbeNames
, getSds
,
getTrainingData
, getWeights
aClassifier <- getClassifier("EMC92") getMeans(aClassifier)
aClassifier <- getClassifier("EMC92") getMeans(aClassifier)
getName
returns the name associated with the requested object.
getName(object) ## S4 method for signature 'TransformationProcess' getName(object) ## S4 method for signature 'ClassifierParameters' getName(object) ## S4 method for signature 'ClassifierResults' getName(object)
getName(object) ## S4 method for signature 'TransformationProcess' getName(object) ## S4 method for signature 'ClassifierParameters' getName(object) ## S4 method for signature 'ClassifierResults' getName(object)
object |
The object to get the name of. |
The return value is a character string
aClassifier <- getClassifier("EMC92") getName( aClassifier )
aClassifier <- getClassifier("EMC92") getName( aClassifier )
The function getNormalizationMethod
returns the normalization method
associated with the object
getNormalizationMethods
returns a character vector of
currenlty available normalization methods.
getNormalizationMethod(object) getNormalizationMethods() ## S4 method for signature 'FixedExpressionData' getNormalizationMethod(object) ## S4 method for signature 'ClassifierParameters' getNormalizationMethod(object)
getNormalizationMethod(object) getNormalizationMethods() ## S4 method for signature 'FixedExpressionData' getNormalizationMethod(object) ## S4 method for signature 'ClassifierParameters' getNormalizationMethod(object)
object |
An object of class |
The given normlization methods can be used in the
A character string indicating the normalization method.
Other classifier information functions: getCitations
,
getClassifier
,
getDecisionBoundaries
,
getDescription
,
getEventChain
, getIntercept
,
getMeans
, getProbeNames
,
getSds
, getTrainingData
,
getWeights
Other fixed data information extraction functions: [,FixedExpressionData,ANY,ANY-method
,
dim,FixedExpressionData-method
,
getTargetValue
Other workflow functions: runClassifier
,
setNormalizationMethod
,
showClassifierList
data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0", targetValue=500) aClassifier <- getClassifier("EMC92") getNormalizationMethod( myData ) getNormalizationMethod( aClassifier ) data(exampleMAS5) showClassifierList() getNormalizationMethods() myData <- setNormalizationMethod(exampleMAS5, "MAS5.0",targetValue=500) results <- runClassifier('UAMS70', myData) getScores( results ) getClassifications( results )
data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0", targetValue=500) aClassifier <- getClassifier("EMC92") getNormalizationMethod( myData ) getNormalizationMethod( aClassifier ) data(exampleMAS5) showClassifierList() getNormalizationMethods() myData <- setNormalizationMethod(exampleMAS5, "MAS5.0",targetValue=500) results <- runClassifier('UAMS70', myData) getScores( results ) getClassifications( results )
getProbeNames
returns the probe names associated with
the requested classifier.
getProbeNames(object) ## S4 method for signature 'ClassifierParameters' getProbeNames(object)
getProbeNames(object) ## S4 method for signature 'ClassifierParameters' getProbeNames(object)
object |
An object of class |
The return value is a character vector of probe-set names.
Other classifier information functions: getCitations
,
getClassifier
,
getDecisionBoundaries
,
getDescription
,
getEventChain
, getIntercept
,
getMeans
,
getNormalizationMethod
,
getSds
, getTrainingData
,
getWeights
aClassifier <- getClassifier("EMC92") getProbeNames( aClassifier )
aClassifier <- getClassifier("EMC92") getProbeNames( aClassifier )
getScores
returns the resulting scores from a classifier
run
getScores(object) ## S4 method for signature 'ClassifierResults' getScores(object)
getScores(object) ## S4 method for signature 'ClassifierResults' getScores(object)
object |
An object of class |
A numeric vector with scores per sample
Other classifier results: getBatchCorrection
,
getClassifications
,
getWeightingType
data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0", targetValue=500) results <- runClassifier('EMC92', myData) getScores( results ) getClassifications( results )
data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0", targetValue=500) results <- runClassifier('EMC92', myData) getScores( results ) getClassifications( results )
getSds
returns the reference standard deviations
encoded in the classifier.
getSds(object) ## S4 method for signature 'ClassifierParameters' getSds(object)
getSds(object) ## S4 method for signature 'ClassifierParameters' getSds(object)
object |
An object of class |
Returns a numeric vector of probe set standard deviations as observed in the reference data
showClassifierList getClassifier runClassifier
Other classifier information functions: getCitations
,
getClassifier
,
getDecisionBoundaries
,
getDescription
,
getEventChain
, getIntercept
,
getMeans
,
getNormalizationMethod
,
getProbeNames
,
getTrainingData
, getWeights
aClassifier <- getClassifier("EMC92") getSds(aClassifier)
aClassifier <- getClassifier("EMC92") getSds(aClassifier)
getTargetValue
returns the current applied targetValue
in the MAS5.0 gene expression data.
getTargetValue(object) ## S4 method for signature 'FixedExpressionData' getTargetValue(object)
getTargetValue(object) ## S4 method for signature 'FixedExpressionData' getTargetValue(object)
object |
An object of class |
A numeric value
Other fixed data information extraction functions: [,FixedExpressionData,ANY,ANY-method
,
dim,FixedExpressionData-method
,
getNormalizationMethod
data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0", targetValue=500) getTargetValue( myData )
data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0", targetValue=500) getTargetValue( myData )
getTrainingData
returns the training data that was used
for building the classifier.
getTrainingData(object) ## S4 method for signature 'ClassifierParameters' getTrainingData(object)
getTrainingData(object) ## S4 method for signature 'ClassifierParameters' getTrainingData(object)
object |
An object of class |
An object of class ExpressionSet
Other classifier information functions: getCitations
,
getClassifier
,
getDecisionBoundaries
,
getDescription
,
getEventChain
, getIntercept
,
getMeans
,
getNormalizationMethod
,
getProbeNames
, getSds
,
getWeights
aClassifier <- getClassifier("EMC92") getTrainingData(aClassifier)
aClassifier <- getClassifier("EMC92") getTrainingData(aClassifier)
getWeightingType
returns weigthing type
getWeightingTypes
returns weigthing type
getWeightingType(object) getWeightingTypes() ## S4 method for signature 'ClassifierResults' getWeightingType(object)
getWeightingType(object) getWeightingTypes() ## S4 method for signature 'ClassifierResults' getWeightingType(object)
object |
An object of class |
one of the values in getWeightingTypes()
either "complete" or "reweighted"
Other classifier results: getBatchCorrection
,
getClassifications
, getScores
Other classifier results: getBatchCorrection
,
getClassifications
, getScores
myData <- setNormalizationMethod(exampleMAS5, "MAS5.0",targetValue=500) results <- runClassifier('EMC92', myData) getWeightingType( results ) getWeightingTypes()
myData <- setNormalizationMethod(exampleMAS5, "MAS5.0",targetValue=500) results <- runClassifier('EMC92', myData) getWeightingType( results ) getWeightingTypes()
getWeights
returns the probe weights associated with
the classifier.
getWeights(object) ## S4 method for signature 'ClassifierParameters' getWeights(object)
getWeights(object) ## S4 method for signature 'ClassifierParameters' getWeights(object)
object |
An object of class |
A numeric vector.
Other classifier information functions: getCitations
,
getClassifier
,
getDecisionBoundaries
,
getDescription
,
getEventChain
, getIntercept
,
getMeans
,
getNormalizationMethod
,
getProbeNames
, getSds
,
getTrainingData
aClassifier <- getClassifier("EMC92") getWeights(aClassifier)
aClassifier <- getClassifier("EMC92") getWeights(aClassifier)
runClassifier
performs classification by applying a
classifier to gene expression data.
runClassifier(classifierParameters, fixedExpressionData, ...) ## S4 method for signature 'character,FixedExpressionData' runClassifier(classifierParameters, fixedExpressionData, ...) ## S4 method for signature 'ClassifierParameters,FixedExpressionData' runClassifier(classifierParameters, fixedExpressionData, ...)
runClassifier(classifierParameters, fixedExpressionData, ...) ## S4 method for signature 'character,FixedExpressionData' runClassifier(classifierParameters, fixedExpressionData, ...) ## S4 method for signature 'ClassifierParameters,FixedExpressionData' runClassifier(classifierParameters, fixedExpressionData, ...)
classifierParameters |
Either a text value indicating a
classifier name (see |
fixedExpressionData |
The data to be classified in the
form of a |
... |
see details |
A list of possible classifiers is obtained by
showClassifierList
. The data to be classified
is first to be processed by the setNormalizationMethod
function. By default the data is assumed to contain many (n>=25)
samples with corresponding probe-sets needed for classification.
If one of these conditions is not met, a classifier outcome might
be seriously affected. By default an error is given. Although
strongly discouraged, it is possible to circumvent the security
checks. If not all required probe-sets are included in the input
set, you can explicitly pass the parameter allow.reweighted = TRUE
to the runClassifier
function in order to determine the
classifier outcome using less probe-sets (e.g. possible if the
missing probe-sets are known to have minimal contribution).See
vignette("MissingCovariates")
for more information. If
the input data has a small number of samples, the default batch
correction becomes ineffective. If you are aware of the possible
negative effects you can force to not use batch correction by
passing the parameter do.batchcorrection=FALSE
.
The classification results as an object of class
ClassifierResults
.
Other workflow functions: getNormalizationMethod
,
setNormalizationMethod
,
showClassifierList
data(exampleMAS5) myData<-setNormalizationMethod(exampleMAS5,"MAS5.0",targetValue=500) runClassifier("EMC92",myData)
data(exampleMAS5) myData<-setNormalizationMethod(exampleMAS5,"MAS5.0",targetValue=500) runClassifier("EMC92",myData)
setNormalizationMethod
is to be called prior to running a classifier.
setNormalizationMethod(expressionSet, method, ...)
setNormalizationMethod(expressionSet, method, ...)
expressionSet |
An object of class |
method |
A character string indicating the normalization that was applied to the data.
Possible values are given by |
... |
see details. |
The FixedExpressionData
class forms together with the
ClassifierParameters
class the basis for input to the runClassifier
function. The data inside the FixedExpressionData
-class has to be stored as it is
right after normalization. This function may require some additional arguments:
isLog2Transformed = TRUE
Use this argument if the data already underwent a
log2transformation, as is common e.g. in case of MAS5.0 normalization.
targetValue = value
This is a MAS5.0 specific argument. It is the sample intensity
mean when the lowest and highest 2% of intensities are discarded. If only part of the original
expression set is given to this function, then this argument is required.
An object of class FixedExpressionData
Other workflow functions: getNormalizationMethod
,
runClassifier
,
showClassifierList
data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0",targetValue=500) results <- runClassifier('EMC92', myData) getScores( results ) getClassifications( results )
data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0",targetValue=500) results <- runClassifier('EMC92', myData) getScores( results ) getClassifications( results )
showClassifierList
gives a data.frame of all implemented classifiers.
showClassifierList(normalizations)
showClassifierList(normalizations)
normalizations |
an optional text argument of one or more normalization methods in order to filter the classifiers to be shown. |
The names of the classifiers shown can be used as input for the runClassifier
function and the getClassifier
function.
A data.frame with columns: "name","normalizationMethod" and "description"
Other workflow functions: getNormalizationMethod
,
runClassifier
,
setNormalizationMethod
showClassifierList() data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0",targetValue=500) results <- runClassifier('UAMS70', myData) getScores( results ) getClassifications( results )
showClassifierList() data(exampleMAS5) myData <- setNormalizationMethod(exampleMAS5, "MAS5.0",targetValue=500) results <- runClassifier('UAMS70', myData) getScores( results ) getClassifications( results )