[[,ContigCellDB,character,missing-method {CellaRepertorium} | R Documentation

## `data.frame`-like mutation/accessor generics for `ContigCellDB` objects

### Description

A `ContigCellDB` pretend to be a `cell_tbl` data.frame in several regards. This is to enable nesting `ContigCellDB` objects in the `colData` of a `SingleCellExperiment` and so that various plotting functionality in `scater` can do something sensible.

### Usage

    ## S4 method for signature 'ContigCellDB,character,missing'
    x[[i, j, ...]]

    ## S4 method for signature 'ContigCellDB,ANY,missing,ANY'
    x[i, j, ..., drop = TRUE]

    ## S4 method for signature 'ContigCellDB'
    dim(x)

    ## S4 method for signature 'ContigCellDB'
    dimnames(x)

    ## S4 method for signature 'ContigCellDB'
    nrow(x)

    ## S4 method for signature 'ContigCellDB'
    ncol(x)

### Arguments

`x` | `ContigCellDB`
`i` | integer or character index
`j` | ignored
`...` | ignored
`drop` | ignored

### Details

If `x` a `ContigCellDB`, then `dim(x)` and `dimnames(x)` return `dim(x$cell_tbl)` and `dimnames(x$cell_tbl)`, respectively, and `x[[col]]` returns `x$cell_tbl[[col]]`. Likewise indexing with `x[i,]` returns cells indexed by `i`. Finally `as.data.frame(x)` returns `x$cell_tbl`.

### Value

See details.

### Examples

     data(ccdb_ex)
     ccdb_ex[1:10,]
     head(ccdb_ex[['barcode']])
     dim(ccdb_ex)
     dimnames(ccdb_ex)

[Package CellaRepertorium version 1.4.0 Index]