TAGGITplot: TAGGITplot

View source: R/TAGGITplot.R

TAGGITplotR Documentation

TAGGITplot

Description

Takes a TAGGITontology object and plots it using ggplot2

Usage

TAGGITplot(geneListA, geneListB, ontologyCountsA, ontologyCountsB,
  A = "UPreg", B = "DOWNreg", labA = A, labB = B,
  title = "TAGGIT ontology")

Arguments

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 TAGGITontology() call on geneListA.

ontologyCountsB

The dataframe resulting from a TAGGITontology() call on geneListB.

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 A).

labB

Label for B (defaults to whatever was passed to B).

title

Default is "TAGGIT ontology". Set to "" for no title.

Value

A plot

Examples

# 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


bakuhatsu/microarrayTools documentation built on March 26, 2024, 8:53 p.m.