Learn R Programming

GWAF (version 2.2)

GWplot: function for making genome-wide p-value plot

Description

GWplot function plots -log_10 p-value based on SNP's chromosomal position in bitmap format.

Usage

GWplot(data, pval, pos, chr, chr.plot = c(1:22, "X"), title.text = "", ylim = Inf, outfile, cutoff1 = 5e-08, cutoff2 = 4e-07)

Arguments

data
a dataframe that contains p-values, chromosome number and physical position of SNPs
pval
a character string correspong to the name of the p-value column
pos
a character string correspong to the name of column with SNP physical positions
chr
a character string correspong to the name of column with SNP chromosome number
chr.plot
the chsomosomes of interest for GWplot; either 1:22 or c(1:22,"X"), default chr.plot=c(1:22,"X"), "X" for X chromosome
title.text
the title of the genome-wide p-value plot
ylim
the maximum of -log_10 p-value to be plotted, useful when not want to plot extremely small p-values
outfile
the file name (xxxx.bmp) for output plot in bitmap format
cutoff1
genome-wide significance; default is 5E-8 ; p-values below this threshold will be highlighted in red
cutoff2
suggestive genome-wide significance; default is 4E-7; p-values below this threshold but above cutoff1 will be highlighted in blue

Details

When the dataset has 0 p-value, GWplot will generate pvalzero.csv that contain the results with 0 p-value and make the genome-wide p-value plot by replacing 0 p-value with 5E-324. P-values that reach genome-wide significance are displayed in red color; P-values that reach suggestive genome-wide significance but not genome-wide significance are displayed in blue color.

Examples

Run this code
## Not run: 
# GWplot(data=result,pval="pval",pos="position",chr="chr",chr.plot=c(1:22,"X"),outfile="GWP_test.bmp")
# ## End(Not run)

Run the code above in your browser using DataLab