get_summed_proportions Given the target gene set, randomly sample gene lists of equal length, obtain the specificity of these and then obtain the mean specificity in each sampled list (and the target list).

get_summed_proportions(
  hitGenes,
  sct_data,
  annotLevel,
  reps,
  geneSizeControl,
  controlledCT = NULL,
  control_network = NULL,
  verbose = TRUE
)

Arguments

hitGenes

Array of gene names. The target gene set.

sct_data

The cell type data list (with specificity and mean_exp)

annotLevel

The level of annotation in sct_data to analyse

reps

The number of gene lists to sample

geneSizeControl

Boolean. Should the sampled gene lists control for GC content and transcript length?

controlledCT

Name of a cell type (from colnames of sct_data[[x]]$specificity).

control_network

If geneSizeControl=TRUE, then must provide the control network

verbose

Print messages.

Value

A list containing three data frames:

  • hit.cells: vector containing the summed proportion of expression in each cell type for the target list

  • bootstrap_data: matrix in which each row represents the summed proportion of expression in each cell type for one of the random lists

  • controlledCT: the controlled cell type (if applicable)

Details

See bootstrap_enrichment_test for examples.