xPierTrack: Function to visualise a prioritised gene using track plot

Description Usage Arguments Value Note See Also Examples

View source: R/xPierTrack.r

Description

xPierTrack is supposed to visualise a prioritised gene using track plot. Priority for the gene in query is displayed on the data track and nearby genes on the annotation track. Genomic locations on the X-axis are indicated on the X-axis, and the gene in query is highlighted. If SNPs are also provided, SNP annotation track will be also displayed at the bottom.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
xPierTrack(
pNode,
priority.top = NULL,
target.query = NULL,
window = 1e+06,
nearby = NULL,
query.highlight = TRUE,
track.ideogram = TRUE,
track.genomeaxis = TRUE,
name.datatrack = "5-star rating\n(Priority index)",
name.annotrack = "Targets",
GR.Gene = c("UCSC_knownGene", "UCSC_knownCanonical"),
SNPs = NULL,
max.num.SNPs = 50,
GR.SNP = c("dbSNP_GWAS", "dbSNP_Common", "dbSNP_Single"),
verbose = TRUE,
RData.location = "http://galahad.well.ox.ac.uk/bigdata",
guid = NULL,
...
)

Arguments

pNode

an object of class "pNode" (or "sTarget" or "dTarget")

priority.top

the number of the top targets used for track plot. By default, it is NULL meaning all targets are used

target.query

which gene in query will be visualised. If NULL, the target gene with the top priority will be displayed

window

the maximum distance defining nearby genes around the target gene in query. By default it is 1e6

nearby

the maximum number defining nearby genes around the target gene in query. By default it is NULL. If not NULL, it will overwrite the parameter 'window'

query.highlight

logical to indicate whether the gene in query will be highlighted

track.ideogram

logical to indicate whether ideogram track is shown. By default, it is TRUE

track.genomeaxis

logical to indicate whether genome axis track is shown. By default, it is TRUE

name.datatrack

the name for the data track. By default, it is "Priority index"

name.annotrack

the name for the annotation track. By default, it is "Genes". If NULL, the title for annotation track will be hided

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"

SNPs

a input vector containing SNPs. SNPs should be provided as dbSNP ID (ie starting with rs). Alternatively, they can be in the format of 'chrN:xxx', where N is either 1-22 or X, xxx is genomic positional number; for example, 'chr16:28525386'. By default, it is NULL meaning the SNP annotation track will be not displayed

max.num.SNPs

the maximum number (50 by default) of SNPs to be shown. If NULL, no such restriction. Also this parameter only works when the SNP annotation track is enabled

GR.SNP

the genomic regions of SNPs. By default, it is 'dbSNP_GWAS', that is, SNPs from dbSNP (version 146) restricted to GWAS SNPs and their LD SNPs (hg19). It can be 'dbSNP_Common', that is, Common SNPs from dbSNP (version 146) plus GWAS SNPs and their LD SNPs (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 dbSNP IDs. Then, tell "GR.SNP" with your RData file name (with or without extension), plus specify your file RData path in "RData.location". Note: you can also load your customised GR object directly

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

guid

a valid (5-character) Global Unique IDentifier for an OSF project. See xRDataLoader for details

...

additional graphic parameters. For example, the parameter "add" allows the plot added to an existing plotting canvas without re-initialising. See http://www.rdocumentation.org/packages/Gviz/topics/plotTracks for the complete list.

Value

a list of GenomeGraph tracks, each one augmented by the computed image map coordinates in the 'imageMap' slot, along with the additional 'ImageMap' object 'titles' containing information about the title panels.

Note

none

See Also

xRDataLoader, xSNPlocations, xGR

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
RData.location <- "http://galahad.well.ox.ac.uk/bigdata"
## Not run: 
# 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')])

# 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) track plot
library(Gviz)
#pdf(file="Gene_tracks.pdf", height=4, width=10, compress=TRUE)
xPierTrack(pNode, RData.location=RData.location)
#dev.off()
xPierTrack(pNode, priority.top=1000, nearby=20,
RData.location=RData.location)

## End(Not run)

Pi documentation built on Nov. 26, 2020, 2:01 a.m.