coEnrich: Identify co-expressed cell-types

View source: R/coEnrich.R

coEnrichR Documentation

Identify co-expressed cell-types

Description

This function identifies genes with similar cell-type markers and if those markers are driving enrichment.

Usage

coEnrich(
  sig,
  gene_list_heatmap,
  background_heatmap,
  study_name,
  outDir,
  toSave = FALSE,
  path = NULL
)

Arguments

sig

A The number of combinations of significant cell-types to enrich.

gene_list_heatmap

Signature matrix of inputted genes in heatmap and the cell-type preferences – output of heatmap generation.

background_heatmap

Signature matrix of background matrix in heatmap and cell-type preferences – output of heatmap generation.

study_name

Name of the outputted table.

outDir

Name of the directory this table will be printed in.

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.

Details

This function takes significantly enriched cell-types from the single CT_enrich before testing to see if the genes driving their enrichment are overlapping to a significant proportion using Fisher's exact test. To save computational time and to not complete this with an incredible number of permutations, scMappR stops at overlapping 5 cell-types.

Value

coEnrich Enrichment of cell-types that are expressed by the same genes, up to 4 sets of cell-types.

Examples


# load in signature matrices
data(POA_example)
POA_generes <- POA_example$POA_generes
POA_OR_signature <- POA_example$POA_OR_signature
POA_Rank_signature <- POA_example$POA_Rank_signature
sig <- get_gene_symbol(POA_Rank_signature)
Signature <- POA_Rank_signature
rownames(Signature) <- sig$rowname
genes <- rownames(Signature)[1:60]
heatmap_test <- tissue_scMappR_custom(gene_list = genes, signature_matrix = Signature,
output_directory =  "scMappR_test", toSave = FALSE)
group_preferences <- heatmap_test$group_celltype_preferences


scMappR documentation built on July 9, 2023, 6:26 p.m.