Biostar Beta. Not for public use.
Cytogenic Location To Genome Coordinates In R
5
Entering edit mode
6.1 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!

ADD COMMENTlink
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 REPLYlink
6
Entering edit mode
14 months ago
brentp 23k
Salt Lake City, UT

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 COMMENTlink
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 REPLYlink
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 REPLYlink
0
Entering edit mode

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

ADD REPLYlink
4
Entering edit mode
3.4 years ago
Stephwen • 140
Belgium

You could also directly download the coordinates of the cytoBands:

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

ADD COMMENTlink
0
Entering edit mode
12 months ago
Leandro Lima • 920
San Francisco, CA

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 COMMENTlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.1