| plotGseaEnrTable | R Documentation |
This function plots the GSEA enrichment table.
plotGseaEnrTable(GseaTable, x, go, genesets, species=c('human','mouse'),
alpha=1, simplify.func=shorten.MSigDB.terms, simplify.func.par=list(),
type=c('RES','NES'), col.up='#F8766D', col.down='#00BFC4', mar=NULL, oma=NULL, ...)
GseaTable |
a data.frame, must be (usually a subset of) the GSEA output from |
x |
a data.frame of query gene signatures used for generating |
go |
a data.frame of gene annotations. See |
genesets |
a vector of gene annotation set names. See |
species |
Specifying the species for the input gene signatures. Only used when |
alpha |
power to scale the weights: 0 (unweighted = Kolmogorov-Smirnov), 1 (weighted), and 2 or larger (over-weighted) |
simplify.func |
function to convert MSigDB terms to a simplified form. Default |
simplify.func.par |
a named list to pass parameters to |
type |
content type to be plotted, either |
col.up |
color for positive score. |
col.down |
color for negative score. |
mar |
a numerical vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot. |
oma |
a vector of the form c(bottom, left, top, right) giving the size of the outer margins in lines of text.. |
... |
additional arguments used for |
Depending on the original function for calculating GseaTable, either go or genesets must be specified as in function GOtest or msigdb.gsea. When both are provided, only go will be used.
See example usage below.
msigdb.gsea, GOtest, shorten.MSigDB.terms
## Not run:
#load approved symbols for protein-coding genes by HGNC;
#these will be the gene universe for the present toy example analysis
universe=curated.genesets(c('HGNC_universe'))$Gene
n=length(universe)
#
#Create a toy example for weighted enrichment using GSEA and logistic regression
toy=data.frame(Gene=universe,Phenotype='XYZ',Z=rnorm(n,0,1),stringsAsFactors=FALSE)
#GSEA against MSigDB gene ontology biological process (C5.BP). This may take a long time to run.
fit2=msigdb.gsea(x=toy, genesets=c('C5.BP'), query.population=universe,
background='query', method='GSEA', permutations=100)
head(fit2)
#Plot the GSEA running enrichment score for the top 10 GSEA terms
plotGseaEnrTable(GseaTable=fit2[1:10,], x=toy, genesets=c('C5.BP'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.