% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CreateFromTSE.R
\name{CreateCrcBiomeScreenObjectFromTSE}
\alias{CreateCrcBiomeScreenObjectFromTSE}
\title{Create a CrcBiomeScreen object from TreeSummarizedExperiment}
\usage{
CreateCrcBiomeScreenObjectFromTSE(tse, assay_name = NULL)
}
\arguments{
\item{tse}{A TreeSummarizedExperiment object containing microbiome data.}

\item{assay_name}{Which assay to use (default: "counts" or "relative_abundance").}
}
\value{
A A \code{CrcBiomeScreen} object. object.
}
\description{
Wrapper function to directly convert a TreeSummarizedExperiment object
into a A \code{CrcBiomeScreen} object. S4 object for downstream analysis.
}
\examples{
# Runnable example using a minimal mock TreeSummarizedExperiment

# Load required classes (SummarizedExperiment & TreeSummarizedExperiment)
suppressMessages({
  library(SummarizedExperiment)
  library(TreeSummarizedExperiment)
})

# Create a tiny assay matrix
assay_mat <- matrix(
  c(10, 5,
    20, 7),
  nrow = 2,
  dimnames = list(c("Taxa1", "Taxa2"), c("S1", "S2"))
)

# Create row (taxa) metadata
row_meta <- DataFrame(
  Taxa = c("A;B;C", "A;D;E")
)

# Create sample metadata
col_meta <- DataFrame(
  number_reads = c(10000, 12000),
  condition = c("control", "CRC")
)

# Build a minimal TreeSummarizedExperiment
tse <- TreeSummarizedExperiment::TreeSummarizedExperiment(
  assays = list(relative_abundance = assay_mat),
  rowData = row_meta,
  colData = col_meta
)

# Convert to CrcBiomeScreen object
obj <- CreateCrcBiomeScreenObjectFromTSE(tse)

# Inspect object
obj
}
