R: Read/parse cytoband data from a data frame/file/UCSC database

read.cytoband {circlize} | R Documentation

## Read/parse cytoband data from a data frame/file/UCSC database

### Description

Read/parse cytoband data from a data frame/file/UCSC database

### Usage

    read.cytoband(cytoband = system.file(package = "circlize",
        "extdata", "cytoBand.txt"), species = NULL, chromosome.index = NULL, sort.chr = TRUE)

### Arguments

`cytoband` | Path of the cytoband file or a data frame that already contains cytoband data
`species` | Abbreviations of species. e.g. hg19 for human, mm10 for mouse. If this value is specified, the function will download `cytoBand.txt.gz` from UCSC website automatically.
`chromosome.index` | subset of chromosomes, also used to reorder chromosomes.
`sort.chr` | Whether chromosome names should be sorted (first sort by numbers then by letters). If `chromosome.index` is set, this argument is enforced to `FALSE`

### Details

The function read the cytoband data, sort the chromosome names and calculate the length of each chromosome. By default, it is human hg19 cytoband data.

You can find the data structure of the cytoband data from http://hgdownload.cse.ucsc.edu/goldenpath/hg19/database/cytoBand.txt.gz

### Value

`df`

  Data frame for cytoband data (rows are sorted if `sort.chr` is set to `TRUE`)

`chromosome`

  Sorted chromosome names

`chr.len`

  Length of chromosomes. Orders are same as `chromosome`

### References

Gu, Z. (2014) circlize implements and enhances circular visualization in R. Bioinformatics.

### Examples

    data = read.cytoband(species = "hg19")
    data = read.cytoband(cytoband = system.file(package = "circlize", "extdata", "cytoBand.txt"))
    cytoband = read.table(system.file(package = "circlize", "extdata", "cytoBand.txt"),
        colClasses = c("character", "numeric", "numeric", "character", "character"), sep = "\t")
    data = read.cytoband(cytoband = cytoband)

[Package circlize version 0.4.5 Index]