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,
  scatter = NULL,
  clean_names = FALSE,
  sample_col = "sample",
  panel = NULL,
  panel_channel = "Channel",
  panel_antigen = "Marker",
  panel_type = NULL,
  transform_cofactor = 5
)

Arguments

df

Tibble with expression values and metadata

markers

Markers to include in exprs and counts 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

It is the column name in the df that contains the sample names. Defaults to 'sample'.

panel

Optional: Panel as a data.frame. Should have colnames Channel, Marker, Type unless otherwise specified in the panel_ args. Should be included if you want to store FCS files

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. Set to NULL to disregard.

transform_cofactor

The cofactor to use when reverse-transforming to raw counts

See Also

Other export: sce2FCS()

Examples

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

biosurf/cyCombine documentation built on May 23, 2024, 4:07 a.m.