plotChromosome: Plot a chromosome

Description Usage Arguments Note Author(s) See Also Examples

Description

plotChromosome draws a chromosome and cytobands with an interface akin to rect with the given coordinates.

Usage

1
2
plotChromosome(chromosome = "chr1", xleft = 0, ybot = 0,
  xright = 1, ytop = 1, taper = 0.2, build = "hg19", ...)

Arguments

chromosome

A character giving the chromosome to plot. Should be one of "chr1", ..., "chr22", "chrX", or "chrY".

xleft

A scalar giving the left x position.

ybot

A scalar giving the bottom y postion.

xright

A scalar giving the right x postion.

ytop

A scalar giving the top y postion.

taper

A numeric givning the amount of tapering near the ends of the chromosome and the centromere.

build

Which UCSC genome build to use. Supported builds are "hg18" and "hg19".

...

Arguments passed to polygon.

Note

Some of the code is borrowed from plotIdiogram in the SNPchip package by Robert Scharpf and Jason Ting.

Author(s)

Anders Ellern Bilgrau
Modified code by Robert Scharpf and Jason Ting

See Also

rect, plotIdiogram, getSequenceLengths

Examples

1
2
3
4
5
6
if (require("SNPchip")) {
  dat <- cumsum(rnorm(100))/sqrt(seq_len(100))
  plot(dat, ylab = "Something", type = "h", ylim = c(-3, 3), 
       col = ifelse(dat > 0, "red", "blue"), lwd = 2)
  plotChromosome("chr10", xleft = 0, ybot = -3, xright = 100, ytop = -2.8)
}

AEBilgrau/Bmisc documentation built on May 5, 2019, 11:28 a.m.