Genomic coordinates for Cytogenetic bands with R
2
2
Entering edit mode
9.7 years ago
zlskidmore ▴ 290

Hi All,

Does anyone know of a resource in R to obtain the genomic coordinates of cytogenetic bands. I have tried bioMart without success and was hoping to obtain this information through an R interface without resorting to an outside resource.

R ideogram • 3.9k views
ADD COMMENT
7
Entering edit mode
9.7 years ago

You could probably run the following command-line search via a system() or MySQL library call within R:

$ mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -D hg19 -e "SELECT chrom, chromStart, chromEnd, name FROM cytoBand"

For instance:

> result <- system("mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -D hg19 -e \"SELECT chrom, chromStart, chromEnd, name FROM cytoBand\"", intern=TRUE)

Or you might run the RMySQL library:

> install.packages("RMySQL", type="source")
> library(RMySQL)
> connection <- dbConnect(MySQL(), user="genome", host="genome-mysql.cse.ucsc.edu", dbname="hg19")
> result <- dbGetQuery(conn=connection, statement="SELECT chrom, chromStart, chromEnd, name FROM cytoBand")

The output from system() may require additional parsing with split() and other functions to build a matrix or data frame.

ADD COMMENT
1
Entering edit mode

Thanks Alex,

did not realize R could connect to an SQL database

ADD REPLY
0
Entering edit mode
9.7 years ago

You can use the getIdeogram function from the biovizBase package which will query UCSC for you. As an example, get the cytobands for the human hg19 genome:

library(biovizBase)
hg19IdeogramCyto <- getIdeogram("hg19", cytobands = TRUE)

This will work for all genomes and species that are provided by UCSC.

ADD COMMENT

Login before adding your answer.

Traffic: 1665 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6