polarPlot: Polar plot

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/polarPlot.r

Description

Produces a Polar plot, mapping p-values to chromosome location. This function is used by diffExp.

Usage

1
2
3
polarPlot(pValues, chromosomeMapping, colors = c("red", "green", "blue",
  "yellow", "orange", "purple", "tan", "cyan", "gray60", "black"),
  save = FALSE, verbose = TRUE)

Arguments

pValues

a data.frame containing p-values for different contrasts in different columns. Column names are used as contrast names. Maximum number of columns allowed are ten.

chromosomeMapping

character string giving the name of the chromosome mapping file, or an object of class data.frame or similar containing the chromosome mapping. See details below.

colors

character vector of colors to be used by the Polar plot.

save

should the figures be saved? Defaults to FALSE.

verbose

verbose? Defaults to TRUE.

Details

This function is mainly used by diffExp but can also be used separately by the user.

The argument chromosomeMapping should be either a data.frame or a tab delimited text file and include the columns chromosome with the chromosome name and chromosome location containing the starting position of each gene. A - sign can be used to denote the antisense strand but this will be disregarded while plotting. The rownames should be probe IDs or, if using a text file, the first column with a column header should contain the probe IDs. If relying on an ArrayData object (called arrayData) and containing an annotation field, the chromosomeMapping can be set to arrayData$annotation[,c(2,3)] (see the example below).

The Polar plot sorts the genes according to chromosomal location, for each chromosome starting with unknown positions followed by increasing number in the chromosome location column. Genes which do not map to any chromosome are listed as U for unknown. The radial lines in the Polar plot are -log10 scaled p-values, so that a longer line means a smaller p-value. This gives an overview of the magnitude of differential expression for each contrast.

Value

Does not return any object.

Author(s)

Leif Varemo piano.rpkg@gmail.com and Intawat Nookaew piano.rpkg@gmail.com

See Also

piano, diffExp, radial.plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  # Get path to example data and setup files:
  dataPath <- system.file("extdata", package="piano")

  # Load normalized data:
  myArrayData <- loadMAdata(datadir=dataPath, dataNorm="norm_data.txt.gz", platform="yeast2")

  # Perform differential expression analysis:
  pfc <- diffExp(myArrayData, plot=FALSE, 
                 contrasts=c("aerobic_Clim - anaerobic_Clim",
                             "aerobic_Nlim - anaerobic_Nlim"))

  # Get chromosome mapping from myArrayData:
  chrMap <- myArrayData$annotation[,c(2,3)]
  # Get p-values from pfc
  pval <- pfc$pValues
  # Draw the polar plot:
  polarPlot(pval, chromosomeMapping=chrMap)

piano documentation built on Nov. 8, 2020, 6:27 p.m.