#' @param seqs A sequence object containing the sequences to be subsetted.
#' @param seqs A sequence object containing the sequences to be subsetted.
#' @param cluster_tbl A data frame or tibble containing the cluster assignments. It should have two columns, 'cluster' and 'seqnames', where 'cluster' contains the cluster numbers and 'seqnames' contains the corresponding sequence names.
#' @param cluster_tbl A data frame or tibble containing the cluster assignments. It should have two columns, 'cluster' and 'seqnames', where 'cluster' contains the cluster numbers and 'seqnames' contains the corresponding sequence names.
#' @param save_to_file Logical value indicating whether to save the resulting sequences to separate files for each cluster.
#' @param save_to_file FALSE or target directory.
#' @return A list of sequence objects, where each list element corresponds to a cluster and contains the sequences in that cluster
#' @return A list of sequence objects, where each list element corresponds to a cluster and contains the sequences in that cluster
\item{seqs}{A sequence object containing the sequences to be subsetted.}
\item{seqs}{A sequence object containing the sequences to be subsetted.}
\item{cluster_tbl}{A data frame or tibble containing the cluster assignments. It should have two columns, 'cluster' and 'seqnames', where 'cluster' contains the cluster numbers and 'seqnames' contains the corresponding sequence names.}
\item{cluster_tbl}{A data frame or tibble containing the cluster assignments. It should have two columns, 'cluster' and 'seqnames', where 'cluster' contains the cluster numbers and 'seqnames' contains the corresponding sequence names.}
\item{save_to_file}{Logical value indicating whether to save the resulting sequences to separate files for each cluster.}
\item{save_to_file}{FALSE or target directory.}
}
}
\value{
\value{
A list of sequence objects, where each list element corresponds to a cluster and contains the sequences in that cluster
A list of sequence objects, where each list element corresponds to a cluster and contains the sequences in that cluster