% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ContigCellDB-methods.R
\name{split_cdb}
\alias{split_cdb}
\title{Split into a list of \code{\link[=ContigCellDB]{ContigCellDB()}} by named fields}
\usage{
split_cdb(ccdb, fields, tbl = "contig_tbl", drop = FALSE, equalize = TRUE)
}
\arguments{
\item{ccdb}{\code{\link[=ContigCellDB]{ContigCellDB()}}}

\item{fields}{\code{character} naming fields in \code{tbl}}

\item{tbl}{one of \code{contig_tbl}, \code{cell_tbl} or \code{cluster_tbl}}

\item{drop}{logical indicating if levels that do not occur should be dropped
    (if \code{f} is a \code{factor} or a list).}

\item{equalize}{\code{logical}. Should the contig, cells and clusters be equalized by taking the intersection of their common keys?}
}
\value{
list of \code{ContigCellDB}
}
\description{
Split into a list of \code{\link[=ContigCellDB]{ContigCellDB()}} by named fields
}
\examples{
data(ccdb_ex)
splat = split_cdb(ccdb_ex, 'chain', 'contig_tbl')
stopifnot(all(splat$TRA$contig_tbl$chain == 'TRA'))
stopifnot(all(splat$TRB$contig_tbl$chain == 'TRB'))
}
