rowNames2RowData: RowNames to RowData

View source: R/utils.R

rowNames2RowDataR Documentation

RowNames to RowData

Description

rowNames2RowData transforms the taxonomy stored in the row names to the rowData in a SummarizedExperiment.

Usage

rowNames2RowData(x)

Arguments

x

A SummarizedExperiment with the features taxonomy in the rownames.

Value

The same SummarizedExpriment with the taxonomy now in the rowData.

Examples


data("zeller14")

## Keep only "CRC" and "control" (dichotomous variable)
z14 <- zeller14[, zeller14$study_condition %in% c("control", "CRC")]

## Get terminal nodes
tn <- get_terminal_nodes(rownames(z14))
z14_tn <- z14[tn, ]

## Normalize to relative abundance (also known as Total Sum Scaling)
z14_tn_ra <- relativeAb(z14_tn)

## Add the taxonomy to the rowData
input_se <- rowNames2RowData(z14_tn_ra)


waldronlab/lefser documentation built on Oct. 17, 2024, 11:44 a.m.