Learn R Programming

Gviz (version 1.16.1)

IdeogramTrack-class: IdeogramTrack class and methods

Description

A class to represent the schematic display of a chromosome, also known as an ideogram. The respective information is typically directly fetched from UCSC.

Usage

IdeogramTrack(chromosome=NULL, genome, name=NULL, bands=NULL, ...)

Arguments

chromosome
The chromosome for which to create the ideogram. Has to be a valid UCSC chromosome identifier of the form chrx, or a single integer or numeric character unless option(ucscChromosomeNames=FALSE). The user has to make sure that the respective chromosome is indeed defined for the the track's genome.
genome
The genome on which to create the ideogram. This has to be a valid UCSC genome identifier if the ideogram data is to be fetched from the UCSC repository.
name
Character scalar of the track's name used in the title panel when plotting. Defaults to the selected chromosome.
bands
A data.frame with the cytoband information for all available chromosomes on the genome similar to the data that would be fetched from UCSC. The table needs to contain the mandatory columns chrom, chromStart, chromEnd, name and gieStain with the chromosome name, cytoband start and end coordinates, cytoband name and coloring information, respectively. This can be used when no connection to the internet is available or when the cytoband information has been cached locally to avoid the somewhat slow connection to UCSC.
...
Additional items which will all be interpreted as further display parameters.

Value

  • The return value of the constructor function is a new object of class IdeogramTrack.

Objects from the Class

Objects can be created using the constructor function IdeogramTrack.

Extends

Class "RangeTrack", directly.

Class "GdObject", by class "RangeTrack", distance 2.

Details

Ideograms are schematic depictions of chromosomes, including chromosome band information and centromer location. The relevant data for various species is stored in the UCSC data base. The initializer method of the class will automatically fetch the respective data for a given genome and chromosome from UCSC and fill the appropriate object slots. When plotting IdeogramTracks, the current genomic location is indicated on the chromosome by a colored box.

The Gviz.ucscUrl option controls which URL is being used to connect to UCSC. For instance, one could switch to the European UCSC mirror by calling options(Gviz.ucscUrl="http://genome-euro.ucsc.edu/cgi-bin/".

See Also

AnnotationTrack

DisplayPars

GdObject

GeneRegionTrack

GRanges

ImageMap

IRanges

RangeTrack

StackedTrack

clearSessionCache

collapsing

DataTrack

grouping

panel.grid

plotTracks

settings

Examples

Run this code
## Load some sample data
data(idTrack)

## Construct the object
idTrack <- IdeogramTrack(chromosome=7, genome="mm9")

## For some annoying reason the postscript device does not know about
## the sans font
if(!interactive())
{
font <- ps.options()$family
displayPars(idTrack) <- list(fontfamily=font, fontfamily.title=font)
}

## Plotting
plotTracks(idTrack, from=5000000, to=9000000)

## Track names
names(idTrack)
names(idTrack) <- "foo"
plotTracks(idTrack, from=5000000, to=9000000)


## Accessors
chromosome(idTrack)
chromosome(idTrack) <- "chrX"

genome(idTrack)
genome(id) <- "hg19"

range(idTrack)
ranges(idTrack)

## Annotation
values(idTrack)

## coercion
as(idTrack, "data.frame")

Run the code above in your browser using DataLab