ig_chain_recode {CellaRepertorium} | R Documentation

## Categorize the pairing present in a cell

### Description

For each cell (defined by `ccdb$cell_pk`) count the number of each level of `chain_key` occurs, and cross tabulate. Also for each cell, paste together all values `chain_key`. Return a tibble, keyed by cells that includes the counts of the chains, the `raw_chain_type` and any additional output from running `chain_recode_fun`.

### Usage

    ig_chain_recode(tbl)

    tcr_chain_recode(tbl)

    enumerate_pairing(ccdb, chain_key = "chain", chain_recode_fun = NULL)

### Arguments

`tbl` | output from enumerate_pairing containing TRA/TRB or IGH/IHK/IHL columns
`ccdb` | `ContigCellDB`
`chain_key` | `character` naming the field in the `contig_tbl` identifying chain
`chain_recode_fun` | a function that operates on the output of this function that further reduces the chain combinations to some other summary. Set to 'guess' to apply functions that may work for 10X data or `NULL` to skip. See `CellaRepertorium::tcr_chain_recode` for an example.

### Value

a `tibble` keyed by cells.

### Functions

- `ig_chain_recode`: Recode a table with IG chains

- `tcr_chain_recode`: Recode a table with TCR chains

### Examples

    data(ccdb_ex)
    enumerate_pairing(ccdb_ex)
    enumerate_pairing(ccdb_ex, chain_recode_fun = 'guess')

[Package CellaRepertorium version 1.4.0 Index]