merge_ctd: Merge multiple CellTypeDataset references

View source: R/merge_ctd.R

merge_ctdR Documentation

Merge multiple CellTypeDataset references

Description

Import CellTypeDataset (CTD) references from a remote repository, standardize each, and then merge into one CTD. Optionally, can return these as a merged SingleCellExperiment.

Usage

merge_ctd(
  CTD_list,
  save_dir = tempdir(),
  standardise_CTD = FALSE,
  as_SCE = FALSE,
  gene_union = TRUE,
  merge_levels = seq(1, 5),
  save_split_SCE = FALSE,
  save_split_CTD = FALSE,
  save_merged_SCE = TRUE,
  force_new_quantiles = FALSE,
  numberOfBins = 40,
  as_sparse = TRUE,
  as_DelayedArray = FALSE,
  verbose = TRUE,
  ...
)

Arguments

CTD_list

(Named) list of CellTypeDatasets.

save_dir

The directory to save merged files in.

standardise_CTD

Whether to run standardise_ctd.

as_SCE

If TRUE (default), returns the merged results as a named list of SingleCellExperiments. If FALSE, returns as a CTD object.

gene_union

Whether to take the gene union or intersection when merging matrices (mean_exp,specificity, etc.).

merge_levels

Which CTD levels you want to merge. Can be a single value (e.g. merge_levels=5) or a list c(e.g. merge_levels=c(1:5)). If some CTD don't have the same number of levels, the maximum level depth available in that CTD will be used instead.

save_split_SCE

Whether to save individual SCE files in the subdirectory standardized_CTD_SCE.

save_split_CTD

Whether to save individual CTD files in the subdirectory standardized_CTD.

save_merged_SCE

Save the final merged SCE object, or simply to return it.

force_new_quantiles

If specificity quantiles matrix already exists, create a new one.

numberOfBins

Number of bins to compute specificity quantiles with.

as_sparse

Convert matrices to sparse matrix.

as_DelayedArray

Convert matrices to DelayedArray.

verbose

Print messages.

...

Additional arguments to be passed to standardise_ctd.

Value

List of CellTypeDatasets or SingleCellExperiments.

Examples

## Let's pretend these are different CTD datasets
ctd1 <- ewceData::ctd()
ctd2 <- ctd1
CTD_list <- list(ctd1, ctd2)
CTD_merged <- EWCE::merge_ctd(CTD_list = CTD_list)

NathanSkene/EWCE documentation built on Nov. 3, 2024, 8:16 a.m.