Miami Plot
Arguments
- gwas1
The first of two GWAS datasets to plot, in the upper region.
- gwas2
The second of two GWAS datasets to plot, in the lower region.
- name1
The name of the first dataset, plotted above the upper plot region. Defaults to "GWAS 1".
- name2
The name of the second dataset, plotted below the lower plot region. Defaults to "GWAS 2".
- chr1
The name of the column containing chromosome number in
gwas1. Defaults to "chr".- chr2
The name of the column containing chromosome number in
gwas2. Defaults to "chr".- pos1
The name of the column containing SNP position in
gwas1. Defaults to "pos".- pos2
The name of the column containing SNP position in
gwas2. Defaults to "pos".- p1
The name of the column containing p-values in
gwas1. Defaults to "p".- p2
The name of the column containing p-values in
gwas2. Defaults to "p".- z1
The name of the column containing z-values in
gwas1. Defaults to "NULL".- z2
The name of the column containing z-values in
gwas2. Defaults to "NULL".- sug
The threshold for suggestive significance, plotted as a light grey dashed line.
- sig
The threshold for genome-wide significance, plotted as a dark grey dashed line.
- pcutoff
The p-value threshold below which SNPs will be ignored. Defaults to 0.1. It is not recommended to set this higher as it will narrow the central gap between the two plot region where the chromosome number is plotted.
- topcols
A vector of two colours to plot alternating chromosomes in for the upper plot. Defaults to green3 and darkgreen.
- botcols
A vector of two colours to plot alternating chromosomes in for the lower plot. Defaults to royalblue1 and navy.
- yAxisInterval
The interval between tick marks on the y-axis. Defaults to 5, 2 may be more suitable for plots with larger minimum p-values.
Value
In addition to creading a Miami plot, the function returns a data frame containing x coordinates for chromosome start positions (required for labelManhattan)
Examples
if (FALSE) { # \dontrun{
# miamiplot2(gwas1, gwas2)
# chrmaxpos <- miamiplot2(gwas1, gwas2)
gwas <- within(mhtdata[c("chr","pos","p")], {z=qnorm(p/2)})
chrmaxpos <- miamiplot2(gwas,gwas,name1="Batch 2",name2="Batch 1",z1="z",z2="z")
labelManhattan(chr=c(2,16),pos=c(226814165,52373776),name=c("AnonymousGene","FTO"),
gwas,gwasZLab="z",chrmaxpos=chrmaxpos)
} # }