The phyloCompData
class extends the compData
class
with sequence length and phylogeny related information.
phyloCompData(
count.matrix,
sample.annotations,
info.parameters,
variable.annotations = data.frame(),
filtering = "no info",
analysis.date = "",
package.version = "",
method.names = list(),
code = "",
result.table = data.frame(),
tree = list(),
length.matrix = matrix(NA_integer_, 0, 0)
)
A count matrix, with genes as rows and observations as columns.
A data frame, containing at least one column named 'condition', encoding the grouping of the observations into two groups, and one column named id.species
of factors giving the species for each sample if the tree is specified. The row names should be the same as the column names of count.matrix. Class data.frame
.
A list containing information regarding simulation parameters etc. The only mandatory entries are dataset
and uID
, but it may contain entries such as the ones listed below (see generateSyntheticData
for more detailed information about each of these entries).
dataset
: an informative name or identifier of the data set (e.g., summarizing the simulation settings).
samples.per.cond
n.diffexp
repl.id
seqdepth
minfact
maxfact
fraction.upregulated
between.group.diffdisp
filter.threshold.total
filter.threshold.mediancpm
fraction.non.overdispersed
random.outlier.high.prob
random.outlier.low.prob
single.outlier.high.prob
single.outlier.low.prob
effect.size
uID
: a unique ID for the data set. In contrast to dataset
, the uID
is unique e.g. for each instance of replicated data sets generated with the same simulation settings.
A data frame with variable annotations (with number of rows equal to the number of rows in count.matrix
, that is, the number of variables in the data set). Not mandatory, but may contain columns such as the ones listed below. If present, the row names should be the same as the row names of the count.matrix
.
truedispersions.S1
: the true dispersion for each gene in condition S1.
truedispersions.S2
: the true dispersion for each gene in condition S2.
truemeans.S1
: the true mean value for each gene in condition S1.
truemeans.S2
: the true mean value for each gene in condition S2.
n.random.outliers.up.S1
: the number of 'random' outliers with extremely high counts for each gene in condition S1.
n.random.outliers.up.S2
: the number of 'random' outliers with extremely high counts for each gene in condition S2.
n.random.outliers.down.S1
: the number of 'random' outliers with extremely low counts for each gene in condition S1.
n.random.outliers.down.S2
: the number of 'random' outliers with extremely low counts for each gene in condition S2.
n.single.outliers.up.S1
: the number of 'single' outliers with extremely high counts for each gene in condition S1.
n.single.outliers.up.S2
: the number of 'single' outliers with extremely high counts for each gene in condition S2.
n.single.outliers.down.S1
: the number of 'single' outliers with extremely low counts for each gene in condition S1.
n.single.outliers.down.S2
: the number of 'single' outliers with extremely low counts for each gene in condition S2.
M.value
: the M-value (observed log2 fold change between condition S1 and condition S2) for each gene.
A.value
: the A-value (observed average expression level across condition S1 and condition S2) for each gene.
truelog2foldchanges
: the true (simulated) log2 fold changes between condition S1 and condition S2.
upregulation
: a binary vector indicating which genes are simulated to be upregulated in condition S2 compared to condition S1.
downregulation
: a binary vector indicating which genes are simulated to be downregulated in condition S2 compared to condition S1.
differential.expression
: a binary vector indicating which genes are simulated to be differentially expressed in condition S2 compared to condition S1.
A character string containing information about the filtering that has been applied to the data set.
If a differential expression analysis has been performed, a character string detailing when it was performed.
If a differential expression analysis has been performed, a character string giving the version of the differential expression packages that were applied.
If a differential expression analysis has been performed, a list with entries full.name
and short.name
, giving the full name of the differential expression method (may including version number and parameter settings) and a short name or abbreviation.
If a differential expression analysis has been performed, a character string containing the code that was run to perform the analysis. The code should be in R markdown format, and can be written to an HTML file using the generateCodeHTMLs
function.
If a differential expression analysis has been performed, a data frame containing the results of the analysis. The number of rows should be equal to the number of rows in count.matrix
and if present, the row names should be identical. The only mandatory column is score
, which gives a score for each gene, where a higher score suggests a "more highly differentially expressed" gene. Different comparison functions use different columns of this table, if available. The list below gives the columns that are used by the interfaced methods.
pvalue
nominal p-values
adjpvalue
p-values adjusted for multiple comparisons
logFC
estimated log-fold changes between the two conditions
score
the score that will be used to rank the genes in order of significance. Note that high scores always signify differential expression, that is, a strong association with the predictor. For example, for methods returning a nominal p-value the score can be defined as 1 - pvalue.
FDR
false discovery rate estimates
posterior.DE
posterior probabilities of differential expression
prob.DE
conditional probabilities of differential expression
lfdr
local false discovery rates
statistic
test statistics from the differential expression analysis
dispersion.S1
dispersion estimates in condition S1
dispersion.S2
dispersion estimates in condition S2
The phylogenetic tree describing the relationships between samples. The taxa names of the tree
should be the same as the column names of the count.matrix
.
The length matrix, with genes as rows and samples as columns. The column names of the length.matrix
should be the same as the column names of the count.matrix
.
A phyloCompData
object.
tree <- ape::read.tree(
text = "(((A1:0,A2:0,A3:0):1,B1:1):1,((C1:0,C2:0):1.5,(D1:0,D2:0):1.5):0.5);"
)
count.matrix <- round(matrix(1000*runif(8000), 1000))
sample.annotations <- data.frame(condition = c(1, 1, 1, 1, 2, 2, 2, 2),
id.species = c("A", "A", "A", "B", "C", "C", "D", "D"))
info.parameters <- list(dataset = "mydata", uID = "123456")
length.matrix <- round(matrix(1000*runif(8000), 1000))
colnames(count.matrix) <- colnames(length.matrix) <- rownames(sample.annotations) <- tree$tip.label
cpd <- phyloCompData(count.matrix, sample.annotations, info.parameters,
tree = tree, length.matrix = length.matrix)