Title: | Implementation of gene expression anti-profiles |
---|---|
Description: | Implements gene expression anti-profiles as described in Corrada Bravo et al., BMC Bioinformatics 2012, 13:272 doi:10.1186/1471-2105-13-272. |
Authors: | Hector Corrada Bravo, Rafael A. Irizarry and Jeffrey T. Leek |
Maintainer: | Hector Corrada Bravo <[email protected]> |
License: | Artistic-2.0 |
Version: | 1.47.0 |
Built: | 2024-10-30 03:28:31 UTC |
Source: | https://github.com/bioc/antiProfiles |
This package implements the anti-profile method of Corrada Bravo et al., BMC Bioinformatics 2012, 13:272 doi:10.1186/1471-2105-13-272.
Hector Corrada Bravo [email protected]
This class encapsulates anti-profiles. Objects of this
class should be built from
AntiProfileStats
objects using the
buildAntiProfile
method. Anti-profile
scores can be computed for new samples using the
apCount
method.
## Accessors getProbesetIds(object) getNormalRegions(object)
## Accessors getProbesetIds(object) getNormalRegions(object)
object |
Object of class (or inheriting from)
|
In the following code object
is a
AntiProfile
object.
getProbesetIds
:vector of Affymetrix ids for probesets included in the anti-profile (character)
getNormalRegions
:median and upper boundary of normal expression regions (numeric matrix of dimension s-by-2, where s is the size of the anti-profile)
Hector Corrada Bravo [email protected]
AntiProfileStats
for the class of
objects from which anti-profiles are built.
buildAntiProfile for the method used to
construct objects of this class. apCount
for the function used to calculate anti-profile scores
from objects of this class.
if (require(antiProfilesData)) { data(apColonData) colonStats=apStats(exprs(apColonData), pData(apColonData)$Status) colonAP = buildAntiProfile(colonStats, tissueSpec=FALSE, sigsize=10) show(colonAP) head(getProbesetIds(colonAP)) head(getNormalRegions(colonAP)) }
if (require(antiProfilesData)) { data(apColonData) colonStats=apStats(exprs(apColonData), pData(apColonData)$Status) colonAP = buildAntiProfile(colonStats, tissueSpec=FALSE, sigsize=10) show(colonAP) head(getProbesetIds(colonAP)) head(getNormalRegions(colonAP)) }
This class stores statistics required to build
anti-profiles. Objects of this class should be built
using the apStats
function. To build
anti-profiles from objects of this class, use the
buildAntiProfile
function.
## Accessors getProbeStats(object)
## Accessors getProbeStats(object)
object |
Object of class
|
In the following code object
is a
AntiProfileStats
object.
getProbeStats
:Gets probeset statistics. A
data.frame
with columns
affyid
:Affymetrix probeset id (character)
SD0
:Normal expression standard deviation aggregated over tissue types (numeric)
SD1
:Cancer expression standard deviation aggregated over tumor types (numeric)
stat
:The log2-variance ratio statistic (numeric)
meds0
:Median normal expression aggregated over tissue types (numeric)
mads0
:Median absolute deviation of normal expression aggregate over tissue types (numeric)
Hector Corrada Bravo [email protected]
apStats
to construct objects of this class,
buildAntiProfile
to build anti-profiles
from objects of this class.
if (require(antiProfilesData)) { data(apColonData) colonStats = apStats(exprs(apColonData), pData(apColonData)$Status) show(getProbeStats(colonStats)) }
if (require(antiProfilesData)) { data(apColonData) colonStats = apStats(exprs(apColonData), pData(apColonData)$Status) show(getProbeStats(colonStats)) }
This function applies the given anti-profile to a new set of samples. Rownames in the expression matrix are used to match probenames in the AntiProfile object.
fit |
an object of class AntiProfile as produced by the buildAntiProfile method |
expr |
a matrix of gene expression, rownames are used as identifiers |
a numeric vector of anti-profile scores
Hector Corrada Bravo [email protected]
if (require(antiProfilesData)) { data(apColonData) # compute statistics colonStats = apStats(exprs(apColonData), pData(apColonData)$Status) # create an anti-profile, ignoring tissue-specificity of probesets, with 10 probesets ap = buildAntiProfile(colonStats, tissueSpec=FALSE, sigsize=10) # get counts for the original dataset counts =apCount(ap, exprs(apColonData)) }
if (require(antiProfilesData)) { data(apColonData) # compute statistics colonStats = apStats(exprs(apColonData), pData(apColonData)$Status) # create an anti-profile, ignoring tissue-specificity of probesets, with 10 probesets ap = buildAntiProfile(colonStats, tissueSpec=FALSE, sigsize=10) # get counts for the original dataset counts =apCount(ap, exprs(apColonData)) }
Reorders given AntiProfileStats object using provided ordering o
stats |
An object of class AntiProfileStats |
o |
A numeric vector giving new probe ordering |
A reordered AntiProfileStats object
Hector Corrada Bravo [email protected]
if (require(antiProfilesData)) { data(apColonData) colonStats = apStats(exprs(apColonData), pData(apColonData)$Status) o = sample(seq(len=nrow(slot(colonStats,"probes")))) newStats = apReorder(colonStats, o) }
if (require(antiProfilesData)) { data(apColonData) colonStats = apStats(exprs(apColonData), pData(apColonData)$Status) o = sample(seq(len=nrow(slot(colonStats,"probes")))) newStats = apReorder(colonStats, o) }
This function calculates normal ranges of expressions and variance ratios for all probesets. To create an anti-profile, call buildAntiProfile on the output of this function
apStats(e, cl, tiss = NULL, minL = 10, cutoff = 5, OnCutoff = 2.54)
apStats(e, cl, tiss = NULL, minL = 10, cutoff = 5, OnCutoff = 2.54)
e |
matrix of gene expression, with one column per sample |
cl |
vector of normal/cancer indicators as 0/1 |
tiss |
vector of tissue types for each sample |
minL |
minimum number of samples of a given tissue/class to compute stats |
cutoff |
median absolute deviation multiplier used to determine proportion of samples within normal range of expression |
OnCutoff |
gene expression barcode z-score to determine if a gene is expressed |
An object of class SuccsStats
Hector Corrada Bravo [email protected]
AntiProfileStats
for the type of
object returned. buildAntiProfile
to
construct anti-profiles with objects returned by this
function.
if (require(antiProfilesData)) { data(apColonData) colonStats = apStats(exprs(apColonData), pData(apColonData)$Status) }
if (require(antiProfilesData)) { data(apColonData) colonStats = apStats(exprs(apColonData), pData(apColonData)$Status) }
This function creates anti-profile using statistics stored in a AntiProfileStats object
stats |
an object of class AntiProfileStats as produced by the apStats function |
tissueSpec |
use tissue-specific regions of normal expression |
tissueFilter |
use only tissue-specific genes in the anti-profile |
sigsize |
desired size of signature, if NULL, computed from statCutoff |
cutoff |
median absolute deviation multiplier used to define normal regions of expression |
statCutoff |
cutoff used to include probesets in anti-profile |
an object of class AntiProfilesSig or AntiProfilesTissueSig depending on the tissueSpec argument
Hector Corrada Bravo [email protected]
if (require(antiProfilesData)) { # create an anti-profile, ignoring tissue-specificity of probesets, with 10 probesets data(apColonData) colonStats = apStats(exprs(apColonData), pData(apColonData)$Status) ap = buildAntiProfile(colonStats, tissueSpec=FALSE, sigsize=10) }
if (require(antiProfilesData)) { # create an anti-profile, ignoring tissue-specificity of probesets, with 10 probesets data(apColonData) colonStats = apStats(exprs(apColonData), pData(apColonData)$Status) ap = buildAntiProfile(colonStats, tissueSpec=FALSE, sigsize=10) }
This function computes expression variability in a way that removes dependence on mean expression. It uses a local polynomial likelihood method to estimate variance as gamma distributed around given mean expression for each probeset. This function makes this calculation using all samples in argument. To calculate expression variability for samples in different groups, call this function for each subset of columns separately.
ev(x, cutoff = NULL, plot = FALSE, ...)
ev(x, cutoff = NULL, plot = FALSE, ...)
x |
matrix of gene expression, with one column per sample |
cutoff |
minimum expression value to be included in computation (for |
plot |
make a plot of local likelihood model using |
... |
arguments passed to |
numeric vector of length equal to number of rows of x
Hector Corrada Bravo [email protected]
E. Alemu, H. Corrada Bravo, S. Hannenhalli (2014). Determinants of Expression Variability. Nucleic Acids Research, 42 (6), 3503-14.
frma
for normalization
if (require(antiProfilesData)) { data(apColonData) e <- exprs(apColonData)[,pData(apColonData)$Status==1] ev <- ev(e, cutoff=2.54) }
if (require(antiProfilesData)) { data(apColonData) e <- exprs(apColonData)[,pData(apColonData)$Status==1] ev <- ev(e, cutoff=2.54) }
This class encapsulates anti-profiles with
tissue-specific normal expression regions. Objects of
this class should be built from
AntiProfileStats
objects using the
buildAntiProfile
method. Anti-profile
scores can be computed for new samples using the
apCount
method.
## Accessors ## S4 method for signature 'TissueSpecAntiProfile' getProbesetIds(object) ## S4 method for signature 'TissueSpecAntiProfile' getNormalRegions(object) getNormalTissueRegions(object)
## Accessors ## S4 method for signature 'TissueSpecAntiProfile' getProbesetIds(object) ## S4 method for signature 'TissueSpecAntiProfile' getNormalRegions(object) getNormalTissueRegions(object)
object |
Object of class
|
In the following code object
is a
TissueSpecAntiProfile
object.
getProbesetIds
:vector of Affymetrix ids for probesets included in the anti-profile (character)
getNormalRegions
:median and upper boundary of normal expression regions (numeric matrix of dimension s-by-2, where s is the size of the anti-profile)
getNormalTissueRegions
:median and upper boundary of normal expression regions (numeric array of dimension s-by-2-by-t, where s is the size of the anti-profile, and t the number of normal tissues used in the anti-profile)
Hector Corrada Bravo [email protected]
AntiProfileStats
for the class of
objects from which anti-profiles are built.
buildAntiProfile for the method used to
construct objects of this class. apCount
for the function used to calculate anti-profile scores
from objects of this class. #'
if (require(antiProfilesData)) { data(apColonData) # fake tissues tissue=rep(c("colon","lung"), len=length(sampleNames(apColonData))) tissStats=apStats(exprs(apColonData), pData(apColonData)$Status, tiss=tissue, minL=3) tissAP=buildAntiProfile(tissStats, sigsize=10) show(tissAP) head(getProbesetIds(tissAP)) head(getNormalRegions(tissAP)) head(getNormalTissueRegions(tissAP)) }
if (require(antiProfilesData)) { data(apColonData) # fake tissues tissue=rep(c("colon","lung"), len=length(sampleNames(apColonData))) tissStats=apStats(exprs(apColonData), pData(apColonData)$Status, tiss=tissue, minL=3) tissAP=buildAntiProfile(tissStats, sigsize=10) show(tissAP) head(getProbesetIds(tissAP)) head(getNormalRegions(tissAP)) head(getNormalTissueRegions(tissAP)) }