metaGE.manhattan: Draw the Manhattan plot.

metaGE.manhattanR Documentation

Draw the Manhattan plot.

Description

The function metaGE.manhattan displays the Manhattan plot of the -log10(p-value) or the local score of each marker along the genome.

Usage

metaGE.manhattan(
  Data,
  VarName,
  Threshold = NULL,
  SigZones = NULL,
  Score = FALSE,
  AnnotateMarkers = NULL,
  Main = "",
  col = c("grey", "black"),
  colSigZones = "blue",
  Ylim = NULL
)

Arguments

Data

A dataset containing the columns: CHR, POS, MARKER and the variable to plot for each marker, as obtained from metaGE.fit().

VarName

The name of the column containing the variable to plot, generally the p-value or a score.

Threshold

A threshold in order to draw a "genome-wide significant" line. (optional)

SigZones

A dataset containing the significant zones to plot, as obtained from metaGE.lscore(). Must have columns: CHR, Start, End. (optional)

Score

A boolean. If FALSE, the -log10 of the variable is plotted, useful for plotting p-values. If TRUE, the raw values of the variable is plotted, useful for plotting scores. (FALSE by default)

AnnotateMarkers

A list of markers name to annotate in the plot. (optional)

Main

The main to display. (optional)

col

A character vector indicating which colors to alternate for different chromosomes. (optional)

colSigZones

A character indicating which color to plot the significant zones.("blue" by default)

Ylim

Two numeric values, specifying the lower limit and the upper limit of the y-axe scale. (optional)

Value

The Manhattan plot.

Examples

require(dplyr)
# Import the data
data("metaData")

# Compute the inter-environment correlation matrix
matCorr <- metaGE.cor(metaData, Threshold = 0.8)

# Fit the Fixed Effect model
FeDF <- metaGE.fit(metaData, matCorr, Method = "Fe")

# Control the FDR (here Benjamini-Hochberg)
Alpha <- 0.05
Signif <-  FeDF$PVALUE %>% p.adjust(method = "BH") %>% `<`(Alpha) %>% which

# Draw the corresponding manhattan plot
PvalThresholdFe <- FeDF[Signif,]$PVALUE%>% max %>% max(.,0)
manhattan_pval <- metaGE.manhattan(Data = FeDF,VarName = 'PVALUE',
                             Threshold = PvalThresholdFe,
                              Main = '-log10(Pval) alongside the chromosome Fe method')


# Compute the score local
xi <- 2
FeScore <- metaGE.lscore(FeDF,"PVALUE", xi)

# Draw the corresponding manhattan plot
manhattan_lscore <- metaGE.manhattan(Data = FeScore$Data,VarName = 'SCORE',
                                     SigZones = FeScore$SigZones, Score = TRUE,
                                     Main = 'Local score alongside the chromosome Fe method')

metaGE documentation built on April 3, 2025, 8:48 p.m.