% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_identified_core.R
\name{plot_identified_core}
\alias{plot_identified_core}
\title{Plot Bray-Curtis increase over ranked OTU/ASVs}
\usage{
plot_identified_core(
  bray_curtis_ranked,
  elbow,
  lastCall,
  increase_value = 0.02,
  dataset_name = NULL
)
}
\arguments{
\item{bray_curtis_ranked}{A tibble as returned by \code{identify_core()$bray_curtis_ranked}.}

\item{elbow}{The number of OTU/ASVs identified by the elbow method (Integer).}

\item{lastCall}{The number of OTU/ASVs identified by the last percent
Bray-Curtis increase method (Integer).}

\item{increase_value}{The percent increase value in decimal (e.g. 0.02) used
for the Bray-Curtis increase method.}

\item{dataset_name}{Optional character string. When provided, it is
prepended to the plot title (e.g. \code{"Switchgrass"}).
Default \code{NULL} (no prefix).}
}
\value{
A list containing: 1) \code{df_for_plot}, a data frame used for plotting, and 2) \code{plot_identified_core}, a ggplot object visualizing the Bray-Curtis increase with annotated cutoff points.
}
\description{
Visualize the cumulative normalized mean Bray-Curtis increase returned by
\link[=identify_core]{identify_core()}, over ranked OTU/ASVs and shows cutoff
points for elbow percent increase methods.
}
\details{
The function converts \code{rank} to integers and zooms the x-axis to the first
\code{1.2 * lastCall} ranks. Label positions are computed dynamically from the
observed \code{proportionBC} range to avoid overlap.
}
\examples{
library(BRCore)
data("switchgrass_core", package = "BRCore")

p <- plot_identified_core(
  bray_curtis_ranked = switchgrass_core$bray_curtis_ranked,
  elbow = switchgrass_core$elbow,
  lastCall = switchgrass_core$bc_increase,
  increase_value = switchgrass_core$increase_value
)
print(p)

}
\seealso{
\link[=identify_core]{identify_core()}

\code{\link{identify_core}}
}
