This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Programmatically convert cytoband location to genomic coordinates

Is there any way to convert a cytoband location (e.g., 17p13.3) to its genomic coordinates programmatically (i.e., without having to do a manual conversion)? A web API such as BioMart would be ideal, but I haven't found a way to do it this way. Entrez Eutils would also be okay, but I likewise haven't been able to figure out how to do it this way.

cytoband api

paul - thanks for the post - i've been thinking about this lately. The issue I have been having is that the cytobands are so large in relation to the genomic position I find myself wanting to provide ranges for either start and stop position (because in reality, Im not always sure whether the breakpoints are depending on what types of data the patient has available). I know that you are going the opposite direction (genomic coord to cytoband) - but was just wondering if you've thought about that problem.

Hi Vincent, I stopped working in this area about 6 years ago--I barely even remember the problem I was encountering. Sorry I can't be more helpful!

2 answers

$ mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -D hg38 -e 'select * from cytoBand where concat(right(chrom,length(chrom)-3),name)="17p13.3"'
+-------+------------+----------+-------+----------+
| chrom | chromStart | chromEnd | name  | gieStain |
+-------+------------+----------+-------+----------+
| chr17 |          0 |  3400000 | p13.3 | gneg     |
+-------+------------+----------+-------+----------+

This works well wrapped in a PHP script. Now I have a service on my server that I can pass any cytoband to and get back the coordinates. Thanks.

$ CHR="chr17"
$ LOCATION="p13.3"
$ wget -qO- "http://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/cytoBand.txt.gz" | gunzip -c | grep -F "^${CHR}" | grep -F ${LOCATION} > answer.bed

Log in to answer this question.