Question: How to get coordinates from UCSC Genome Browser
0
gravatar for fk566938
4.5 years ago by
fk56693810
United States
fk56693810 wrote:

Hello, I am trying to get coordinates for a gene on the ucsc genome browser. I have zoomed in but once you zoom in by holding shift and click it can only zoom in so much.

ADD COMMENTlink modified 4.5 years ago by Alex Reynolds30k • written 4.5 years ago by fk56693810
3
gravatar for Alex Reynolds
4.5 years ago by
Alex Reynolds30k
Seattle, WA USA
Alex Reynolds30k wrote:

You can do a mysql query of the UCSC Genome Browser for a specific gene and build, e.g., human "CTCF":

$ gene="ctcf"
$ mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -N -e "SELECT k.chrom, kg.txStart, kg.txEnd, x.geneSymbol FROM knownCanonical k, knownGene kg, kgXref x WHERE k.transcript = x.kgID AND k.transcript = kg.name AND x.geneSymbol LIKE '${gene}';" hg19
+-------+----------+----------+------+
| chr16 | 67596309 | 67673088 | CTCF |
+-------+----------+----------+------+

Just replace the value of gene with your gene-of-interest, and modify the build (hg19) if you're interested in a different reference genome or organism.

Some genes have more than one transcript. You can add LIMIT 1 to the SQL query to just grab the first hit:

$ mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -N -e "SELECT k.chrom, kg.txStart, kg.txEnd, x.geneSymbol FROM knownCanonical k, knownGene kg, kgXref x WHERE k.transcript = x.kgID AND k.transcript = kg.name AND x.geneSymbol LIKE '${gene}' LIMIT 1;" hg19

Or you could post-process the query output with awk or similar to get the first result's start and last result's end coordinates, to get the overall interval of the gene.

ADD COMMENTlink modified 6 months ago by RamRS27k • written 4.5 years ago by Alex Reynolds30k
1
gravatar for 5utr
4.5 years ago by
5utr350
Canada
5utr350 wrote:

When you enter the gene name genome browser offers you with a list of genes and transcripts that match your query, each one has the coordinates for the assembly that you selected.

Alternatively you can go to Table browser and download a flat table that you can customize: https://genome.ucsc.edu/cgi-bin/hgTables?hgsid=454971717_SwAPqe5Nq2wP5DA8laA6PO1XcxiE

ADD COMMENTlink modified 6 months ago by RamRS27k • written 4.5 years ago by 5utr350
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: 731 users visited in the last hour