% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sequence-subsequences.R
\name{filter_sequence_subsequences}
\alias{filter_sequence_subsequences}
\title{Filter non-contiguous subsequence summaries}
\usage{
filter_sequence_subsequences(
  summary,
  min_sequences = 1L,
  min_prevalence = 0,
  max_mean_gap = Inf,
  top_n = NULL,
  ties = c("include", "exclude")
)
}
\arguments{
\item{summary}{A data frame from \code{\link[=summarise_sequence_subsequences]{summarise_sequence_subsequences()}}.}

\item{min_sequences}{Minimum sequence count.}

\item{min_prevalence}{Minimum sequence prevalence.}

\item{max_mean_gap}{Optional maximum mean gap.}

\item{top_n}{Optional number of rows retained after deterministic sorting.}

\item{ties}{Include or exclude ties at the \code{top_n} boundary.}
}
\value{
A filtered summary data frame.
}
\description{
Filter non-contiguous subsequence summaries
}
\examples{
data <- data.frame(sequence_id = rep(c("a", "b"), each = 4L),
                   sequence_order = rep(1:4, 2L),
                   state = c("A", "B", "C", "D", "A", "C", "B", "D"))
x <- summarise_sequence_subsequences(extract_sequence_subsequences(data))
filter_sequence_subsequences(x, min_sequences = 2L)
}
