Import CellTypeDataset (CTD) references from a remote repository, standardize each, and then merge into one CTD. Optionally, can return these as a merged SingleCellExperiment.
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,
...
)
(Named) list of CellTypeDatasets
.
The directory to save merged files in.
Whether to run standardise_ctd
.
If TRUE
(default),
returns the merged results as a named list of
SingleCellExperiments.
If FALSE
, returns as a CTD object.
Whether to take the gene union or intersection when merging matrices (mean_exp,specificity, etc.).
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.
Whether to save individual SCE files in the subdirectory standardized_CTD_SCE.
Whether to save individual CTD files in the subdirectory standardized_CTD.
Save the final merged SCE object, or simply to return it.
If specificity quantiles matrix already exists, create a new one.
Number of bins to compute specificity quantiles with.
Convert matrices to sparse matrix.
Convert matrices to DelayedArray
.
Print messages.
Additional arguments to be passed to standardise_ctd
.
List of CellTypeDatasets or SingleCellExperiments.
## Let's pretend these are different CTD datasets
ctd1 <- ewceData::ctd()
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
ctd2 <- ctd1
CTD_list <- list(ctd1, ctd2)
CTD_merged <- EWCE::merge_ctd(CTD_list = CTD_list)
#> + Must set `as_SCE=TRUE` in order to merge CTD.
#> + Returning merged CTD.
#> 1 core(s) assigned as workers (3 reserved).
#> Converting to sparse matrix.
#> + Calculating normalized mean expression.
#> Converting to sparse matrix.
#> + Calculating normalized specificity.
#> Converting to sparse matrix.
#> Converting to sparse matrix.
#> + Saving results ==> /tmp/RtmpuXbkZF/ctd_file39857076e01blevel_1.rda
#> + Returning list of CTD file name, and the CTD itself.
#> 1 core(s) assigned as workers (3 reserved).
#> Converting to sparse matrix.
#> + Calculating normalized mean expression.
#> Converting to sparse matrix.
#> + Calculating normalized specificity.
#> Converting to sparse matrix.
#> Converting to sparse matrix.
#> + Saving results ==> /tmp/RtmpuXbkZF/ctd_file39855c21b68elevel_2.rda
#> + Returning list of CTD file name, and the CTD itself.