ContigCellDB {CellaRepertorium} | R Documentation

## Construct a ContigCellDB

### Description

Construct a ContigCellDB

### Usage

    ContigCellDB(
      contig_tbl,
      contig_pk,
      cell_tbl,
      cell_pk,
      cluster_tbl,
      cluster_pk = character(),
      equalize = TRUE
    )

    ContigCellDB_10XVDJ(
      contig_tbl,
      contig_pk = c("barcode", "contig_id"),
      cell_pk = "barcode",
      ...
    )

### Arguments

`contig_tbl` | a data frame of contigs, and additional fields describing their properties
`contig_pk` | character vector naming fields in `contig_tbl` that uniquely identify a row/contig
`cell_tbl` | a data frame of cell barcodes, and (optional) additional fields describing their properties
`cell_pk` | character vector naming fields in `cell_tbl` that uniquely identify a cell barcode
`cluster_tbl` | A data frame that provide cluster assignments for each contig
`cluster_pk` | If `cluster_tbl` was provided, a character vector naming fields in `cluster_tbl` that uniquely identify a cluster
`equalize` | `logical`. Should the contig, cells and clusters be equalized by taking the intersection of their common keys?
`...` | passed to `ContigCellDB()`

### Value

`ContigCellDB`

### Functions

- `ContigCellDB_10XVDJ`: provide defaults that correspond to identifiers in 10X VDJ data

### Accessors/mutators

See `$,ContigCellDB-method` for more on how to access and mutate slots. See `mutate_cdb()` and `filter_cdb()` for endomorphic filtering/mutation methods See `split_cdb()` to split into a list, and `rbind.ContigCellDB()` for the inverse operation.

### See Also

`$,ContigCellDB-method`

### Examples

    data(contigs_qc)
    contigs_qc

    cdb = ContigCellDB(contigs_qc, contig_pk = c('barcode', 'pop', 'sample', 'contig_id'),
     cell_pk = c('barcode', 'pop', 'sample'))
     cdb

     # everything that was in contigs_qc
     cdb$contig_tbl

     # Only the cell_pk are included by default (until clustering/canonicalization)
     cdb$cell_tbl

     # Empty, since no cluster_pk was specified
     cdb$cluster_tbl

     # Keys
     cdb$contig_pk
     cdb$cell_pk
     cdb$cluster_pk

[Package CellaRepertorium version 1.2.0 Index]