plotSingleChrom {ggbio}R Documentation

Plot single chromosome with cytoband

Description

Plot single chromosome with cytoband. plotIdeogram is synonyms to plotSingleChrom.

Usage

plotSingleChrom(obj, subchr, zoom.region, xlab, ylab, main, xlabel =
                 FALSE, color = "red", fill = "red", alpha = 0.7,
                 cytoband = TRUE, aspect.ratio = NULL, genome)

plotIdeogram(obj, subchr, zoom.region, xlab, ylab, main, xlabel =
                 FALSE, color = "red", fill = "red", alpha = 0.7,
                 cytoband = TRUE, aspect.ratio = NULL, genome)       

Arguments

obj

A GenomicRanges object, which include extra information about cytoband, check biovizBase::isIdeogram.

subchr

A single character of chromosome names to show.

zoom.region

A numeric vector of length 2 indicating zoomed region.

xlab

Label for x

ylab

Label for y

main

Title for plot.

xlabel

A logical value. Show the x label or not.

color

color for highlight region.

fill

fill color for highlight region.

alpha

alpha for highlight regio.

cytoband

If FALSE, plot just blank chromosome without cytoband. default is TRUE. es

aspect.ratio

aspect ratio for the chromosome ideogram plot, default is NULL.

genome

genome character passed to getIdeogram

Details

User could provide the whole ideogram and use subchr to point to particular chromosome.

Value

A ggplot object.

Author(s)

Tengfei Yin

Examples

## Not run: 
##D library(biovizBase)
##D data(hg19IdeogramCyto, package = "biovizBase")
##D biovizBase::isIdeogram(hg19IdeogramCyto) ## return TRUE
##D plotIdeogram(hg19IdeogramCyto, "chr1")
##D plotIdeogram(hg19IdeogramCyto, "chr1", xlabel = TRUE)
##D ## zoom
##D plotIdeogram(hg19IdeogramCyto, "chr1",  zoom.region = c(1e8, 1.5e8))
## End(Not run)

[Package ggbio version 1.5.20 ]