get neighboring genes

14 views
Skip to first unread message

Khan, H.N.

unread,
Oct 8, 2019, 12:03:00 PM10/8/19
to gen...@soe.ucsc.edu, Matthew Speir

Hello UCSC team,

 

I wanted to know if this is possible with UCSC table browser to get the neighboring genes from a given gene.

e.g If I have a GeneA and I want to get the names of the genes that are its neigbours (up and downstream).

 

I do have the gene names along with its coordinates for whom I need to know its neigbours.

 

Thank, waiting for the reply. Can you kindly reply soon.

Regards

Hina

______________________________________________________
VUmc disclaimer : www.vumc.nl/disclaimer
AMC disclaimer : www.amc.nl/disclaimer

Jairo Navarro Gonzalez

unread,
Oct 14, 2019, 7:20:02 PM10/14/19
to Khan, H.N., gen...@soe.ucsc.edu, Matthew Speir

Hello Hina,

Thank you for using the UCSC Genome Browser and your inquiry.

Unfortunately, we do not have an easy way to find the closest genes to a given coordinate, but we do have a tool for finding the "nearest" genes to another gene (via a large selection of "nearest" criteria), the Gene Sorter:

http://genome.ucsc.edu/cgi-bin/hgNear

However, given that you want to find the nearest genes to a set of coordinates, I think using the closest-features tool from the bedops suite is the easiest solution, https://bedops.readthedocs.io/en/latest/. The following BioStars question explains how to use the tool, https://www.biostars.org/p/53587/.

This previously answered mailing list question also gives an example of how to use the closest-features tool with RefSeq transcripts, https://groups.google.com/a/soe.ucsc.edu/d/msg/genome/zVjaN_CMiQQ/YDu-_eCzBQAJ, and am including the example below:

# copy and paste coords of interest into the file then sort:
$ sort -k1,1 -k2,2n hg19.coords > hg19.coords.sorted

# get hg19 refSeq entries and  sort:
$ mysql --user=genome --host=genome-mysql.soe.ucsc.edu -A -Ne "select * from refGene" hg19 | cut -f2-6 | awk 'BEGIN {OFS="\t"} {print $2, $4, $5, $1}' | sort -k1,1 -k2,2n > hg19.refSeq.bed

# find closest:
$ closest-features hg19.coords.sorted hg19.refSeq.bed
chr1    1413937    1413938|chr1    1413494    1431584    NM_001317238|chr1    1447522    1470067    NM_001170535
chr21    40751102    40751103|chr21    40714240    40721047    NM_004965|chr21    40752169    40769815    NM_004627
chr5    121812697    121812698|chr5    121772191    121814782    NR_051996|chr5    121917193    121920295    NR_134281
chr5    180702296    180702297|chr5    180688212    180699308    NR_102762|chr5    180750506    180755196    NR_028322
chr6    27799457    27799458|chr6    27798951    27799305    NM_003541|chr6    27805657    27806117    NM_003510
chr6    31779620    31779621|chr6    31777395    31782835    NM_005527|chr6    31783290    31785719    NM_005345
chr7    45808644    45808645|chr7    45763385    45808617    NR_024271|chr7    45844827    45847509    NR_146388
chr8    22877790    22877791|chr8    22877647    22926700    NR_027140|chr8    22925741    22941132    NR_038873
chr8    22921537    22921538|chr8    22877647    22926700    NR_027140|chr8    22925741    22941132    NR_038873

Please note that the results seem to depend on sorting both inputs, and the "|" character separates the up and downstream features.

I hope this is helpful. If you have any further questions, please reply to gen...@soe.ucsc.edu.
All messages sent to that address are archived on a publicly-accessible Google Groups forum.
If your question includes sensitive data, you may send it instead to genom...@soe.ucsc.edu.

Jairo Navarro
UCSC Genome Browser

Want to share the Browser with colleagues?
Host a workshop: https://bit.ly/ucscTraining


--

---
You received this message because you are subscribed to the Google Groups "UCSC Genome Browser Public Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genome+un...@soe.ucsc.edu.
To view this discussion on the web visit https://groups.google.com/a/soe.ucsc.edu/d/msgid/genome/DB6P193MB012025FECE1BB0AA35C4EA42D39A0%40DB6P193MB0120.EURP193.PROD.OUTLOOK.COM.

Jairo Navarro Gonzalez

unread,
Oct 16, 2019, 7:25:35 PM10/16/19
to Khan, H.N., gen...@soe.ucsc.edu, Matthew Speir

Hello Hina,

One of our engineers has shared that we have the following wiki page to find nearest genes, http://genomewiki.ucsc.edu/index.php/Finding_nearby_genes. On that wiki page, there is a script, closestGene.sh, that can help you find the nearest genes using gene coordinates and contains examples.

I hope this is helpful. If you have any further questions, please reply to gen...@soe.ucsc.edu.
All messages sent to that address are archived on a publicly-accessible Google Groups forum.
If your question includes sensitive data, you may send it instead to genom...@soe.ucsc.edu.

Jairo Navarro
UCSC Genome Browser

Want to share the Browser with colleagues?
Host a workshop: https://bit.ly/ucscTraining

Reply all
Reply to author
Forward
0 new messages