aggregateSamples: Aggregate expression data from all samples

Description Usage Arguments Details Value Examples

View source: R/functions-core.R

Description

Takes initial Phemd object and returns object with additional data frame in slot @data_aggregate containing cells aggregated from all samples (to be used for further analyses e.g. Monocle 2 trajectory building / pseudotime mapping / cell clustering)

Usage

1
aggregateSamples(obj, max_cells = 12000)

Arguments

obj

'Phemd' object containing raw expression data and associated metadata

max_cells

Maximum number of cells across all samples to be included in final matrix on which Monocle 2 will be run

Details

Subsamples cells as necessary based on max_cells. If subsampling is performed, an equal number of cells are subsampled from each sample

Value

Same as input 'Phemd' object with additional slot 'data_aggregate' containing aggregated expression data (num_markers x num_cells)

Examples

1
2
3
my_phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
my_phemdObj_lg <- removeTinySamples(my_phemdObj, 10)
my_phemdObj_lg <- aggregateSamples(my_phemdObj_lg, max_cells=1000)

phemd documentation built on Nov. 8, 2020, 8:15 p.m.