% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.r
\name{ecoda_helper}
\alias{ecoda_helper}
\title{Core constructor for SummarizedExperiment objects from count/frequency
matrices}
\usage{
ecoda_helper(
  data = NULL,
  data_is_freq,
  variance_explained = 0.5,
  top_n_hvcs = NULL,
  pseudo_count = 0.5,
  pseudo_frac_min = 2/3,
  add_to = c("all", "zeros")
)
}
\arguments{
\item{data}{A matrix or data frame where \strong{columns are samples} and
\strong{rows are cell types}.}

\item{data_is_freq}{Logical. If \code{TRUE}, \code{data} is treated as
proportions (0-1 or 0-100). If \code{FALSE}, treated as raw integer counts.}

\item{variance_explained}{Numeric (default: 0.5). Target variance for HVCs.}

\item{top_n_hvcs}{Integer (optional). Number of top HVCs to select.}

\item{pseudo_count}{Numeric (default: 0.5). Used if \code{rep_method =
"counts"}.}

\item{pseudo_frac_min}{Numeric (default: 2/3). The multiplier for the minimum
non-zero value when \code{rep_method = "frac_min"}.}

\item{add_to}{Character string. Should the value be added to \code{"all"}
cells or just the \code{"zeros"}?}
}
\value{
A fully initialized
\link[SummarizedExperiment:SummarizedExperiment-class]{SummarizedExperiment}
object.
}
\description{
This is the internal engine that initializes an
\link[SummarizedExperiment:SummarizedExperiment-class]{SummarizedExperiment}
object. It performs zero-imputation, Centered Log-Ratio (CLR) transformation,
calculates sample distances, and identifies highly variable cell types
(HVCs).
}
