Function to visualise prioritised genes using manhattan plot

Share:

Description

xPierManhattan is supposed to visualise prioritised genes using manhattan plot. Genes with the top priority are highlighed. It returns an object of class "ggplot".

Usage

1
2
3
4
5
6
xPierManhattan(pNode, color = c("darkred", "darkgreen"), top = 50,
top.label.type = c("box", "text"), top.label.size = 2,
top.label.col = "darkblue", y.scale = c("normal", "sqrt"),
GR.Gene = c("UCSC_knownGene", "UCSC_knownCanonical"), signature = TRUE,
verbose = TRUE, RData.location =
"http://galahad.well.ox.ac.uk/bigdata")

Arguments

pNode

an object of class "pNode"

color

a character vector for colors to alternate chromosome colorings. If NULL, ggplot2 default colors will be used. If a single character is provided, it can be "jet" (jet colormap) or "rainbow" (rainbow colormap, that is, red-yellow-green-cyan-blue-magenta)

top

the number of the top targets to be labelled/highlighted

top.label.type

how to label the top targets. It can be "box" drawing a box around the labels , and "text" for the text only

top.label.size

the highlight label size

top.label.col

the highlight label color

y.scale

how to transform the y scale. It can be "normal" for no transformation, and "sqrt" for square transformation

GR.Gene

the genomic regions of genes. By default, it is 'UCSC_knownGene', that is, UCSC known genes (together with genomic locations) based on human genome assembly hg19. It can be 'UCSC_knownCanonical', that is, UCSC known canonical genes (together with genomic locations) based on human genome assembly hg19. Alternatively, the user can specify the customised input. To do so, first save your RData file (containing an GR object) into your local computer, and make sure the GR object content names refer to Gene Symbols. Then, tell "GR.Gene" with your RData file name (with or without extension), plus specify your file RData path in "RData.location"

signature

logical to indicate whether the signature is assigned to the plot caption. By default, it sets TRUE

verbose

logical to indicate whether the messages will be displayed in the screen. By default, it sets to false for no display

RData.location

the characters to tell the location of built-in RData files. See xRDataLoader for details

Value

an object of class "ggplot", appended by an GR object called 'gr'

Note

none

See Also

xRDataLoader, xPier, xPierSNPs, xPierGenes, xPierPathways

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## Not run: 
# Load the library
library(Pi)

## End(Not run)

RData.location <- "http://galahad.well.ox.ac.uk/bigdata_dev"
# a) provide the SNPs with the significance info
## get lead SNPs reported in AS GWAS and their significance info (p-values)
#data.file <- "http://galahad.well.ox.ac.uk/bigdata/AS.txt"
#AS <- read.delim(data.file, header=TRUE, stringsAsFactors=FALSE)
ImmunoBase <- xRDataLoader(RData.customised='ImmunoBase',
RData.location=RData.location)
gr <- ImmunoBase$AS$variants
AS <- as.data.frame(GenomicRanges::mcols(gr)[, c('Variant','Pvalue')])

## Not run: 
# b) perform priority analysis
pNode <- xPierSNPs(data=AS, include.eQTL="JKng_mono",
include.HiC='Monocytes', network="PCommonsUN_medium", restart=0.7,
RData.location=RData.location)

# c) manhattan plot
## default plot
mp <- xPierManhattan(pNode, RData.location=RData.location)
#pdf(file="Gene_manhattan.pdf", height=6, width=12, compress=TRUE)
print(mp)
#dev.off()
mp$gr
## control visuals
mp <- xPierManhattan(pNode, color='ggplot2', top=50,
top.label.col="black", y.scale="sqrt", RData.location=RData.location)
mp

## End(Not run)