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

The function `manPlotFast`

creates a Manhattan plot.

The function `manPlotPrepare`

extracts necessary information
from a vector of p-values sufficient for creating a Manhattan plot.

It optimized to work quickly even for tens of millions of p-values.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
manPlotPrepare(
pvalues,
chr,
pos,
ismlog10 = FALSE,
chrmargins = 5e6)
manPlotFast(
man,
ylim = NULL,
colorSet = c('steelblue4',"#2C82D1","#4CB2D1"),
yaxmax = NULL,
lwd = 3,
axistep = 2,
cex = 1)
``` |

`pvalues` |
Vector of p-values.
As is (if |

`chr, pos` |
Vectors indicating the chromosomes and genomic positions (in basepairs)
for each p-value in |

`ismlog10` |
Specifies whether the provides p-values ( |

`chrmargins` |
The plot margins at the ends of chromosomes (in basepairs). |

`man` |
Object returned by |

`ylim` |
Numeric vectors of length 2, giving the y coordinate range. Exactly as in Plotting Parameters. |

`colorSet` |
Colors of points, rotating over chromosomes. |

`yaxmax` |
Maximum reach of the y axis. |

`lwd` |
The line width. |

`axistep` |
Distance between axis label ticks for y axis. |

`cex` |
The size of Manhattan plot points. As in Graphics Parameters. |

The function `manPlotFast`

creates Manhattan plot.

It requires the use of the function `manPlotPrepare`

which extracts the necessary information
from a vector of p-values sufficient for creating Manhattan plot.

The resulting object is many times smaller than the vector of p-values.

This function `manPlotPrepare`

returns an object with
information for creating Manhattan plot.

The plot has no title. To add a title use `title`

.

Andrey A Shabalin [email protected]

See vignettes: `browseVignettes("ramwas")`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
# Simulate data (9 chromosomes, million tests each)
chr = rep(paste0('chr',1:9), each = 1e6)
pos = rep(1:1e6, 9)
pv = runif(9e6)^1.1
# Extract the Manhattan plot info
man = manPlotPrepare(pv, chr, pos, chrmargins = 1000)
# Create Manhattan plot
manPlotFast(man)
title("Manhattan plot")
# Size of p-values before extraction of Manhattan plot info
object.size(list(pv, chr, pos))
# Size of the Manhattan plot info object
object.size(man)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.