TAGGITplot | R Documentation |
Takes a TAGGITontology object and plots it using ggplot2
TAGGITplot(geneListA, geneListB, ontologyCountsA, ontologyCountsB,
A = "UPreg", B = "DOWNreg", labA = A, labB = B,
title = "TAGGIT ontology")
geneListA |
A vector of genes as AGI identiers or Affymetrix probe_ids. |
geneListB |
Another vector of genes as AGI identiers or Affymetrix probe_ids. |
ontologyCountsA |
The dataframe resulting from a |
ontologyCountsB |
The dataframe resulting from a |
A |
UPreg by default (colors will be red/blue), change if not comparing up- to down-regulated geneLists and colors will also change. |
B |
DOWNreg by default (colors will be red/blue), change if not comparing up- to down-regulated geneLists and colors will also change. |
labA |
Label for A (defaults to whatever was passed to |
labB |
Label for B (defaults to whatever was passed to |
title |
Default is |
A plot
# Example data is provided, use the following code to load it
data("GeneSetdata") # loads GeneSet_UP and GeneSet_DOWN objects which contain example data.
## Make a list containing two vectors: 1) up-regulated genes, and 2) down-regulated gene
GeneSet <- list()
GeneSet$UP <- GeneSet_UP # A vector of upregulated genes
GeneSet$DN <- GeneSet_DOWN # A vector of down-regulated genes
## Create TAGGITontology objects
# (may take a few minutes, but the built-in progress bar will keep you informed on the progress)
# Returns dataframe for plotting and outputs an excel sheet of hits to the working directory.
GeneSet_TAGGIT_UP <- TAGGITontology(GeneSet$UP, outputFileName = "TAGGITontologyHits_UP.xlsx")
GeneSet_TAGGIT_DN <- TAGGITontology(GeneSet$DN, outputFileName = "TAGGITontologyHits_DN.xlsx")
## Plot the results of the TAGGIT analysis using ggplot2 via the TAGGITplot function
# Comparing UP and DOWN regulated genesets
TAGGITplot(GeneSet$UP, GeneSet$DN, GeneSet_TAGGIT_UP, GeneSet_TAGGIT_DN, title = "")
## Export the image: for best results export in EPS (vector) format
## For output like Figure 4 in the publication, export at 400x511 resolution
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.