% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_rarefaction_metrics.R
\name{plot_rarefaction_metrics}
\alias{plot_rarefaction_metrics}
\title{Plot pre-rarefaction diagnostics}
\usage{
plot_rarefaction_metrics(data)
}
\arguments{
\item{data}{Either a \code{phyloseq} object or a \code{data.frame} that includes columns
\code{read_num}, \code{goods_cov}, and \code{outlier}.}
}
\value{
A \code{ggarrange} object with six plots.
}
\description{
This function creates a 6-panel diagnostic plot showing sequencing depth,
Good's coverage, and outlier behavior based on a data frame or a
\code{phyloseq} object with rare stats already added via \code{add_rare_stats()}.
}
\examples{
library(phyloseq)
library(BRCore)

# Add rarefaction metrics to the phyloseq object
bcse_metrics <- add_rarefaction_metrics(bcse)

# Plot the rarefaction diagnostics
plot_rarefaction_metrics(bcse_metrics)

# You can also pass a data frame directly if you have
# pre-computed read_num, goods_cov, and outlier columns
sample_data_df <- data.frame(sample_data(bcse_metrics))
plot_rarefaction_metrics(sample_data_df)

}
\seealso{
\code{\link[=add_rarefaction_metrics]{add_rarefaction_metrics()}}
}
