| downsample | R Documentation |
Create a downsampled copy of a ScPhyloExpressionSet object with fewer cells per identity.
downsample(phyex_set, downsample = 10)
phyex_set |
A ScPhyloExpressionSet object |
downsample |
Integer, number of cells to keep per identity (default: 10) |
This function creates a new ScPhyloExpressionSet with a subset of cells, maintaining
the same proportional representation across identities. The sampling is stratified
by the current selected_idents grouping. All metadata and reductions are
filtered to match the selected cells.
A new ScPhyloExpressionSet object with downsampled cells
# Downsample to 20 cells per identity
small_set <- downsample(example_phyex_set_sc, downsample = 20)
# Change grouping and downsample
example_phyex_set_sc@selected_idents <- "day"
treatment_set <- downsample(example_phyex_set_sc, downsample = 15)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.