Background

A Manhattan plot, which plots the association statistical significance as –log10(p-value) in the y-axis against chromosomes in the x-axis, is a good way of displaying millions of genetic variants in one figure. One can easily spot regions of the genome that cross a particular significance threshold. Furthermore, it makes it easy to identify regions that can be taken forward for replication. Several software packages (QQMAN [1], GWAMA [2], IGV [3], https://genome.sph.umich.edu/wiki/Code_Sample:_Generating_Manhattan_Plots_in_R, SNPEVG [4]) come bundled with a plotting feature or a small R script which can generate a Manhattan plot. These scripts generate the plot but because of the lack of any further information in the plot (annotating the plot with gene names, identifying how significant are low frequency variants and high impact consequence variants in the GWAS), the Manhattan plot is losing its importance in more recent GWAS publications. However, with availability of large cohorts (eg. UK Biobank) and power to detect more loci crossing genome wide significant threshold (over 500 in the recent Blood Pressure GWAS [5]), it is a tedious, time-consuming process to annotate gene names manually on a Manhattan plot. Another drawback with the conventional plot is the inability to identify the number of variants hiding behind “a” visible dot. In order to overcome the limitation to annotate ever-increasing loci discovered, researchers have started transposing [6,7,8,9,10,11] the Manhattan plot to give more room to display the gene names on the plot. Manhattan++ software tool reads the genome-wide summary statistic on millions of variants and generates the transposed Manhattan++ plot with user defined annotations like gene-names, allele frequencies, variant consequence and summary statistics of loci of interest.

Implementation

The software is written in R (version > = 3.4.0) and requires ggplot2, ggrepel, reshape2 and gridExtra packages (along with their dependencies). The software needs three files as input. The first file contains the genome-wide summary statistics. This file should contain the variant name, chromosome, position, p-values, minor allele frequency (MAF) and consequence. The code can cope with different column header names and accept compressed summary statistics file. The second file contains the information on the loci of interest that are to be annotated on the plot. This file contains lead sentinel variant name, chromosome, position, effect allele frequency, odds ratio, p-value, novel/known and gene-name for the loci of interest. The third file is a configuration file that instructs the software on the colours, bin sizes and annotation features required for display (Table 1). The display consists of two panels where the left panel is used for transposed Manhattan plot and the right panel to display information on the loci of interest. The script splits the genome (Fig. 1) into user-defined chunks (default 3 million base pairs (Mbp)) and association p-values chunks (default –log10 p-value of 0.125) and creates an empty matrix. The script reads the summary statistics and increments the counter for the respective bin where the variant lies in the matrix. Variants which have a p-value<1e-20 (default) are assigned p-value = 1e-20 and the bin count is incremented accordingly and limited information is lost. The bin count matrix is then used by ggplot2 to display the heatmap using the colours as defined in the configuration file. All the parameters can be edited in the configuration file and when calling the function in R according to user preference.

Table 1 Relevant columns in the configuration file for the software
Fig. 1
figure 1

Displaying the dimensions of the matrix. The genome is split into chunks of 3 Mbp and the association statistics in chunks of 0.125 –log10(p). The number of variants in each cell of the matrix is counted and stored in memory. The colour of the cell is assigned according to the config file settings

Results

The software is customizable and can generate a Manhattan of about 20 million variants on a 32 bit desktop personal computer using under 3.4 GB RAM and similar in Linux (Centos 7). The software has been tested to display annotation of 130 loci in a tabular format (Fig. 2a) with odds ratio, effect allele frequency, p-value & gene-name. If the number of loci to display goes beyond 130, then we recommend using just the gene (or variant) names and the software will display the names in a force directed manner (Fig. 2b). The colours and the number of variants in each bin are customizable (Table 1, Figs. 2c, 3). This gives the reader an insight into the locus whether it is driven by a single variant (Fig. 2a, NOS3 locus), variants with low MAF (< 5%) or variants having a “high” impact functional annotation. (Example: Chromosome 6 has a blue block displayed as “8” which denotes that there are multiple (2–200) variants with at least one variant having low MAF and high impact or two variants one having low MAF and the other having high impact annotation as shown in Fig. 2d). The user have the option to save the output as a PDF or a high-resolution TIFF file.

Fig. 2
figure 2

Screenshots of the output from Manhattan++ software. a) Transposed Manhattan plot on the left and lead variant annotation on the right. Alternating dark and light grey blocks represent the odd and even chromosomes respectively along the y-axis for those variants have association p-value greater than user-defined significance (5% False Discovery Rate). Blocks that contain variants with high impact and/or low MAF are highlighted using a bubble (eg 8). b) Zoomed in screenshot showing peak loci names in bubbles. c) The key showing the index (1–8), variant count (1, 2–200) in each block, annotation (MAF, impact, both), counter showing number of blocks in the plot for this index (eg. there are 2 blocks having index 8 on chromosomes 6 & 8). d) Zoomed in screenshot of a signal where there is a blue block (index 8) that could contain 2–200 variants with at least one variant having low MAF and high impact or two variants, one having low MAF and the other having high impact annotation

Fig. 3
figure 3

The key. Using the default settings, the Manhattan++ plot generates a key for the plot. For keys #5–8, there are 2–400 variants per cell in the matrix (using different configuration file from Fig. 2). The software calculates the maximum count based on the overall matrix. For key #5, there are 6264 cells in the plot. Key #6 tells us that the cell contains 1 or more high impact variant(s) and there are 4 such cells in the plot. Key #7 gives us information on those cells where there are one or more variant(s) with MAF < 5% and there are 1226 such cells. Key #8 tells us that in 2–400 variants, there is one variant with MAF < 5% and is also high impact. If the cell contains 2 variants, one with MAF < 5% and one that is high impact, then the cell will also get key #8

Conclusions

Here we present the Manhattan++ software which is a major step up from existing tools and addresses the highlighted limitations. Furthermore, the code is customizable and being open source increases the potential for future feature enhancements by the community. We recognize that there are existing scripts that generate a Manhattan plot but none can perform the tasks we have implemented in this software. However, only a handful of them annotate the plot with minimal level of detail (Additional file 1: Supplementary Note, Table S1). Most existing scripts generate a graph in a landscape orientation, which is not enough with ever-increasing number of discovered GWAS loci. A limitation with our method is that it takes one full A4 page of the journal to display but with more researchers reading publications online, this figure is highly web readable and useful for poster presentations. This software adds a lot of information to the existing Manhattan plot and we hope that the readers will be able to derive more information by looking at the Manhattan++ plot.