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 = 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 |
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 |
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 https://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 toTRUE
)chromosome
Sorted chromosome names
chr.len
Length of chromosomes. Orders are same as
chromosome
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)