gProfiler_cellWeighted_Foldchange: Pathway enrichment for cwFold-changes

Description Usage Arguments Details Value Examples

View source: R/gProfiler_cellWeighted_Foldchange.R

Description

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

Usage

1
2
3
4
5
6
7
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 charcter that is compatible with gProfileR.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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(bulk_normalized, odds_ratio_in,
                                      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(norm$cellWeighted_Foldchange, theSpecies,
 background, gene_cut = -9, newGprofiler = FALSE)

 
 

DustinSokolowski/scMappR documentation built on July 7, 2020, 5:44 p.m.