gProfiler_cellWeighted_Foldchange: Pathway enrichment for cwFold-changes

View source: R/gProfiler_cellWeighted_Foldchange.R

gProfiler_cellWeighted_FoldchangeR Documentation

Pathway enrichment for cwFold-changes

Description

This function runs through each list of cell weighted Fold changes (cwFold-changes) and completes both pathway and transcription factor (TF) enrichment.

Usage

gProfiler_cellWeighted_Foldchange(
  cellWeighted_Foldchange_matrix,
  species,
  background,
  gene_cut,
  newGprofiler
)

Arguments

cellWeighted_Foldchange_matrix

Matrix of cell weighted Fold changes from the deconvolute_and_contextualize functions.

species

Human, mouse, or a name that is compatible with gProfileR (e.g. "mmusculus").

background

A list of background genes to test against.

gene_cut

The top number of genes in pathway analysis.

newGprofiler

Using gProfileR or gprofiler2, (T/F).

Details

This function takes a matrix of cellWeighted_Foldchange and a species (human, mouse, or a character directly compatible with g:ProfileR). Before completing pathway analysis with g:ProfileR. Enriched pathways are stored in a list and returned.

Value

List with the following elements:

BP

gprofiler enrichment of biological pathways for each cell-type

TF

gprofiler enrichment of transcription factors for eachc cell-type.

Examples



data(PBMC_example)

bulk_DE_cors <- PBMC_example$bulk_DE_cors
bulk_normalized <- PBMC_example$bulk_normalized
odds_ratio_in <- PBMC_example$odds_ratio_in

case_grep <- "_female"
control_grep <- "_male"
max_proportion_change <- 10
print_plots <- FALSE
theSpecies <- "human"
norm <- deconvolute_and_contextualize(count_file = bulk_normalized,
                                     signature_matrix = odds_ratio_in,
                                      DEG_list = bulk_DE_cors, case_grep = case_grep, 
                                      control_grep = control_grep,
                                       max_proportion_change = max_proportion_change,
                                       print_plots = print_plots,
                                       theSpecies = theSpecies)
background = rownames(bulk_normalized)
STVs <- gProfiler_cellWeighted_Foldchange(
 cellWeighted_Foldchange_matrix = norm$cellWeighted_Foldchange,
 species = theSpecies, background = background, gene_cut = -9,
 newGprofiler = TRUE)

 
 

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