Cytogenic Location To Genome Coordinates In R
3
5
Entering edit mode
12.8 years ago
Jimineep ▴ 60

Hey,

I often see cytogenic coordinates written as e.g.

3q26

If I put this into the UCSC genome browser I see this region corresponds to:

chr3:160,700,001-182,700,000

My question: Is there an easy was to jump between the two using R? Or a simple way to calculate one from the other I could implement?

Thanks!

r genome coordinates • 8.3k views
ADD COMMENT
0
Entering edit mode

I should add that I have seen this, I wanted to ask if there was an easy way to do it in R without downloading files

http://biostar.stackexchange.com/questions/4363/how-to-obtain-chromosome-locus-from-coordinates

ADD REPLY
7
Entering edit mode
12.8 years ago
brentp 24k

You can use your favorite mysql wrapper in R.

From location to cytoband using the commandline:

mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -D hg19  -e 
"select name from cytoBand where chrom = 'chr3' AND chromStart <= 182700000
and chromEnd >= 160700001"

from cytoband to location:

mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -D hg19  -e 
"select chrom, min(chromStart), max(chromEnd) from cytoBand where 
name like 'q36%' group by chrom;"
ADD COMMENT
0
Entering edit mode

Thanks! Although this can't be an uncommon task, if I can get it to work I might stick something on R-forge/CRAN

ADD REPLY
0
Entering edit mode

A note about the 'location to cytoband using the commandline' section. If you don't have a point, but an interval, you'll need to check for overlap.

In this case, check http://stackoverflow.com/questions/325933/determine-whether-two-date-ranges-overlap for the most efficient way to do this.

So, something like this (for finding gene names)

SELECT name2 FROM refGene WHERE chrom=$chr AND ( txStart<=$end AND txEND>=$start)";

or this (for finding cytoBands)

SELECT name FROM cytoBand WHERE chrom=$chr AND (chromStart <= $end and chromEnd >= $start)";
ADD REPLY
0
Entering edit mode

the SQL as written in the answer does check for overlap in location to cytoband

ADD REPLY
5
Entering edit mode
12.3 years ago
Stephwen ▴ 160

You could also directly download the coordinates of the cytoBands:

http://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/cytoBand.txt.gz

ADD COMMENT
0
Entering edit mode
10.0 years ago
Leandro Lima ▴ 970

Hi all.

Based on the hints given here, I created a script to do that.

https://github.com/lelimat/bioinfo/blob/master/region_to_cytoband.sh

The usage is

bash region_to_cytoband.sh chrom:start-end

or

bash region_to_cytoband.sh chrom  start  end

Please feel free to improve.

Regards,
Leandro

ADD COMMENT

Login before adding your answer.

Traffic: 2261 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