# Bioconductor Treesummarizedexperiment

TreeSummarizedExperiment has extended SingleCellExperiment to include hierarchical...

- Repository: https://github.com/bioMate-AI/biomate-bioconductor-kb (793 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-06-20
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-treesummarizedexperiment -g -a claude-code -y`
Codex: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-treesummarizedexperiment -g -a codex -y`
Cursor: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-treesummarizedexperiment -g -a cursor -y`
Gemini CLI: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-treesummarizedexperiment -g -a gemini-cli -y`

## Description

TreeSummarizedExperiment has extended SingleCellExperiment to include hierarchical information on the rows or columns of the rectangular data.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# TreeSummarizedExperiment

## Dependencies & Environment

> Package-intrinsic requirements from the Bioconductor landing page, reproduce in any R environment.

- **Version:** 2.20.0 · **Bioconductor:** 3.23 · **R:** ≥ 4.6
- **Depends:** SingleCellExperiment, S4Vectors, Biostrings
- **Imports:** BiocGenerics, ape, rlang, dplyr, SummarizedExperiment, BiocParallel, IRanges, treeio
- **System requirements:** URL
- **Install:** `BiocManager::install("TreeSummarizedExperiment")`

## When to Use
- Storing rectangular experimental data alongside hierarchical tree structures using the `TreeSummarizedExperiment` class.
- Aggregating data to different taxonomic levels (e.g., phylum or class) using `aggTSE`.
- Subsetting data by specific tree nodes or leaves using `subsetByNode`.
- Storing reference sequence data per feature using the `referenceSeq` slot.

## When NOT to Use
- For standard single-cell RNA-seq without hierarchical relationships, use `SingleCellExperiment` because the tree-related slots and overhead are unnecessary.
- For purely manipulating or visualizing phylogenetic trees without rectangular assay data, use `ape` or `ggtree` directly because they are specialized for tree operations.

## Data Requirements
- An `assays` matrix representing observed data (e.g., counts) with rows as entities and columns as samples.
- `rowData` and `colData` data frames for feature and sample annotations.
- Hierarchical structures provided as `phylo` objects for `rowTree` and/or `colTree`.
- Link information mapping assay rows/columns to tree nodes via `rowNodeLab` or `colNodeLab`.
- Optional reference sequences as `DNAStringSet` or `DNAStringSetList`.

The rest: https://github.com/bioMate-AI/biomate-bioconductor-kb/blob/HEAD/skills/single-cell/treesummarizedexperiment/SKILL.md
