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

Description Usage Arguments Details Value References Examples

View source: R/genomic_utils.R

Description

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

Usage

1
2
3
read.cytoband(cytoband = system.file(package = "circlize",
    "extdata", "cytoBand.txt"), species = NULL, chromosome.index = usable_chromosomes(species),
    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

1
2
3
4
5
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)

jokergoo/circlize documentation built on Aug. 11, 2019, 11:01 a.m.