cell_data: Create new cell groups based on existing ones.

make_cell_groupingsR Documentation

Create new cell groups based on existing ones.

Description

This is basically a recoding of levels. A new column (cell group) will be based on levels in the existing column.

Usage

make_cell_groupings(df, cell_groupings, do_cbind = FALSE)

Arguments

df

A dataframe.

cell_groupings

A named list of named lists. Names of outer list will be used for new columns in df. The nested lists must have the following values:

  • source_column: a name of column in df to use.

  • assignments: a named list with values in the form old_level = new_level. See the CELL_GROUPINGS parameter in ⁠02_norm_clustering.yaml⁠ or ⁠02_int_clustering.yaml⁠ config.

do_cbind

A logical scalar: if TRUE, bind column-wise df and dataframe with new cell groupings.

Value

A dataframe.


bioinfocz/scdrake documentation built on Jan. 29, 2024, 10:24 a.m.