gseapipeline.clusters: GSEA for clusters.

Description Usage Arguments Value Examples

View source: R/basicpipeline.R

Description

A function to perform GSEA on differentially expressed gene lists from clusters. Relies for input on the output format from deg.acrossclusters(), and gene pathways in the form of named lists. Also relies on the FGSEA package by Alexey Sergushichev. unfortunately, currently this function only works for Mac users due to PDF encoding limitations special symbols (ie, points denoting statistical signifcance on heatmaps), but windows portability will come very soon. Output plots can be difficult to read if many pathways are used. Recommended 50-75 or so pathways as the maximum, many more will generate very ugly heatmaps.

Usage

1
2
3
4
5
6
7
8
gseapipeline.clusters(
  inputfolder,
  pathways = NULL,
  nperm = NULL,
  makepdf = NULL,
  pdfname = NULL,
  filter_nonsig_pathways = NULL
)

Arguments

inputfolder

A string containing the path to a directory of .rds files storing dataframes outputted by Seurat::FindMarkers(). This is the format of the output of tamlabscpipeline::deg.acrossclusters().

pathways

A named "list of lists" of genes. The format of this object is important for functionality of this function and can be previewed in the tamlabscpipeline::hallmark object. The names of each list element provides the Y axis; the genes within each list element are the target genes used for GSEA. If NULL, defaults to the Msigdb's Hallmark pathways for mouse.

nperm

An integer denoting how many permutations FGSEA will run. Default = 10000.

makepdf

T/F. Whether to print to an output PDF or not. Default = F.

pdfname

A string denoting the name of putput pdf. No effect if makepdf == F. Default is 'clusterGSEA_(date).pdf'

filter_nonsig_pathways

T/F. Whether to remove non-significant rows from resulting heatmap. Useful if running very large numbers of pathways, or to generate finalized plots after exploratory analysis. Default = F.

Value

Prints a heatmap to the standard out, or to a pdf.

Examples

1
2
3
4
## Not run: 
gseapipline.clusters(inputfolder = 'deg.acrossclusters.outputdir/')

## End(Not run)

apf2139/tamlabscpipeline documentation built on July 23, 2021, 11 a.m.