Description Details Value Methods Author(s) References See Also Examples
The aldex.clr S4 class is a class which stores the data generated by the aldex.clr method.
An aldex.clr object contains the Monte Carlo Dirochlet instances derived
from estimating the technical variance of the raw read count data. It is
created by the aldex.clr.function
, which is invoked by the aldex.clr method.
It consists of four attributes: the sample names, the feature names,
the conditions vector (assigns each sample to a condition),
and the Monte Carlo Dirochlet instances themselves. These can be accessed,
along with information about the length of some attributes. A single Monte Carlo
instance can also be retrieved.
The aldex.clr object contains the clr transformed values for each Monte-Carlo Dirichlet instance, which can be accessed through getMonteCarloInstances(x)
, where x
is the clr
function output. Each list element is named by the sample ID. getFeatures(x)
returns the features, getSampleIDs(x)
returns sample IDs, and getFeatureNames(x)
returns the feature names.
In the code below, x
is an aldex.clr
object, and i
is a numeric whole number.
getMonteCarloInstances(x)
:
Returns x
's Monte Carlo Dirichlet instances.
getSampleIDs(x)
:
Returns the names of the samples. These can be used to access the
original reads, as in reads\$sampleID
(if the reads are a data frame).
getFeatures(x)
:
Returns the names of the features as a vector.
numFeatures(x)
:
Returns the number of features associated with the data.
numMCInstances(x)
:
Returns the names of the keys
that can be used to subset the
data rows. The keys
values are the rsid's.
getFeatureNames(x)
:
Returns the names of the keys
that can be used to subset the
data rows. The keys
values are the rsid's.
getReads(x)
:
Returns the names of the keys
that can be used to subset the
data rows. The keys
values are the rsid's.
numConditions(x)
:
Returns the names of the keys
that can be used to subset the
data rows. The keys
values are the rsid's.
getMonteCarloReplicate(x, i)
:
Returns the names of the keys
that can be used to subset the
data rows. The keys
values are the rsid's.
Greg Gloor, Ruth Grace Wong, Andrew Fernandes, Jia Rong Wu and Matt Links contributed to this code
Please use the citation given by citation(package="ALDEx")
.
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 | # The 'reads' data.frame or
# SummarizedExperiment object should have
# row and column names that are unique,
# and looks like the following:
#
# T1a T1b T2 T3 N1 N2 Nx
# Gene_00001 0 0 2 0 0 1 0
# Gene_00002 20 8 12 5 19 26 14
# Gene_00003 3 0 2 0 0 0 1
# Gene_00004 75 84 241 149 271 257 188
# Gene_00005 10 16 4 0 4 10 10
# Gene_00006 129 126 451 223 243 149 209
# ... many more rows ...
data(selex)
#subset for efficiency
selex <- selex[1201:1600,]
conds <- c(rep("NS", 7), rep("S", 7))
# x is an object of type aldex.clr
x <- aldex.clr(selex, conds, mc.samples = 2, denom="all", verbose = FALSE)
# get all of the Monte Carlo Dirochlet instances
monteCarloInstances <- getMonteCarloInstances(x)
# get sample names
sampleIDs <- getSampleIDs(x)
# get features
features <- getFeatures(x)
# get number of features
numFeatures <- numFeatures(x)
# get number of Monte Carlo Dirochlet instances
numInstances <- numMCInstances(x)
# get names of features
featureNames <- getFeatureNames(x)
# get number of conditions
conditions <- numConditions(x)
# get number of conditions
reads <- getReads(x)
# retrieve the first Monte Carlo Dirochlet instance.
monteCarloInstance <- getMonteCarloReplicate(x,1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.