Question: Genomic coordinates for Cytogenetic bands with R
2
gravatar for zlskidmore
5.3 years ago by
zlskidmore290
United States, St. Louis, Washington University
zlskidmore290 wrote:

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.

ideogram R • 2.1k views
ADD COMMENTlink modified 5.3 years ago by Julian Gehring20 • written 5.3 years ago by zlskidmore290
6
gravatar for Alex Reynolds
5.3 years ago by
Alex Reynolds30k
Seattle, WA USA
Alex Reynolds30k wrote:

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 COMMENTlink modified 5.2 years ago • written 5.3 years ago by Alex Reynolds30k
1

Thanks Alex,

did not realize R could connect to an SQL database

ADD REPLYlink written 5.3 years ago by zlskidmore290
0
gravatar for Julian Gehring
5.3 years ago by
Julian Gehring20 wrote:

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 COMMENTlink modified 5.3 years ago • written 5.3 years ago by Julian Gehring20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1210 users visited in the last hour