Contents

1 Introduction

The TreeSummarizedExperiment class is an extension of the SingleCellExperiment class (Lun and Risso 2020). It’s used to store rectangular data of experimental results as in a SingleCellExperiment, and also supports the storage of a hierarchical structure and its link information to the rectangular data.

2 TreeSummarizedExperiment

2.1 Anatomy of TreeSummarizedExperiment

The structure of the TreeSummarizedExperiment class.

Figure 1: The structure of the TreeSummarizedExperiment class

Compared to the SingleCellExperiment objects, TreeSummarizedExperiment has four additional slots:

  • rowTree: the hierarchical structure on the rows of the assays.
  • rowLinks: the link information between rows of the assays and the rowTree.
  • colTree: the hierarchical structure on the columns of the assays.
  • colLinks: the link information between columns of the assays and the colTree.

The rowTree and\(/\)or colTree can be left empty (NULL) if no trees are available; in this case, the rowLinks and\(/\)or colLinks are also set to NULL. All other TreeSummarizedExperiment slots are inherited from SingleCellExperiment.

The rowTree and colTree slots require the tree to be an object of the phylo class. If a tree is available in an alternative format, it can often be converted to a phylo object using dedicated R packages (e.g., treeio (Wang et al. 2019)).

Functions in the TreeSummarizedExperiment package fall in two main categories: operations on the TreeSummarizedExperiment object or operations on the tree (phylo) objects. The former includes constructors and accessors, and the latter serves as “pieces” to be assembled as accessors or functions that manipulate the TreeSummarizedExperiment object. Given that more than 200 R packages make use of the phylo class, there are many resources (e.g., ape) for users to manipulate the small “pieces” in addition to those provided in TreeSummarizedExperiment.

2.2 Toy data

We generate a toy dataset that has observations of 6 entities collected from 4 samples as an example to show how to construct a TreeSummarizedExperiment object.

library(TreeSummarizedExperiment)

# assays data (typically, representing observed data from an experiment)
assay_data <- rbind(rep(0, 4), matrix(1:20, nrow = 5))
colnames(assay_data) <- paste0("sample", 1:4)
rownames(assay_data) <- paste("entity", seq_len(6), sep = "")
assay_data
##         sample1 sample2 sample3 sample4
## entity1       0       0       0       0
## entity2       1       6      11      16
## entity3       2       7      12      17
## entity4       3       8      13      18
## entity5       4       9      14      19
## entity6       5      10      15      20

The information of entities and samples are given in the row_data and col_data, respectively.

# row data (feature annotations)
row_data <- data.frame(Kingdom = "A",
                       Phylum = rep(c("B1", "B2"), c(2, 4)),
                       Class = rep(c("C1", "C2", "C3"), each = 2),
                       OTU = paste0("D", 1:6),
                       row.names = rownames(assay_data),
                       stringsAsFactors = FALSE)

row_data
##         Kingdom Phylum Class OTU
## entity1       A     B1    C1  D1
## entity2       A     B1    C1  D2
## entity3       A     B2    C2  D3
## entity4       A     B2    C2  D4
## entity5       A     B2    C3  D5
## entity6       A     B2    C3  D6
# column data (sample annotations)
col_data <- data.frame(gg = c(1, 2, 3, 3),
                       group = rep(LETTERS[1:2], each = 2), 
                       row.names = colnames(assay_data),
                       stringsAsFactors = FALSE)
col_data
##         gg group
## sample1  1     A
## sample2  2     A
## sample3  3     B
## sample4  3     B

The hierarchical structure of the 6 entities and 4 samples are denoted as row_tree and col_tree, respectively. The two trees are phylo objects randomly created with rtree from the package ape. Note that the row tree has 5 rather than 6 leaves; this is used later to show that multiple rows in the assays are allowed to map to a single node in the tree.

library(ape)

# The first toy tree 
set.seed(12)
row_tree <- rtree(5)

# The second toy tree 
set.seed(12)
col_tree <- rtree(4)

# change node labels
col_tree$tip.label <- colnames(assay_data)
col_tree$node.label <- c("All", "GroupA", "GroupB")

We visualize the tree using the package ggtree (Yu et al. 2017). Here, the internal nodes of the row_tree have no labels as shown in Figure 2.

library(ggtree)
library(ggplot2)

# Visualize the row tree
ggtree(row_tree, size = 2, branch.length = "none") +
    geom_text2(aes(label = node), color = "darkblue",
               hjust = -0.5, vjust = 0.7, size = 5.5) +
    geom_text2(aes(label = label), color = "darkorange",
               hjust = -0.1, vjust = -0.7, size = 5.5) 
\label{plot-rtree} The structure of the row tree. The node labels and the node numbers are in orange and blue text, respectively.

Figure 2: The structure of the row tree
The node labels and the node numbers are in orange and blue text, respectively.

The col_tree has labels for internal nodes.

# Visualize the column tree
ggtree(col_tree, size = 2, branch.length = "none") +
    geom_text2(aes(label = node), color = "darkblue",
               hjust = -0.5, vjust = 0.7, size = 5.5) +
    geom_text2(aes(label = label), color = "darkorange",
               hjust = -0.1, vjust = -0.7, size = 5.5)+
    ylim(c(0.8, 4.5)) +
    xlim(c(0, 2.2))
\label{plot-ctree} The structure of the column tree. The node labels and the node numbers are in orange and blue text, respectively.

Figure 3: The structure of the column tree
The node labels and the node numbers are in orange and blue text, respectively.

2.3 The construction of TreeSummarizedExperiment

The TreeSummarizedExperiment class is used to store the toy data generated in the previous section: assay_data, row_data, col_data, col_tree and row_tree. To correctly store data, the link information between the rows (or columns) of assay_data and the nodes of the row_tree (or col_tree) can be provided via a character vector rowNodeLab (or colNodeLab), with length equal to the number of rows (or columns) of the assays; otherwise the row (or column) names are used. Those columns or rows with labels that are not present among the node labels of the tree are removed with warnings. The link data between the assays tables and the tree data is automatically generated in the construction.

The row and column trees can be included simultaneously in the construction. Here, the column names of assay_data can be found in the node labels of the column tree, which enables the link to be created between the column dimension of assay_data and the column tree col_tree. If the row names of assay_data are not in the node labels of row_tree, we would need to provide their corresponding node labels (row_lab) to rowNodeLab in the construction of the object. It is allowed to have multiple rows or/and columns mapped to a node, for example, the same leaf label is used for the first two rows in row_lab.

# all column names could be found in the node labels of the column tree
all(colnames(assay_data) %in% c(col_tree$tip.label, col_tree$node.label))
## [1] TRUE
# provide the node labels in rowNodeLab
tip_lab <- row_tree$tip.label
row_lab <- tip_lab[c(1, 1:5)]
row_lab
## [1] "t3" "t3" "t2" "t1" "t5" "t4"
both_tse <- TreeSummarizedExperiment(assays = list(Count = assay_data),
                                     rowData = row_data,
                                     colData = col_data,
                                     rowTree = row_tree,
                                     rowNodeLab = row_lab,
                                     colTree = col_tree)
both_tse
## class: TreeSummarizedExperiment 
## dim: 6 4 
## metadata(0):
## assays(1): Count
## rownames(6): entity1 entity2 ... entity5 entity6
## rowData names(4): Kingdom Phylum Class OTU
## colnames(4): sample1 sample2 sample3 sample4
## colData names(2): gg group
## reducedDimNames(0):
## altExpNames(0):
## rowLinks: a LinkDataFrame (6 rows)
## rowTree: a phylo (5 leaves)
## colLinks: a LinkDataFrame (4 rows)
## colTree: a phylo (4 leaves)

When printing out both_tse, we see a similar message as SingleCellExperiment with four additional lines for rowLinks, rowTree, colLinks and colTree.

2.4 The accessor functions

2.4.1 Assays, rowData, colData, and metadata

For slots inherited from the SingleCellExperiment class, the accessors are exactly the same as shown in SingleCellExperiment.

# to get the first table in the assays
(count <- assays(both_tse)[[1]])
##         sample1 sample2 sample3 sample4
## entity1       0       0       0       0
## entity2       1       6      11      16
## entity3       2       7      12      17
## entity4       3       8      13      18
## entity5       4       9      14      19
## entity6       5      10      15      20
# to get row data
rowData(both_tse)
## DataFrame with 6 rows and 4 columns
##             Kingdom      Phylum       Class         OTU
##         <character> <character> <character> <character>
## entity1           A          B1          C1          D1
## entity2           A          B1          C1          D2
## entity3           A          B2          C2          D3
## entity4           A          B2          C2          D4
## entity5           A          B2          C3          D5
## entity6           A          B2          C3          D6
# to get column data
colData(both_tse)
## DataFrame with 4 rows and 2 columns
##                gg       group
##         <numeric> <character>
## sample1         1           A
## sample2         2           A
## sample3         3           B
## sample4         3           B
# to get metadata: it's empty here
metadata(both_tse)
## list()

2.4.2 rowLinks, colLinks

For new slots, we provide rowTree (and colTree) accessors to retrieve the row (column) trees, and rowLinks (and colLinks) to retrieve the link information between assays and nodes of the row (column) tree. If the tree is not available, the corresponding link data is NULL.

# access trees
rowTree(both_tse)
## 
## Phylogenetic tree with 5 tips and 4 internal nodes.
## 
## Tip labels:
##   t3, t2, t1, t5, t4
## 
## Rooted; includes branch lengths.
colTree(both_tse)
## 
## Phylogenetic tree with 4 tips and 3 internal nodes.
## 
## Tip labels:
##   sample1, sample2, sample3, sample4
## Node labels:
##   All, GroupA, GroupB
## 
## Rooted; includes branch lengths.
# access the link data
(r_link <- rowLinks(both_tse))
## LinkDataFrame with 6 rows and 4 columns
##             nodeLab nodeLab_alias   nodeNum    isLeaf
##         <character>   <character> <integer> <logical>
## entity1          t3       alias_1         1      TRUE
## entity2          t3       alias_1         1      TRUE
## entity3          t2       alias_2         2      TRUE
## entity4          t1       alias_3         3      TRUE
## entity5          t5       alias_4         4      TRUE
## entity6          t4       alias_5         5      TRUE
(c_link <- colLinks(both_tse))
## LinkDataFrame with 4 rows and 4 columns
##             nodeLab nodeLab_alias   nodeNum    isLeaf
##         <character>   <character> <integer> <logical>
## sample1     sample1       alias_1         1      TRUE
## sample2     sample2       alias_2         2      TRUE
## sample3     sample3       alias_3         3      TRUE
## sample4     sample4       alias_4         4      TRUE

The link data objects are of the LinkDataFrame class, which extends the DataFrame class with the restriction that it has at least four columns:

  • nodeLab: the labels of nodes on the tree
  • nodeLab_alias: the alias labels of nodes on the tree
  • nodeNum: the numbers of nodes on the tree
  • isLeaf: whether the node is a leaf node

More details about the DataFrame class could be found in the S4Vectors R/Bioconductor package.

class(r_link)
## [1] "LinkDataFrame"
## attr(,"package")
## [1] "TreeSummarizedExperiment"
showClass("LinkDataFrame")
## Class "LinkDataFrame" [package "TreeSummarizedExperiment"]
## 
## Slots:
##                                                                               
## Name:           rownames             nrows          listData       elementType
## Class: character_OR_NULL           integer              list         character
##                                           
## Name:    elementMetadata          metadata
## Class: DataFrame_OR_NULL              list
## 
## Extends: 
## Class "DFrame", directly
## Class "LinkDataFrame_Or_NULL", directly
## Class "DataFrame", by class "DFrame", distance 2
## Class "RectangularData", by class "DFrame", distance 3
## Class "SimpleList", by class "DFrame", distance 3
## Class "DataFrame_OR_NULL", by class "DFrame", distance 3, with explicit coerce
## Class "List", by class "DFrame", distance 4
## Class "Vector", by class "DFrame", distance 5
## Class "list_OR_List", by class "DFrame", distance 5, with explicit coerce
## Class "Annotated", by class "DFrame", distance 6
## Class "vector_OR_Vector", by class "DFrame", distance 6, with explicit coerce

The link data is automatically generated when constructing the TreeSummarizedExperiment object. We highly recommend users not to modify it manually; otherwise the link might be broken. For R packages developers, we show in the Section 2.9 about how to update the link.

2.5 The subseting function

A TreeSummarizedExperiment object can be subset in two different ways: [ to subset by rows or columns, and subsetByNode to subset by nodes of a tree. To keep track of the original data, the rowTree and colTree stay the same after subsetting, while rowLinks and rowData are updated accordingly.

sub_tse <- both_tse[1:2, 1]
sub_tse
## class: TreeSummarizedExperiment 
## dim: 2 1 
## metadata(0):
## assays(1): Count
## rownames(2): entity1 entity2
## rowData names(4): Kingdom Phylum Class OTU
## colnames(1): sample1
## colData names(2): gg group
## reducedDimNames(0):
## altExpNames(0):
## rowLinks: a LinkDataFrame (2 rows)
## rowTree: a phylo (5 leaves)
## colLinks: a LinkDataFrame (1 rows)
## colTree: a phylo (4 leaves)
# the row data
rowData(sub_tse)
## DataFrame with 2 rows and 4 columns
##             Kingdom      Phylum       Class         OTU
##         <character> <character> <character> <character>
## entity1           A          B1          C1          D1
## entity2           A          B1          C1          D2
# the row link data
rowLinks(sub_tse)
## LinkDataFrame with 2 rows and 4 columns
##             nodeLab nodeLab_alias   nodeNum    isLeaf
##         <character>   <character> <integer> <logical>
## entity1          t3       alias_1         1      TRUE
## entity2          t3       alias_1         1      TRUE
# The first four columns are from colLinks data and the others from colData
cbind(colLinks(sub_tse), colData(sub_tse))
## DataFrame with 1 row and 6 columns
##             nodeLab nodeLab_alias   nodeNum    isLeaf        gg       group
##         <character>   <character> <integer> <logical> <numeric> <character>
## sample1     sample1       alias_1         1      TRUE         1           A

To subset by nodes, we specify the node by its node label or node number. Here, entity1 and entity2 are both mapped to the same node t3, so both of them are retained.

node_tse <- subsetByNode(x = both_tse, rowNode = "t3")

rowLinks(node_tse)
## LinkDataFrame with 2 rows and 4 columns
##             nodeLab nodeLab_alias   nodeNum    isLeaf
##         <character>   <character> <integer> <logical>
## entity1          t3       alias_1         1      TRUE
## entity2          t3       alias_1         1      TRUE

Subsetting simultaneously in both dimensions is also allowed.

node_tse <- subsetByNode(x = both_tse, rowNode = "t3", 
                         colNode = c("sample1", "sample2"))
assays(node_tse)[[1]]
##         sample1 sample2
## entity1       0       0
## entity2       1       6

2.6 Changing the tree

The current tree can be replaced by a new one using changeTree. If the hierarchical information is available as a data.frame with each column representing a taxonomic level (e.g., row_data), we provide toTree to convert it into a phylo object.

# The toy taxonomic table
(taxa <- rowData(both_tse))
## DataFrame with 6 rows and 4 columns
##             Kingdom      Phylum       Class         OTU
##         <character> <character> <character> <character>
## entity1           A          B1          C1          D1
## entity2           A          B1          C1          D2
## entity3           A          B2          C2          D3
## entity4           A          B2          C2          D4
## entity5           A          B2          C3          D5
## entity6           A          B2          C3          D6
# convert it to a phylo tree
taxa_tree <- toTree(data = taxa)

# Viz the new tree
ggtree(taxa_tree)+
    geom_text2(aes(label = node), color = "darkblue",
               hjust = -0.5, vjust = 0.7, size = 5.5) +
    geom_text2(aes(label = label), color = "darkorange",
               hjust = -0.1, vjust = -0.7, size = 5.5) +
    geom_point2()
\label{plot-taxa2phylo} The structure of the taxonomic tree that is generated from the taxonomic table.

Figure 4: The structure of the taxonomic tree that is generated from the taxonomic table

A mapping to match nodes of the two trees is required if nodes are labeled differently.

taxa_tse <- changeTree(x = both_tse, rowTree = taxa_tree, 
                       rowNodeLab = taxa[["OTU"]])

taxa_tse
## class: TreeSummarizedExperiment 
## dim: 6 4 
## metadata(0):
## assays(1): Count
## rownames(6): entity1 entity2 ... entity5 entity6
## rowData names(4): Kingdom Phylum Class OTU
## colnames(4): sample1 sample2 sample3 sample4
## colData names(2): gg group
## reducedDimNames(0):
## altExpNames(0):
## rowLinks: a LinkDataFrame (6 rows)
## rowTree: a phylo (6 leaves)
## colLinks: a LinkDataFrame (4 rows)
## colTree: a phylo (4 leaves)
rowLinks(taxa_tse)
## LinkDataFrame with 6 rows and 4 columns
##             nodeLab nodeLab_alias   nodeNum    isLeaf
##         <character>   <character> <integer> <logical>
## entity1          D1       alias_1         1      TRUE
## entity2          D2       alias_2         2      TRUE
## entity3          D3       alias_3         3      TRUE
## entity4          D4       alias_4         4      TRUE
## entity5          D5       alias_5         5      TRUE
## entity6          D6       alias_6         6      TRUE

2.7 Aggregation

Since it may be of interest to report or analyze observed data on multiple resolutions based on the provided tree, the TreeSummarizedExperiment package offers functionionality to flexibly aggregate data to different levels of a tree.

2.7.1 The column dimension

Here, we show the aggregation along the column dimension. The desired aggregation level is given in the colLevel argument, which can be specified via the node label (orange text in Figure 3) or the node number (blue text in Figure 3). We could further specify how to aggregate via the argument FUN.

# use node labels to specify colLevel
agg_col <- aggValue(x = taxa_tse, 
                    colLevel = c("GroupA", "GroupB"),
                    FUN = sum)
# or use node numbers to specify colLevel
agg_col <- aggValue(x = taxa_tse, colLevel = c(6, 7), FUN = sum)
assays(agg_col)[[1]]
##         alias_6 alias_7
## entity1       0       0
## entity2       7      27
## entity3       9      29
## entity4      11      31
## entity5      13      33
## entity6      15      35

The rowData does not change, but the colData adjusts with the change of the assays table. For example, the column group has the A value for GroupA because the descendant nodes of GroupA all have the value A; the column gg has the NA value for GroupA because the descendant nodes of GroupA have different values, (1 and 2).

# before aggregation
colData(taxa_tse)
## DataFrame with 4 rows and 2 columns
##                gg       group
##         <numeric> <character>
## sample1         1           A
## sample2         2           A
## sample3         3           B
## sample4         3           B
# after aggregation
colData(agg_col)
## DataFrame with 2 rows and 2 columns
##                gg       group
##         <numeric> <character>
## alias_6        NA           A
## alias_7         3           B

The colLinks is updated to link the new rows of assays tables and the column tree.

# the link data is updated
colLinks(agg_col)
## LinkDataFrame with 2 rows and 4 columns
##             nodeLab nodeLab_alias   nodeNum    isLeaf
##         <character>   <character> <integer> <logical>
## alias_6      GroupA       alias_6         6     FALSE
## alias_7      GroupB       alias_7         7     FALSE

From Figure 3, nodes 6 and 7 are labeled with GroupA and GroupB, respectively, which agrees with the column link data.

2.7.2 The row dimension

Similarly, we could aggregate the data to the phylum level by providing the names of the internal nodes that represent the phylum level (see taxa_one below).

# the phylum level
taxa <- c(taxa_tree$tip.label, taxa_tree$node.label)
(taxa_one <- taxa[startsWith(taxa, "Phylum:")])
## [1] "Phylum:B1" "Phylum:B2"
# aggregation
agg_taxa <- aggValue(x = taxa_tse, rowLevel = taxa_one, FUN = sum)
assays(agg_taxa)[[1]]
##          sample1 sample2 sample3 sample4
## alias_8        1       6      11      16
## alias_10      14      34      54      74

The user is nonetheless free to choose nodes from different taxonomic ranks. Note that not all rows in the original table are included in one of the aggregated rows. Similarly, it is possible for a row to contribute to multiple aggregated rows

# A mixed level
taxa_mix <- c("Class:C3", "Phylum:B1")
agg_any <- aggValue(x = taxa_tse, rowLevel = taxa_mix, FUN = sum)
rowData(agg_any)
## DataFrame with 2 rows and 4 columns
##              Kingdom      Phylum       Class       OTU
##          <character> <character> <character> <logical>
## alias_12           A          B2          C3        NA
## alias_8            A          B1          C1        NA

2.7.3 Both dimensions

The aggregation on both dimensions could be performed in one step using the same function specified via FUN. If different functions are required for different dimensions, the aggregation should be performed in two steps because the aggregation order matters.

agg_both <- aggValue(x = both_tse, colLevel = c(6, 7), 
                     rowLevel = 7:9, FUN = sum)

As expected, we obtain a table with 3 rows (rowLevel = 7:9) and 2 columns (colLevel = c(6, 7)).

assays(agg_both)[[1]]
##         alias_6 alias_7
## alias_7      16      56
## alias_8      39      99
## alias_9      24      64

2.8 Functions operating on the phylo object.

Next, we highlight some functions to manipulate and/or to extract information from the phylo object. Further operations can be found in other packages, such as ape (Paradis and Schliep 2019), tidytree(Yu 2020). These functions are useful when users want to customize functions for the TreeSummarizedExperiment class.

To show these functions, we use the tree shown in Figure 5.

data("tinyTree")
ggtree(tinyTree, branch.length = "none") +
    geom_text2(aes(label = label), hjust = -0.1, size = 5.5) +
    geom_text2(aes(label = node), vjust = -0.8,
               hjust = -0.2, color = 'orange', size = 5.5) 
\label{plot-exTree} An example tree with node labels and numbers in black and orange texts, respectively.

Figure 5: An example tree with node labels and numbers in black and orange texts, respectively

2.8.1 Conversion of the node label and the node number

The translation between the node labels and node numbers can be achieved by the function convertNode.

convertNode(tree = tinyTree, node = c(12, 1, 4))
## [1] "Node_12" "t2"      "t9"
convertNode(tree = tinyTree, node = c("t4", "Node_18"))
##      t4 Node_18 
##       5      18

2.8.2 Find the descendants

To get descendants that are at the leaf level, we could set the argument only.leaf = TRUE for the function findDescendant.

# only the leaf nodes
findDescendant(tree = tinyTree, node = 17, only.leaf = TRUE)
## $Node_17
## [1] 4 5 6

When only.leaf = FALSE, all descendants are returned.

# all descendant nodes
findDescendant(tree = tinyTree, node = 17, only.leaf = FALSE)
## $Node_17
## [1]  4  5  6 18

2.8.3 More functions

We list some functions that might also be useful in Table 1. More are available in the package, and we encourage users to contribute their functions that might be helpful for others.


Table 1: A table lists some functions operating on the phylo object that are available in the TreeSummarizedExperiment.
Functions Goal
printNode print out the information of nodes
countNode count the number of nodes
distNode give the distance between a pair of nodes
matTree list paths of a tree
findAncestor find ancestor nodes
findChild find child nodes
findSibling find sibling nodes
shareNode find the first node shared in the paths of nodes to the root
unionLeaf find the union of descendant leaves
trackNode track nodes by adding alias labels to a phylo object
isLeaf test whether a node is a leaf node

3 Session Info

sessionInfo()
## R version 4.0.3 (2020-10-10)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.5 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.12-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.12-bioc/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] parallel  stats4    stats     graphics  grDevices utils     datasets 
## [8] methods   base     
## 
## other attached packages:
##  [1] ggplot2_3.3.2                  ggtree_2.4.1                  
##  [3] ape_5.4-1                      TreeSummarizedExperiment_1.6.2
##  [5] SingleCellExperiment_1.12.0    SummarizedExperiment_1.20.0   
##  [7] Biobase_2.50.0                 GenomicRanges_1.42.0          
##  [9] GenomeInfoDb_1.26.1            IRanges_2.24.0                
## [11] S4Vectors_0.28.0               BiocGenerics_0.36.0           
## [13] MatrixGenerics_1.2.0           matrixStats_0.57.0            
## [15] BiocStyle_2.18.1              
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.5             lattice_0.20-41        tidyr_1.1.2           
##  [4] digest_0.6.27          R6_2.5.0               evaluate_0.14         
##  [7] highr_0.8              pillar_1.4.7           zlibbioc_1.36.0       
## [10] rlang_0.4.9            lazyeval_0.2.2         magick_2.5.2          
## [13] Matrix_1.2-18          rmarkdown_2.5          labeling_0.4.2        
## [16] stringr_1.4.0          RCurl_1.98-1.2         munsell_0.5.0         
## [19] DelayedArray_0.16.0    compiler_4.0.3         xfun_0.19             
## [22] pkgconfig_2.0.3        htmltools_0.5.0        tidyselect_1.1.0      
## [25] tibble_3.0.4           GenomeInfoDbData_1.2.4 bookdown_0.21         
## [28] crayon_1.3.4           dplyr_1.0.2            withr_2.3.0           
## [31] bitops_1.0-6           grid_4.0.3             nlme_3.1-150          
## [34] jsonlite_1.7.1         gtable_0.3.0           lifecycle_0.2.0       
## [37] magrittr_2.0.1         scales_1.1.1           tidytree_0.3.3        
## [40] stringi_1.5.3          farver_2.0.3           XVector_0.30.0        
## [43] ellipsis_0.3.1         rvcheck_0.1.8          generics_0.1.0        
## [46] vctrs_0.3.5            tools_4.0.3            treeio_1.14.3         
## [49] glue_1.4.2             purrr_0.3.4            yaml_2.2.1            
## [52] colorspace_2.0-0       BiocManager_1.30.10    aplot_0.0.6           
## [55] knitr_1.30             patchwork_1.1.0

Reference

Lun, Aaron, and Davide Risso. 2020. “SingleCellExperiment: S4 Classes for Single Cell Data.”

Paradis, E, and K Schliep. 2019. “ape 5.0: an environment for modern phylogenetics and evolutionary analyses in R.” Bioinformatics 35: 526–28.

Wang, Li-Gen, Tommy Tsan-Yuk Lam, Shuangbin Xu, Zehan Dai, Lang Zhou, Tingze Feng, Pingfan Guo, et al. 2019. “Treeio: An R Package for Phylogenetic Tree Input and Output with Richly Annotated and Associated Data.” Molecular Biology and Evolution 37 (2): 599–603. https://doi.org/10.1093/molbev/msz240.

Yu, Guangchuang. 2020. tidytree: A Tidy Tool for Phylogenetic Tree Data Manipulation.

Yu, Guangchuang, David K. Smith, Huachen Zhu, Yi Guan, and Tommy Tsan Yuk Lam. 2017. “Ggtree: An R Package for Visualization and Annotation of Phylogenetic Trees with Their Covariates and Other Associated Data.” Methods in Ecology and Evolution 8 (1): 28–36.