treeSummarizedExperiment-constructor: Construct a treeSummarizedExperiment object

Description Usage Arguments Value Author(s) See Also Examples

Description

treeSummarizedExperiment constructs a treeSummarizedExperiment object.

Usage

1
2

Arguments

tree

A phylo object

linkData

A data frame or DataFrame-class. It has the same number of rows as the matrix-like elements of assays. The row order of the linkData matches with that of the matrix-like element of assays. It has the following columns.

  • nodeLab The labels of nodes on the tree.

  • nodeLab_alias An alias of column nodeLab. It is created only when there are missing value or duplicated value in column nodeLab. A prefix "Node_" and "Leaf_" is added to the node number (column nodeNum) for the internal nodes and the leaf nodes, respectively.

  • nodeNum The numbers of nodes

  • isLeaf It indicates whether the node is a leaf node

  • rowID The corresponding row number of the matrix-like elements in assays

message

A logical value. Defaut is FALSE. If TRUE, the running process is given.

...

For SummarizedExperiment, S4 methods list and matrix, arguments identical to those of the SimpleList method.

For rowRanges, ignored.

Value

a treeSummarizedExperiment object

Author(s)

Ruizhu HUANG

See Also

treeSummarizedExperiment-class treeSummarizedExperiment-accessor leafSummarizedExperiment-class SummarizedExperiment-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
data("tinyTree")

# the count table
count <- matrix(rpois(100, 50), nrow = 10)
rownames(count) <- c(tinyTree$tip.label)
colnames(count) <- paste("C_", 1:10, sep = "_")

# The sample information
sampC <- data.frame(condition = rep(c("control", "trt"), each = 5),
                    gender = sample(x = 1:2, size = 10, replace = TRUE))
rownames(sampC) <- colnames(count)

# build a treeSummarizedExperiment object
tse <- treeSummarizedExperiment(tree = tinyTree,
                                assays = list(count),
                                colData = sampC)

# if there are data to be put in the linkData
tax <- data.frame(family = rep(LETTERS[1:2], each = 5))
tax$nodeLab <- tinyTree$tip.label
ntse <- treeSummarizedExperiment(tree = tinyTree,
                                assays = list(count),
                                colData = sampC,
                                linkData = tax)

markrobinsonuzh/treeAGG documentation built on May 26, 2019, 9:32 a.m.