Learn R Programming

XGR (version 1.1.4)

xGRkaryogram: Function to visualise genomic regions using karyogram plot

Description

xGRkaryogram is supposed to visualise genomic regions using manhattan plot. It returns an object of class "ggplot".

Usage

xGRkaryogram(gr, cytoband = F, color = "royalblue", size = 0.5,
label = F, label.size = 2, label.col = "magenta", label.force = 0.05,
label.query = NULL, verbose = T,
RData.location = "http://galahad.well.ox.ac.uk/bigdata")

Arguments

gr

a GenomicRange object. If the meta-column 'label' is not provided, it will the name of this object

cytoband

logical to indicate whether cytoband will be displayed. By default, it sets to false

color

the rect color. By default it is 'royalblue'

size

the rect size

label

logical to indicate whether to label the rect. By default, it sets to false

label.size

the label size

label.col

the label color ('magenta' by default)

label.force

the repelling force between overlapping labels

label.query

only query will be labelled. By default, it sets to NULL meaning all will be displayed. If labels in query can not be found, then all will be displayed

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

a ggplot object.

See Also

xGRkaryogram

Examples

Run this code
# NOT RUN {
# Load the library
library(XGR)
# }
# NOT RUN {
RData.location <- "http://galahad.well.ox.ac.uk/bigdata"
# }
# NOT RUN {
### GWAS catalog
GWAScatalog <- xRDataLoader('GWAScatalog',
RData.location=RData.location)
gwas <- xGR(GWAScatalog$cse_hg19, format="chr:start-end")
ind <- match(names(gwas), GWAScatalog$cse_hg19)
names(gwas) <- GWAScatalog$snp_id_current[ind]
gwas$label <- names(gwas)
gp <- xGRkaryogram(gwas)
gp
# }

Run the code above in your browser using DataLab