treeData {miaViz} | R Documentation

## Adding information to tree data in `TreeSummarizedExperiment`

### Description

To facilitate the dressing of the tree data stored in a `TreeSummarizedExperiment` object, `rowTreeData` and `colTreeData` can be used.

### Usage

    rowTreeData(x, ...)

    colTreeData(x, ...)

    rowTreeData(x) <- value

    colTreeData(x) <- value

    combineTreeData(x, other_fields = list())

    combineTreeData(x, other_fields = list())

    ## S4 method for signature 'TreeSummarizedExperiment'
    colTreeData(x)

    ## S4 method for signature 'TreeSummarizedExperiment'
    rowTreeData(x)

    ## S4 replacement method for signature 'TreeSummarizedExperiment'
    colTreeData(x) <- value

    ## S4 replacement method for signature 'TreeSummarizedExperiment'
    rowTreeData(x) <- value

    ## S4 method for signature 'phylo'
    combineTreeData(x, other_fields = list())

    ## S4 method for signature 'treedata'
    combineTreeData(x, other_fields = list())

### Arguments

`x` | a `TreeSummarizedExperiment` object.
`...` | additional arguments, currently not used.
`other_fields, value` | a `data.frame` or coercible to one, with at least one type of id information. See details.

### Details

To match information to nodes, the id information in `other_fields` are used. These can either be a column, named ‘node’ or ‘label’ (‘node’ taking precedent), or rownames. If all rownames can be coerced to `integer`, they are considered as ‘node’ values, otherwise as ‘label’ values. The id information must be unique and match available values of `rowTreeData(c)`

The result of the accessors, `rowTreeData` and `colTreeData`, contain at least a ‘node’ and ‘label’ column.

### Value

a `data.frame` for the accessor and the modified `TreeSummarizedExperiment` object

### Examples

    data(GlobalPatterns)
    td <- rowTreeData(GlobalPatterns)
    td
    td$test <- rnorm(nrow(td))
    rowTreeData(GlobalPatterns) <- td
    rowTreeData(GlobalPatterns)
    combineTreeData(rowTree(GlobalPatterns), td)

[Package miaViz version 1.2.1 Index]