How To Obtain Chromosome Locus From Coordinates
4
3
Entering edit mode
10.8 years ago
Prateek ★ 1.0k

I have chromosome start and end coordinates for a given chromosome. I need to translate these to locus - something like this

"11q1.4-q2.1", meaning it is on the long arm of chromosome 11, somewhere in the range from sub-band 4 of band 1, and sub-band 1 of band 2.
from wikipedia http://en.wikipedia.org/wiki/Locus_%28genetics%29

chromosome coordinates • 16k views
ADD COMMENT
5
Entering edit mode
10.8 years ago

You can download the coordinates of the cytobands from the UCSC here.

curl -s "http://hgdownload.cse.ucsc.edu/goldenPath/hg18/database/cytoBand.txt.gz" | gunzip  -c 
chr1    0       2300000 p36.33  gneg
chr1    2300000 5300000 p36.32  gpos25
chr1    5300000 7100000 p36.31  gneg
chr1    7100000 9200000 p36.23  gpos25
chr1    9200000 12600000        p36.22  gneg
chr1    12600000        16100000        p36.21  gpos50
chr1    16100000        20300000        p36.13  gneg
chr1    20300000        23800000        p36.12  gpos25
chr1    23800000        27800000        p36.11  gneg
chr1    27800000        30000000        p35.3   gpos25
(...)
ADD COMMENT
3
Entering edit mode
10.8 years ago
Gww ★ 2.7k

You can use the UCSC cytoband table for this information. Just click get output and it will show you all of them and their chromosomal coordinates. Just make sure you are using the right genome builkd.

ADD COMMENT
1
Entering edit mode
6.8 years ago
Leandro Lima ▴ 960

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
1
Entering edit mode

Heng Li wrote a generalization of such tool: https://github.com/lh3/misc/blob/master/biodb/batchUCSC.pl

ADD REPLY
1
Entering edit mode

You could also pipe in the region via a standard set operation with Pierre's example, e.g.:

$ curl -s "http://hgdownload.cse.ucsc.edu/goldenPath/hg18/database/cytoBand.txt.gz" | gunzip  -c | bedops -e 1 - <(echo -e "chr1\t10000000\t11000000")
chr1    9200000    12600000    p36.22    gneg

Obviously, if you have a bunch of regions to lookup, it is better to cache the output of curl or wget and do the set operations on that cached file. But less code is often less to go wrong and less to debug.

ADD REPLY
1
Entering edit mode
6.0 years ago
kindlychung ▴ 60

I have created a website for this: https://cytob.herokuapp.com/

ADD COMMENT

Login before adding your answer.

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