SNPEVG: a graphical tool for GWAS graphing with mouse clicks

Background Genome-wide association studies (GWAS) using single nucleotide polymorphism (SNP) markers generate large quantities of tests results. Global and local graphical viewing of the test results is an effective approach to digest and interpret GWAS results. Results SNPEVG is a set of graphical tools for instant global and local viewing and graphing of GWAS results for all chromosomes and for each trait. The current version includes three programs, SNPEVG1, SNPEVG2 and SNPEVG3. SNPEVG1 is a graphical tool for SNP effect viewing of P-values allowing multiple traits. The total number of graphs that can be generated by one ‘Run’ is n(c + 2), where n is number of ‘traits’ with 0 < n ≤ 100, and c is the number of chromosomes. SNP effect viewing and graphing is accomplished through a user friendly graphical user interface (GUI) that provides a wide-range of options for the user to choose. The GUI can produce the Manhattan plot, the Q-Q plot of all SNP effects, and graphs for SNP effects by chromosome by clicking one command. Any or all the graphs can be saved with publication quality by clicking one command. SNPEVG2 is for the viewing and graphing of multiple traits on the same graph with options to graph any or all of the traits, customizable colors and user specified Y1 or Y2 axis for each traits. The SNPEVG3 program uses the output file of single-locus test results from the epiSNP computer package as the input file. Each chromosome figure can display three genetic effects (genotypic, additive and dominance effects), and the number of observations. Conclusions The SNPEVG package is a versatile, flexible and efficient graphical tool for rapid digestion of large quantities of GWAS results with mouse clicks.


INTRODUCTION
SNPEVG1 is a graphical tool for SNP effect viewing and graphing for rapid digestion of large quantities of genome-wide significance test results using P-values from any methods of significance testing. Assuming 30 traits and 30 chromosomes per trait, one command of 'Run' produces 960 graphs that will greatly facilitate the digestion of GWAS results. The total number of graphs that can be generated by one 'Run' is n(c + 2), where n is number of 'traits' with 0 < n ≤ 100, and c is the number of chromosomes. Any of the graphs could be readily placed in a publication.
SNP effect viewing and graphing is accomplished through a user friendly graphical user interface (GUI) that provides a wide-range of options for the user to choose. The GUI can produce the Manhattan plot [1], the Q-Q plot [2] of all SNP effects, and graphs for SNP effects by chromosome by clicking one command. Any or all the graphs can be saved as high resolution png files by clicking one command. The user can also increase the png resolution by using full screen. For example, the default screen size give a 667x667 png resolution and full screen gives 1119x1119 for a 1900x1200 screen resolution. The program allows users to select traits for graphing and viewing. The user also has the options to draw graphs using lines or symbols, or specify a cut-off p-value to be shown on each graph or threshold p-value line for SNP effects to be included in the graphs. The main features and options of SNPEVG1 can be summarized as follows.
• Instant graphics of large quantities of genome-wide significance testing results from any methods for any or all traits. • Input format conversion from output file of any GWAS software to the input file format for SNPEVG. • Immediate viewing of all graphics within each SNPEVG1 GUI.
• Scalable SNPEVG1 GUI allowing efficient and flexible use of computer screen.
• Graphics of Manhattan plot, Q-Q plot, and P-value figures for all chromosomes and all traits (up to 100 traits) by one click of 'run'. • Save of one graph, all graphs for all chromosomes of a trait, or all graphs for all chromosomes and all traits (up to 100 traits) by one of 'Current Graph', 'Current Trait' or 'All Graphs'. • Each Manhattan plot has the following options and features: -Each chromosome width is the true width of the chromosome defined by the starting and ending SNP marker positions; -Adjustable fixed pixel size and dynamic pixel size; -Color templates with the support of custom colors; -Horizontal line marking the threshold P-value for declaring significance; -Display of P-values above the specified cut-off P-value; -Shading P-values below the threshold P-value line.
• Each chromosomal figure of P-values has the following options: -Horizontal line marking the threshold P-value for declaring significance; -Display of P-values above the specified cut-off P-value; -Shading P-values below the threshold P-value; -Optional use of lines to connect data points; -User specified unknown chromosome that will plot P-values in the sequential order of SNP markers rather than chromosome positions. • Q-Q plot for each trait displaying all data points.

Windows x86 / x64
The installation of SNPEVG1 only requires to create a folder, to place all files in SNPEVG.zip in that folder, and then change SNPEVG1_exe file to SNPEVG1.exe file. The Windows x64 64-bit version is available by request.

Mac OS X 10.6 or newer 64-bit
The installation of SNPEVG1 only requires to unzip SNPEVG1_Mac.zip file to obtain SNPEVG1.app file.

INPUT FILE FORMATS
One input file with the extension 'snpe' for p-values is required. The format of the input file is: Column 1: SNP name Column 2: chromosome number Column 3: SNP position on the chromosome Columns 4 through Column (n+3): 'Trait columns' of P-values for trait 1 through trait n, where 0 < n ≤ 100.
As an example, the following is an input file named 'SNPEVG1_input1.snpe': In the above file, column 1 is the marker name, column 2 is the chromosome number, column 3 is the marker position in units of base pairs (bp) or genetic distance in centi-Morgans, and column 4 through column 9 are P-values of genotypic effect (geno), additive effect (add) and dominance effect (dom) for each trait (T1 or T2 in this example). Any type of user defined genetic effect could be included as a 'trait' column. For example, one type of genetic effect such as additive effects for all traits could be placed in one input file, as shown in the following example named 'SNPEVG1_input2.snpe': For the given input file, SNPEVG1 plots the log10(1/p) values according to the SNP positions on each chromosome for SNP markers with known chromosome positions, or in sequential orders of the SNP markers for SNPs in the chromosome file specified as 'unknown' by the user. For each 'trait' column, SNPEVG1 produces the following graphs: • Manhattan plot with options; • Q-Q plot with one option; • Graphs for one or all chromosomes with options.

RUNNING SNPEVG1
To run SNPEVG1, open the folder that holds the SNPEVG1 files and required input files. The GUI shown above is scalable, i.e., the GUI size can be changed by dragging the borders of the screen, so that the GUI can use the full screen or part of the screen, allowing efficient and flexible use of the computer screen.

Upload Input File, Select Options, and 'Run'
In the GUI of Figure 1, upload an input file by clicking 'Browse…', select the options, and then click 'Run' to produce the corresponding graphs. Alternatively, the user can drag the SNPE input file and drop to the input field without using browse button. This program supports maximum 100 traits for graphics display, and the extra traits in the input file are discarded. When the input file is specified, total number of traits and number of selected traits are displayed as shown in the upper figure in Figure 2. All traits are selected by default. Clicking 'Select', a dialog in the lower figure in Figure 2 pops up and allows the user to select the traits that will be displayed.

Manhattan Plot
The Manhattan plot allows all SNP effects of all chromosomes per trait. In the GUI of the upper figure in Figure 2, check 'Manhattan Plot'. The program will produce a Manhattan plot, a Q-Q plot, and chromosome graphs for each trait column. The left window of Figure 3 is the 'Graph window' for viewing graphs. The Manhattan plot is always the first graph in the list of each trait's graphs, and the first graph is the default display of all graphs when the user switches the trait.
The upper-right window of Figure 3 is the 'Graph list', showing a list of graphs produced by the 'Run' button. Line 1 is the Manhattan plot, line 2 is the Q-Q plot, and the rest are chromosome graphs of the trait. The user can switch between traits using the left or right arrow key. For example, using the right arrow key at the first line of the list, the program displays the Manhattan plot of the next trait TRAIT01. Similarly, the left arrow key displays the previous Manhattan plot for TRAIT00. The up or down arrow key allows switching between graphs in the graph list.    In the Manhattan plot, each chromosome width is the true width of the chromosome defined by the starting and ending SNP marker positions. The Manhattan plot has the options to change the setting of pixel sizes and colors by clicking the icon beside its checkbox (Figure 4 and 7). The setting of pixel sizes has two options. The fixed pixel size allows the user to change the size of pixels between 1 and 9. The dynamic pixel size allows the pixels to be varied according to the data points' significance within the user-defined range. The color of each chromosome in Manhattan plot is assigned according to the selected color template. The template colors are extended by rotation and can be changed by double-clicking the region of a color to select a new color or moving a color by dragging and dropping the color region in the same template.
Manhattan plot also has options to mark the threshold P-value line for declaring significance (Figure 4), to show data points above the cut-off P-value (Figure 5), or to shade data points below threshold P-value line (Figure 6 and 7).

Q-Q Plot for all SNP Effects
In the GUI of the upper figure in Figure 2, check 'Q-Q Plot' and the program will produce a Q-Q plot. Figure 8 shows the Q-Q plot using all P-values.
Warning: If a cut-off P-value is specified, the Q-Q plot only displays P-values above the cut-off P-value. We do not recommend this option for Q-Q plot.

Chromosome Graphs
Graphs may be drawn for all chromosomes (Figure 9) or one selected chromosome. To select a chromosome, the specified chromosome name must match the name in the input file. Each chromosome graph has the options to use or not to use lines connecting data points (Figure 9), to use a threshold P-value line (Figure 10), or display data points above the cut-off P-value as shown in the lower figure in Figure 10.

INTRODUCTION
SNPEVG2 is a graphical tool for the viewing and graphing of multiple traits on the same graph with the large quantities of genome-wide test results. The program currently uses the same input file, SNPE, of SNPEVG1 for drawing figures. Each chromosome figure can display multiple genetic effects using P-values from any methods of significance testing or original values from any methods (up to 100 effects/values). The chromosome figure also supports two axes ('Y1' and 'Y2'), and the genetic effects or original values can be designated to either 'Y1' or 'Y2' axis for two groups of scales.
SNPEVG2 provides a wide-range of options for the user to choose. The GUI can produce the Manhattan plot [1], the Q-Q plot [2], and graphs for all values by chromosome by clicking one command. Any or all the graphs can be saved as png files by clicking one command. The user can increase the png resolution by using full screen. For example, the default screen size give a 667x667 png resolution and full screen gives 1119x1119 for a 1900x1200 screen resolution. The program allows users to select values from different effects or test methods for graphing and viewing. The user also has the options to draw graphs using lines or symbols, or specify a cut-off value to be shown on each graph or threshold value line to be included in the graphs. The main features and options of SNPEVG2 can be summarized as follows.
• Instant graphics of large quantities of genome-wide significance testing results or original values from any selected significance effects and original values. • Support of 'Y1' and 'Y2' axes and selection of values for either axis.
• Immediate viewing of all graphics within the SNPEVG2 GUI. -Shading values below the threshold value line; -Optional use of lines to connect data points; -User specified unknown chromosome that will plot values in the sequential order of SNP markers rather than chromosome positions. • Q-Q plot for each significant effect displaying all data points.

Windows x86 / x64
The installation of SNPEVG2 only requires to create a folder, to place all files in SNPEVG.zip in that folder, and then change SNPEVG2_exe file to SNPEVG2.exe file. The Windows x64 64-bit version is available by request.

Mac OS X 10.6 or newer 64-bit
The installation of SNPEVG2 only requires to unzip SNPEVG2_Mac.zip file to obtain SNPEVG2.app file.

INPUT FILE FORMATS
One input file with the extension 'snpe' for p-values or original values is required. The format of the input file is: Column 1: SNP name Column 2: chromosome number Column 3: SNP position on the chromosome Columns 4 through Column (n+3): 'value columns' of P-values or original values for total n effects and values, where 0 < n ≤ 100.
As an example, the following is an input file named 'SNPEVG2_input1.snpe': In the above file, column 1 is the marker name, column 2 is the chromosome number, column 3 is the marker position in units of base pairs (bp) or genetic distance in centi-Morgans, and column 4 through column 9 are P-values of genotypic effect (geno), additive effect (add) and dominance effect (dom) for each trait (T1 or T2 in this example). Any type of user defined genetic effect could be included as a value column. For example, one type of genetic effect such as additive effects for all traits could be placed in one input file, as shown in the following example named 'SNPEVG2_input2.snpe': For each column, SNPEVG2 produces the following graphs: • Manhattan plot with options.
For each column of genetic effects, SNPEVG2 produces the following graphs: • Q-Q plot with one option.
For all columns of genetic effects and original values, SNPEVG2 produces the following graph: • Graphs for one or all chromosomes with options.

RUNNING SNPEVG2
To The GUI shown below is scalable, i.e., the GUI size can be changed by dragging the borders of the screen, so that the GUI can use the full screen or part of the screen, allowing efficient and flexible use of the computer screen.

Upload Input File, Select Options, and 'Run'
In the GUI of Figure 1, upload an input file by clicking 'Browse…', select the options, and then click 'Run' to produce the corresponding graphs. Alternatively, the user can drag the SNPE input file and drop to the input field without using browse button. This program supports maximum 100 value columns for graphics display, and the extra value columns in the input file are discarded. When the input file is specified, total number of value columns and number of selected value columns are displayed as shown in the upper figure in Figure 2. All 31 value columns are selected and are displayed for axis 'Y1' by default. Clicking 'Setting', a dialog in the lower left figure in Figure 2 pops up and allows the user to select the values that will be displayed. The user can change each value setting for the axis 'Y1' or 'Y2' by single clicking the symbol of 'Y1' or 'Y2', and the setting toggles between the symbol 'Y1' and 'Y2'. The user can also select either axis to be the log10(1/p) value or the original value and change value texts for the display of the legend. The number of total value columns and the number of selected value columns for 'Y1' or 'Y2' are displayed and updated according to the change of the setting. If the axis is specified with the log10(1/p) effect, 'l' is displayed besides the axis notation of 'Y1' or 'Y2'. If the axis is specified with the original value, 'o' is displayed instead. In addition, the symbol color for each value can be changed by double clicking the region of a color and selecting a new color from color selection dialog. The user can also drag to copy a symbol color and drop to change another symbol color.

Manhattan Plot
The Manhattan plot allows all SNP effects or original values of all chromosomes per value column. In the GUI of the upper figure in Figure 2, 'Manhattan Plot' is enabled by default. The program produces Manhattan plots and chromosome graphs for each value column.
The left window of SNPEVG2 in Figure 3 is the 'Graph window' for viewing graphs. The Manhattan plot is always the first graph in the list of each genetic effect or original value's graphs, and the first graph is the default display of all graphs.

Figure 3. Manhattan plot displaying the log10(1/p) values of genetic effects (upper) and Manhattan plot displaying original values (lower).
The upper-right window of SNPEVG2 in Figure 3 is the 'Graph list', showing a list of graphs produced by the 'Run' button. Manhattan plot of each genetic effect and original value is listed and is followed by the Q-Q plots and the chromosome graphs. The user can switch between graphs in the graph list by using the up or down arrow key. For example, using the down arrow key at the first line of the list, the program displays the Manhattan plot of the next genetic effect EFFECT01. Similarly, the up arrow key displays the previous Manhattan plot for EFFECT00.

Figure 7. Manhattan plot with user's color selection (upper) and Manhattan plot with cutoff value and shading of data points below threshold value line (lower).
In the Manhattan plot, each chromosome width is the true width of the chromosome defined by the starting and ending SNP marker positions. The Manhattan plot has the options to change the setting of pixel sizes and colors by clicking the icon beside its checkbox (Figure 4 and 7). The setting of pixel sizes has two options. The fixed pixel size allows the user to change the size of pixels between 1 and 9. The dynamic pixel size allows the pixels to be varied according to the data points' significance within the user-defined range. The color of each chromosome in Manhattan plot is assigned according to the selected color template. The template colors are extended by rotation and can be changed by double-clicking the region of a color to select a new color or moving a color by dragging and dropping the color region in the same template. Manhattan plot also has options to mark the threshold value line for declaring significance (Figure 4), to show data points above the cut-off value (Figure 5), or to shade data points below threshold value line (Figure 6 and 7).

Q-Q Plot for all SNP Effects
In the GUI of the upper figure in Figure 2, check 'Q-Q Plot' and the program will produce a list of Q-Q plots for each genetic effect. Figure 8 shows a Q-Q plot using all P-values.
Warning: If a cut-off value is specified, the Q-Q plot only displays values above the cut-off value. We do not recommend this option for Q-Q plot.

INTRODUCTION
SNPEVGconvert is a tool for input format conversion from output file of any GWAS software to the input file format for SNPEVG. The program provides the user the flexible control of file format conversion for SNPEVG1 and SNPEVG2 for the necessary data and user-selected P values.

Windows x86 / x64
The installation of SNPEVGconvert only requires to create a folder, to place all files in SNPEVGconvert.zip in that folder, and then change SNPEVGconvert_exe file to SNPEVGconvert.exe file for Windows x86 32-bit version or change SNPEVGconvert_x64_exe file to SNPEVGconvert_x64.exe file for Windows x64 64-bit version.

Mac OS X 10.6 or newer 64-bit
The installation of SNPEVGconvert only requires to unzip SNPEVGconvert_Mac.zip file to obtain SNPEVGconvert file.

Parameter file (parameter.dat)
A parameter file with the name parameter.dat is required to run SNPEVGconvert. The parameter file provides user-specific controls and must have the name 'parameter.dat'. Table 1: Example of the parameter file for SNPEVGconvert plink.assoc.linear # input file name 5 # number of columns in the output file 2 1 3 9 8 # positions of columns to print as input file for SNPEVG1 and SNPEVG2 (Must be in this order: SNP marker, chromosome, position, p-value_1 ... p-value_n) assoc.snpe # output file name WARNINGS: Adding or deleting any line creates errors and is not allowed. The user may change the parameter values but may not add or delete any line in the parameter file provided by the program.
The output file of the SNPEVGconvert program is the input file of SNPEVG1 and SNPEVG2 and is the SNPE file format. The output file must be in the order of SNP marker, chromosome, position, and at least one p-value, which is determined in the parameter file.

Input GWAS file
The input GWAS file is determined by the user and are specified in the parameter file. This intput file must contain the SNP marker, chromosome, position, and at least one p-value for producing the output SNPE file.

Windows
To run SNPEVGconvert, one executable file, parameter.dat, and the input GWAS file must be in the same directory. The program can be run in two ways. Method 1 1) Open 'computer' and click the folder where the SNPEVGconvert executable file and its input files are located. 2) Double click the executable file (e.g. SNPEVGconvert.exe).

Mac OS X 64-bit
To run SNPEVGconvert, one executable file, parameter.dat, and the input GWAS file must be in the same directory. The program can be run in the following way.

INTRODUCTION
SNPEVG3 is a graphical tool for SNP effect viewing and graphing. The program currently uses the output file of single-locus test results from the epiSNP computer package [1] as the input file for drawing figures. Each chromosome figure can display three genetic effects (genotypic, additive and dominance effects) and the number of observations. Alternatively, the user may follow the file format of the default input file for graphical viewing and drawing. For example, the user could replace the four columns of genotypic effect, additive effect, dominance effect and the number of observations by four columns of additive effects from four different traits.

Windows x86 / x64
The installation of SNPEVG3 only requires to create a folder, to place all files in SNPEVG.zip in that folder, and then change SNPEVG3_exe file to SNPEVG3.exe file. The Windows x64 64-bit version is available by request.

Mac OS X 10.6 or newer 64-bit
The installation of SNPEVG3 only requires to unzip SNPEVG3_Mac.zip file to obtain SNPEVG3.app file.

FILE FORMATS
One input file with p-values in log10(1/p) scale is required. An example is the output file from the epiSNP package named 'single_locus_fig.out'. The following is an example of this file: In the above file, column 1 is the marker name, column 2 is the chromosome number, column 3 is the marker position, and the first row is the header of the file. Marker name, chromosome number, and marker position start in the second row.

RUNNING SNPEVG3
To run SNPEVG3, open the folder that holds the SNPEVG3 files and required input files.  In the GUI of Figure 1, specify the input file(s), select the options, and then click 'Run' to produce the corresponding graphs for one or multiple traits. Alternatively, the user can drag the input file and drop to the corresponding input field without using browse button.

Manhattan and Q-Q Plots
The Manhattan plot [2] and Q-Q plot [3] by SNPEVG3 have the same features as described for SNPEVG1 except the figure legend for the Manhattan plot (Figure 2). The Manhattan plot has the options to change the setting of pixel sizes and colors by clicking the icon beside its checkbox (Figure 3). The setting of pixel sizes has two options. The fixed pixel size allows the user to change the size of pixels between 1 and 9. The dynamic pixel size allows the pixels to be varied according to the data points' significance within the user-defined range. The color of each chromosome in Manhattan plot is assigned according to the selected color template. The template colors are extended by rotation and can be changed by double-clicking the region of a color to select a new color or moving a color by dragging and dropping the color region in the same template. Manhattan plot also has options to mark the threshold P-value line for declaring significance (Figure 3), to show data points above the cut-off P-value (Figure 4), or to shade data points below threshold P-value line (Figure 5).
Warning: If a cut-off P-value is specified, the Q-Q plot only displays P-values above the cut-off P-value. We do not recommend this option for Q-Q plot.

Chromosome Graphs by SNPEVG3
By default, each chromosome graph by SNPEVG3 displays three genetic effects (genotypic, additive and dominance effects) and the sample size for each SNP. All options for chromosome figures of SNPEVG1 are available for SNPEVG3. Examples are shown in Figures 6.

Sort SNP Effects (with Position Option off)
SNP effects can be sorted according to the significance of one effect, given that the position option is turned off (Figure 7).

Save Graphs to 'png' files
The program saves a graph to an image in the same folder of the input file by the graph's actual dimension. A selected graph can be saved to a 'png' file by clicking 'Current Graph', all the graphs of the currently selected trait can be saved to 'png' files by clicking 'Current Trait', and all the graphs of all traits can be saved to 'png' files by clicking 'All Graphs'.