generes_to_heatmap: Generate signature matrix

View source: R/generes_to_heatmap.R

generes_to_heatmapR Documentation

Generate signature matrix

Description

Convert a list of cell-type markers from FindMarkers in Seurat to a signature matrix defined by odds ratio and rank.

Usage

generes_to_heatmap(
  generes = generes,
  species = "human",
  naming_preference = -9,
  rda_path = "",
  make_names = TRUE,
  internal = FALSE
)

Arguments

generes

A list of cell-type markers with fold-changes and p-values (FindMarkers output in Seurat).

species

The species of gene symbols, if not internal, "human" or "mouse".

naming_preference

Likely cell-types given tissues (to be passed into human_mouse_ct_marker_enrich).

rda_path

Path to output direcotry, if toSave is true.

make_names

Identify names of cell-type markers using the Fisher's exact test method (T/F).

internal

If this function is pre-processing from Panglao (T/F).

Details

Take a list of compiled differentially expressed genes from different cell-types, identify what the cell-types are using the Fisher's exact test, and then convert into a signature matrix for both the adjusted p-value and odds ratio.

Value

List with the following elements:

pVal

A dataframe containing the signature matrix of ranks (-log10(Padj) * sign(fold-change)).

OR

A dataframe containing the signature matrix of odds ratios.

cellname

A vector of the cell-labels returned from the GSVA method.

topGenes

the top 30 mos expressed genes in each cell-type.

Examples


data(POA_example)
 POA_generes <- POA_example$POA_generes
signature <- generes_to_heatmap(POA_generes,species = -9, make_names = FALSE)




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