GenerateGSEA: Create a rnk file for Gene Set Enrichment Analysis

View source: R/GenerateGSEA.R

GenerateGSEAR Documentation

Create a rnk file for Gene Set Enrichment Analysis

Description

This function creates a ranked list of genes for use with a PreRanked Gene Set Enrichment Analysis (GSEA) (www.gsea-msigdb.org/gsea)

Usage

GenerateGSEA(
  res,
  filename = "GSEA.rnk",
  bystat = TRUE,
  byFC = FALSE,
  plotRNK = TRUE,
  retRNK = FALSE
)

Arguments

res

A DESeq2 results object obtained from 'results(dds)' or a data.frame with the same column name values as a DESeq2 results object and rownames as genes

filename

Path to the output .rnk file. Default is "./GSEA.rnk". Set NULL to not write out to file.

bystat

Boolean values determining if genes should be ranked by column 'stat'. If TRUE, and no column 'stat', genes will be ranked using the -log10 of column 'pvalue'. Default is TRUE.

byFC

Boolean values determining if genes should be ranked by column 'log2FoldChange'Default is FALSE.

plotRNK

Boolean indicating if ranked scores should be plotted. Default=TRUE

retRNK

Boolean indicating if ranked list should be returned as data frame object

Value

Exports a ranked gene list. If both bystat and byFC are true, ranking will be abs(stat)*log2FoldChange.


kevincjnixon/BinfTools documentation built on July 10, 2024, 11:46 a.m.