Measure enrichment of individual cell-types in a signature matrix.
Internal function as part of tissue_scMappR_internal(). This function takes genes preferentially expressed within a gene list, each cell-type and the background (i.e. all genes within the signature matrix) before completing the cell-type specific enrichment of the inputted gene list on each cell type. This function then returns a table describing the cell-type enrichments (p-value and odds ratio) of each cell-type.
hg_short: A list with two objects: a "preferences" and a "genesIn". Preferences is a list of gene symbols over-represented in each cell-type and genesIn were all the inputted genes.
hg_full: The same as hg_short but for every gene in the signature matrix.
study_name: Name of output table.
outDir: Directory where table is outputted.
toSave: Allow scMappR to write files in the current directory (T/F).
path: If toSave == TRUE, path to the directory where files will be saved.
Returns
single_gene_preferences A gene-set enrichment table of individual cell-type enrichment.