Last data update: 2014.03.03

R: plots a Manhattan plot
plotManhattanR Documentation

plots a Manhattan plot

Description

plots a Manhattan plot

Usage

plotManhattan(bedfile, chrom = NULL, chromstart = NULL, chromend = NULL,
  pvalues, genome = NULL, col = SushiColors(5), space = 0.01,
  ymax = 1.04, ...)

Arguments

bedfile

bedfile for Manhattan plot

chrom

chromosome of region to be plotted

chromstart

start position

chromend

end position

pvalues

pvalues to be used for plotting (will be converted to -log(10) space)

genome

A genome object (2 columns: column 1 = chromosome name, column 2 = length of chromosome). Required if plotting multiple chromosomes at once.

col

single colors, vector of colors, or color palette for coloring points

space

the space in between each chromosome as a fraction of the width of the plot

ymax

fraction of max y value to set as height of plot.

...

Arguments to be passed to methods such as plot

Examples

data(Sushi_GWAS.bed)
data(Sushi_hg18_genome)

chrom1            = "chr11"
chromstart1       = 500000
chromend1         = 5050000

plotManhattan(bedfile=Sushi_GWAS.bed,pvalues=Sushi_GWAS.bed[,5],genome=Sushi_hg18_genome,col=topo.colors,cex=0.75)
labelgenome(genome=Sushi_hg18_genome,side=1,scipen=20,n=4,scale="Mb",edgeblankfraction=0.20,line=.18,chromline=.5,scaleline=0.5)
axis(side=2,las=2,tcl=.2)
mtext("log10(P)",side=2,line=1.75,cex=.75,font=2)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Sushi)
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

Loading required package: biomaRt
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Sushi/plotManhattan.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotManhattan
> ### Title: plots a Manhattan plot
> ### Aliases: plotManhattan
> 
> ### ** Examples
> 
> data(Sushi_GWAS.bed)
> data(Sushi_hg18_genome)
> 
> chrom1            = "chr11"
> chromstart1       = 500000
> chromend1         = 5050000
> 
> plotManhattan(bedfile=Sushi_GWAS.bed,pvalues=Sushi_GWAS.bed[,5],genome=Sushi_hg18_genome,col=topo.colors,cex=0.75)
> labelgenome(genome=Sushi_hg18_genome,side=1,scipen=20,n=4,scale="Mb",edgeblankfraction=0.20,line=.18,chromline=.5,scaleline=0.5)
> axis(side=2,las=2,tcl=.2)
> mtext("log10(P)",side=2,line=1.75,cex=.75,font=2)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>