Description Usage Arguments Details Value See Also Examples
View source: R/functions.public.R
Calculates the genes ranking and/or plots the posterior probability of the genes ordered by class ranking.
1 2 3 4 5 6 | calculateGenesRanking(eset=NULL, sampleLabels=NULL,
numGenesPlot=1000, plotTitle="Significant genes", plotLp=TRUE,
lpThreshold = 0.95, numSignificantGenesType="ranked",
returnRanking="full", nullHiphothesisFilter=0.95, nGenesExprDiff=1000,
geneLabels=NULL, precalcGenesRanking=NULL, IQRfilterPercentage= 0,
verbose=TRUE)
|
eset |
ExpressionSet or Matrix. Gene expression of the train samples (positive & non-logaritmic normalized values). |
sampleLabels |
Character. PhenoData variable (column name) containing the train samples class labels. |
numGenesPlot |
Integer. Number of genes to plot. |
plotTitle |
Character. Plot title. |
plotLp |
Logical. If FALSE no plot is drawn. |
lpThreshold |
Numeric between 0 and 1. Required posterior probability value to consider a gene 'significant'. |
numSignificantGenesType |
Character. Type of count for number of genes over lpThreshold.
|
returnRanking |
Character. Type of ranking to return:
|
nullHiphothesisFilter |
Numeric between 0 and 1. Genes with a Null Hipothesis with a posterior probability over this threshold will be removed from the ranking. |
nGenesExprDiff |
Numeric. Number of top genes to calculate the differencial expression for. |
geneLabels |
Vector or Matrix. Gene name, ID or label which should be shown in the returned results and plots. |
IQRfilterPercentage |
Integer. InterQuartile Range (IQR) filter applied to the initial data. Not recommended for more than two classes. |
precalcGenesRanking |
Allows providing a |
verbose |
Logical. If TRUE, messages indicating the execution progress will be printed on screen. |
Significant genes: Genes with posterior probability over 'lpThreshold'.
More significant genes may mean:
Very different class
More systemic disease
Plot lines represet the posterior probability of genes, sorted by rank from left to right.
In order to find genes that diferentiate the classes from each other, the function ranks the genes bassed on their posterior probability for each class.
The posterior probability represents how well a gene differentiates samples from a class, from samples from other classes. Therefore, Genes with high posterior probability are good to differentiate a class from all the others.
This posterior probability is calculated by emfit (pkg:EBarrays)
, an expectation-maximization (EM) algorithm for gene expression mixture model.
GenesRanking
Optional. Requested genes ranking.
Plot Optional. Plot of the posterior probability of the top genes.
plot.GenesRanking
is a shortcut to plotting a previusly calculated genes ranking.
i.e. plot(genesRanking)
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # Load an expressionSet:
library(leukemiasEset)
data(leukemiasEset)
# Select the train samples:
trainSamples<- c(1:10, 13:22, 25:34, 37:46, 49:58)
# summary(leukemiasEset$LeukemiaType[trainSamples])
## Not run:
######
# Calculate/plot the significant genes (+ info) of a dataset
# without training classifier/calculating network
######
# Return only significant genes ranking (default)
signGenesRanking <- calculateGenesRanking(leukemiasEset[,trainSamples],
sampleLabels="LeukemiaType")
numGenes(signGenesRanking)
# Return the full genes ranking:
fullRanking <- calculateGenesRanking(leukemiasEset[,trainSamples],
sampleLabels="LeukemiaType", returnRanking="full")
numGenes(fullRanking)
numSignificantGenes(fullRanking)
# The significant genes can then be extracted from it:
signGenesRanking2 <- getTopRanking(fullRanking,
numGenesClass=numSignificantGenes(fullRanking))
numGenes(signGenesRanking2)
# Changing the posterior probability required to consider genes significant:
signGenesRanking90 <- calculateGenesRanking(leukemiasEset[,trainSamples],
sampleLabels="LeukemiaType", lpThreshold=0.9)
numGenes(signGenesRanking90)
## End(Not run)
######
# Ploting previously calculated rankings:
######
# Load or calculate a ranking (or a classifier with geNetClassifier)
data(leukemiasClassifier) # Sample trained classifier, @genesRanking
# Default plot:
# - equivalent to plot(leukemiasClassifier@genesRanking)
# - in this case, the previously calculated 'fullRanking'
# is equivalent to 'leukemiasClassifier@genesRanking'
calculateGenesRanking(precalcGenesRanking=leukemiasClassifier@genesRanking)
# Changing arguments:
calculateGenesRanking(precalcGenesRanking=leukemiasClassifier@genesRanking,
numGenesPlot=5000, plotTitle="Leukemias", lpThreshold=0.9)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.