df2SCE: Exporting a dataframe to SingleCellObject

View source: R/04_export_data.R

df2SCER Documentation

Exporting a dataframe to SingleCellObject

Description

Conversion of dataframe into separate data and metadata objects for subsequent transformation. Rename variable names to fit the requirements of SCE-based tools

Usage

df2SCE(
  df,
  markers = NULL,
  non_markers = NULL,
  sample_col = "sample",
  panel = NULL,
  panel_channel = "Channel",
  panel_antigen = "Marker",
  panel_type = "Type"
)

Arguments

df

Tibble with expression values and metadata

markers

Markers to include in exprs object of SCE. If NULL, markers will be found using the get_markers function.

non_markers

Non-markers to include as colData in SCE. If NULL, non_markers will be based on cyCombine::non_markers.

sample_col

The name of the column containing sample IDs

panel

Optional: Panel as a data.frame. Should have colnames Channel, Marker, Type unless otherwise specified in the panel_ args.

panel_channel

Optional: Only used if panel is given. It is the column name in the panel data that contains the channel names

panel_antigen

Optional: Only used if panel is given. It is the column name in the panel data that contains the antigen names

panel_type

Optional: Only used if panel is given. It is the column name in the panel data that contains the antigen types (none, state, type). "none" will be excluded from SCE.

Examples

## Not run: 
sce <- df %>%
  df2SCE(markers = markers, non_markers = NULL, panel = panel)
  
## End(Not run)

shdam/cyCombine documentation built on June 12, 2022, 11:29 p.m.