Description Creating Objects Slots Methods Author(s) See Also Examples
Class to contain and describe results of a differential expression (DE) analysis. The main components are statistic
which hold the results of any statistic (e.g. p-values, PPLR values, etc.), and FC
which hold the fold changes.
DEResult
objects will generally be created using one of the functions pumaDE
, calculateLimma
, calculateFC
or calculateTtest
.
Objects can also be created from scratch:
new("DEResult")
new("DEResult",
statistic=matrix()
, FC=matrix()
, statisticDescription="unknown"
, DEMethod="unknown"
)
statistic
:Object of class "matrix" holding the statistics returned by the DE method.
FC
:Object of class "matrix" holding the fold changes returned by the DE method.
statisticDescription
:A text description of the contents of the statistic
slot.
DEMethod
:A string indicating which DE method was used to create the object.
Class-specific methods.
statistic(DEResult)
, statistic(DEResult,matrix)<-
Access and
set the statistic
slot.
FC(DEResult)
, FC(DEResult,matrix)<-
Access and
set the FC
slot.
statisticDescription(DEResult)
, statisticDescription(DEResult,character)<-
Access and
set the statisticDescription
slot.
DEMethod(DEResult)
, DEMethod(DEResult,character)<-
Access and
set the DEMethod
slot.
pLikeValues(object, contrast=1, direction="either")
Access the statistics of an object of class DEResult
, converted to "p-like values". If the object holds information on more than one contrast, only the values of the statistic for contrast number contrast
are given. Direction can be "either" (meaning we want order genes by probability of being either up- or down-regulated), "up" (meaning we want to order genes by probability of being up-regulated), or "down" (meaning we want to order genes by probability of being down-regulated). "p-like values" are defined as values between 0 and 1, where 0 identifies the highest probability of being differentially expressed, and 1 identifies the lowest probability of being differentially expressed. We use this so that we can easily compare results from methods that provide true p-values (e.g. calculateLimma
) and methods methods that do not provide p-values (e.g. pumaDE
). For objects created using pumaDE
, this returns 1-PPLR if the direction is "up", PPLR if direction is "down", and 1-abs(2*(PPLR-0.5)) if direction is "either". For objects created using calculateLimma
or calculateTtest
, this returns the p-value if direction is "either", ((p-1 * sign(FC))/2)+ 0.5, if the direction is "up", and ((1-p * sign(FC))/2)+ 0.5 if the direction is "down". For all other methods, this returns the rank of the appropriate statistic, scaled to lie between 0 and 1. contrast
will be returned.
topGenes(object, numberOfGenes=1, contrast=1, direction="either")
Returns the index numbers (row numbers) of the genes determined to be most likely to be differentially expressed. numberOfGenes
specifies the number of genes to be returned by the function. If the object holds information on more than one contrast, only the values of the statistic for contrast number contrast
are given. Direction can be "either" (meaning we want order genes by probability of being either up- or down-regulated), "up" (meaning we want to order genes by probability of being up-ragulated), or "down" (meaning we want to order genes by probability of being down-regulated). Note that genes are ordered by "p-like values" (see pLikeValues
). object
is an object of class DEResult
.
topGeneIDs(object, numberOfGenes=1, contrast=1, direction="either")
Returns the Affy IDs (row names) of the genes determined to be most likely to be differentially expressed. numberOfGenes
specifies the number of genes to be returned by the function. If the object holds information on more than one contrast, only the values of the statistic for contrast number contrast
are given. Direction can be "either" (meaning we want order genes by probability of being either up- or down-regulated), "up" (meaning we want to order genes by probability of being up-ragulated), or "down" (meaning we want to order genes by probability of being down-regulated). Note that genes are ordered by "p-like values" (see pLikeValues
). object
is an object of class DEResult
.
numberOfProbesets(object)
Returns the number of probesets (number of rows) in an object of class DEResult
. This method is synonymous with numberOfGenes.
numberOfGenes(object)
Returns the number of probesets (number of rows) in an object of class DEResult
. This method is synonymous with numberOfProbesets.
numberOfContrasts(object)
Returns the number of contrasts (number of columns) in an object of class DEResult
.
write.reslts(object)
signature(x = "DEResult")
: writes the statistics and related fold changes (FCs) to
files. It takes the same arguments as write.table
. The argument "file" does not need to set any
extension. The different file marks and extension "csv" will be added automatically. The default file name is "tmp".
In the final results, statistics are in the file "tmp\_statistics.csv", and FCs are in
"tmp\_FCs.csv" respectively.
Standard generic methods:
show(object)
Informatively display object contents.
Richard D. Pearson
Related methods pumaDE
, calculateLimma
, calculateFC
or calculateTtest
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | if(FALSE){
## Create an example DEResult object
# Next 4 lines commented out to save time in package checks, and saved version used
# if (require(affydata)) {
# data(Dilution)
# eset_mmgmos <- mmgmos(Dilution)
# }
data(eset_mmgmos)
# Next line used so eset_mmgmos only has information about the liver factor
# The scanner factor will thus be ignored, and the two arrays of each level
# of the liver factor will be treated as replicates
pData(eset_mmgmos) <- pData(eset_mmgmos)[,1,drop=FALSE]
# To save time we'll just use 100 probe sets for the example
eset_mmgmos_100 <- eset_mmgmos[1:100,]
eset_comb <- pumaComb(eset_mmgmos_100)
esetDE <- pumaDE(eset_comb)
## Use some of the methods
statisticDescription(esetDE)
DEMethod(esetDE)
numberOfProbesets(esetDE)
numberOfContrasts(esetDE)
topGenes(esetDE)
topGenes(esetDE, 3)
pLikeValues(esetDE)[topGenes(esetDE,3)]
topGeneIDs(esetDE, 3)
topGeneIDs(esetDE, 3, direction="down")
## save the expression results into files
write.reslts(esetDE, file="example")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.