aggregateSamples {phemd} | R Documentation

## Aggregate expression data from all samples

### 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

    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

    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)

[Package phemd version 1.8.0 Index]