subset_se_cells_for_group_test: subset_se_cells_for_group_test

Description Usage Arguments Details Value See Also

View source: R/contrasting_functions.r

Description

This function for use by contrast_each_group_to_the_rest downsamples cells from a summarizedExperiment (dataset_se) - keeping n.group (or all if fewer) cells from the specified group, and n.other from the rest. This maintains the proportions of cells in the 'other' part of the differential expression comparisons.

Usage

1
2
subset_se_cells_for_group_test(dataset_se, the_group, n.group = Inf,
  n.other = n.group * 5)

Arguments

dataset_se

Summarised experiment object containing count data. Also requires 'ID' and 'group' to be set within the cell information.

the_group

The group being subsetted for

n.group

How many cells to keep for each group. Default = Inf

n.other

How many cells to keep from everything not in the group. Default = n.group * 5

Details

Cells are randomly sampled, so set the random seed (with set.seed()) for consistant results across runs.

Value

dataset_se A hopefully more managably subsetted version of the inputted dataset_se

See Also

Calling function contrast_each_group_to_the_rest

subset_cells_by_group Exported function for subsetting each group independantly upfront. (For when this approach is still unmanageable)


celaref documentation built on Nov. 8, 2020, 5:03 p.m.