treeData: Adding information to tree data in 'TreeSummarizedExperiment'

treeDataR 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, tree.name = tree_name, tree_name = "phylo") <- value

colTreeData(x, tree.name = tree_name, tree_name = "phylo") <- value

combineTreeData(x, other.fields = other_fields, other_fields = list())

combineTreeData(x, other.fields = other_fields, other_fields = list())

## S4 method for signature 'TreeSummarizedExperiment'
colTreeData(x, tree.name = tree_name, tree_name = "phylo")

## S4 method for signature 'TreeSummarizedExperiment'
rowTreeData(x, tree.name = tree_name, tree_name = "phylo")

## S4 replacement method for signature 'TreeSummarizedExperiment'
colTreeData(x, tree.name = tree_name, tree_name = "phylo") <- value

## S4 replacement method for signature 'TreeSummarizedExperiment'
rowTreeData(x, tree.name = tree_name, tree_name = "phylo") <- value

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

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

Arguments

x

a TreeSummarizedExperiment object.

...

additional arguments, currently not used.

tree.name

Character scalar. Specifies a rowTree/colTree from x. (Default: "phylo")

tree_name

Deprecated. Use tree.name instead.

other.fields, value

a data.frame or coercible to one, with at least one type of id information. See details.(Default: list())

other_fields

Deprecated. Use other.fields instead.

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)

microbiome/miaViz documentation built on Nov. 4, 2024, 12:25 a.m.