Description Usage Arguments Value Author(s) Examples
treeAGG
combines the p values with the tree structure and decide the
which nodes to be aggregated to based on the min-p algorithm.
1 2 3 4 5 6 7 8 9 10 | treeAGG(data, sigf.by = "FDR", sigf.limit = 0.05, agg.by = "FDR",
tree, message = FALSE)
## S4 method for signature 'treeSummarizedExperiment'
treeAGG(data, sigf.by, sigf.limit,
agg.by, message)
## S4 method for signature 'ANY'
treeAGG(data, sigf.by = "FDR", sigf.limit = 0.05,
agg.by = "FDR", tree, message = FALSE)
|
data |
A data frame or a treeSummarizedExperiment. If a data frame, it should include at least:
|
sigf.by |
A column name. The column contains the p value or adjusted p value. |
sigf.limit |
A numeric value. The threshold value (for p value or
adjusted p value) to reject a null hypothesis. The chosen value depends on
the |
agg.by |
A column name. The column used to do tree aggregation. Commonly, it is the column including p value or adjusted p value. |
tree |
A phylo object. A optional argument. Only use when |
message |
A logical value. The default is TRUE. If TRUE, it will print out the currenet status of a process. |
A data frame
Ruizhu Huang
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 | set.seed(1)
y <- matrix(rnbinom(300, size = 1, mu = 10), nrow = 10)
colnames(y) <- paste(rep(LETTERS[1:3], each = 10),
rep(1:10,3), sep = "_")
rownames(y) <- tinyTree$tip.label
rowInf <- data.frame(nodeLab = rownames(y),
var1 = sample(letters[1:3], 10, replace = TRUE),
var2 = sample(c(TRUE, FALSE), 10, replace = TRUE),
stringsAsFactors = FALSE)
colInf <- data.frame(gg = factor(sample(1:3, 30, replace = TRUE)),
group = rep(LETTERS[1:3], each = 10))
toy_lse <- leafSummarizedExperiment(tree = tinyTree,
assays = list(y, (2*y), 3*y),
rowData = rowInf,
colData = colInf)
toy_tse <- nodeValue(data = toy_lse, fun = sum, message = TRUE)
new_tse <- runEdgeR(obj = toy_tse, use.assays = 1, design = NULL,
contrast = NULL, normalize = TRUE, method = "TMM",
adjust.method = "BH")
# the aggKeep column stores the information whether a node is kept after the
# aggregation
outR1 <- treeAGG(data = new_tse)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.