TreeSummarizedExperiment-constructor {TreeSummarizedExperiment} | R Documentation

## Construct a TreeSummarizedExperiment object

### Description

`TreeSummarizedExperiment` constructs a TreeSummarizedExperiment object.

### Usage

    TreeSummarizedExperiment(
      ...,
      rowTree = NULL,
      colTree = NULL,
      rowNodeLab = NULL,
      colNodeLab = NULL,
      referenceSeq = NULL
    )

### Arguments

`...` | Arguments passed to the `SummarizedExperiment` constructor to fill the slots of the base class.
`rowTree` | A phylo object that provides hiearchical information of rows of assay tables.
`colTree` | A phylo object that provides hiearchical information of columns of assay tables.
`rowNodeLab` | A character string. It provides the labels of nodes that the rows of `assays` tables corresponding to. If NULL (default), the row names of the `assays` tables are used.
`colNodeLab` | A character string. It provides the labels of nodes that the columns of `assays` tables corresponding to. If NULL (default), the column names of the `assays` tables are used.
`referenceSeq` | A `DNAStringSet`/`DNAStringSetList` object or some object coercible to a `DNAStringSet`/`DNAStringSetList` object. See `DNAStringSet` for more details.

### Details

The output TreeSummarizedExperiment object has very similar structure as the `SingleCellExperiment`. The differences are summarized be as below.

- rowTree A slot exists in `TreeSummarizedExperiment` but not in `SingleCellExperiment`. It stores the tree structure(s) that provide(s) hierarchical information of `assays` rows or columns or both.

- rowData If a `phylo` object is available in the slot `treeData` to provide the hiearchical information about the rows of the `assays` table, the `rowData` would be a `LinkDataFrame-class` instead of `DataFrame`. The data on the right side of the vertical line provides the link information between the `assays` rows and the tree `phylo` object, and could be accessed via `linkData`; The data on the left side is the original `rowData` like `SingleCellExperiment` object.

- colData Similar to the explanaition for rowData as above.

More details about the `LinkDataFrame` in the `rowData` or `colData`.

- nodeLab The labels of nodes on the tree.

- nodeLab\_alias The alias of node labels on the tree.

- nodeNum The numbers of nodes on the tree.

- isLeaf It indicates whether the node is a leaf node or internal node.

### Value

a TreeSummarizedExperiment object

### Author(s)

Ruizhu HUANG

### See Also

`TreeSummarizedExperiment` `TreeSummarizedExperiment-accessor` `SingleCellExperiment`

### Examples

    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(assays = list(count),
                                    colData = sampC,
                                    rowTree = tinyTree)

[Package TreeSummarizedExperiment version 2.2.0 Index]