SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Implementation of IGV or IGB tool on web page. kumardeep Bioinformatics 1 06-25-2012 03:50 AM
IGV v2 performance much worse than IGV 1.5? pmiguel Bioinformatics 1 05-17-2012 07:05 PM
Noncode Download Page Francisc Bioinformatics 0 03-29-2012 12:33 AM
IGV-dbSNP paolo.kunder Bioinformatics 2 02-20-2012 11:15 PM

Reply
 
Thread Tools
Old 05-18-2016, 11:52 AM   #1
r.rosati
Member
 
Location: Brazil

Join Date: Aug 2015
Posts: 92
Default Opening a dbSNP page from IGV?

Hello,
I often want to search dbSNP entries I find while browsing exomes in IGV. Apparently left-clicking the dbSNP track entry doesn't have this functionality (as opposed to, say, the RefSeq Genes track).
At the moment, to avoid re-writing the rs I'm just using a small Python 3 script - it's trivial but if anybody else wants it, it's this one:

Code:
#!/usr/bin/env python3
'''
Opens Google and dbSNP webpages to a rs SNP copied from IGV.
Usage: right-click the rs on IGV, select "Copy details to clipboard",
then execute the script.
'''

from tkinter import Tk, messagebox
import re
import webbrowser

a = Tk().clipboard_get()
rs = re.search('<b>rs(\d*?)</b>', a)
if rs:
    webbrowser.open('http://www.google.com.br/search?q=rs'
                    '{0}'.format(rs.group(1)))
    webbrowser.open('http://www.ncbi.nlm.nih.gov/projects/SNP/snp_ref.cgi?rs='
                    '{0}'.format(rs.group(1)))
else:
    messagebox.showwarning('Warning', 'No rs found in clipboard.')
It captures the clipboard, so I use it by right-clicking the SNP in IGV, selecting "Copy details to clipboard", and then executing the script right away. (...It beats retyping the SNP.)

But I was wondering if there's anything I'm missing on IGV? I found it strange that this functionality isn't available, so maybe it is and I'm not finding it.
Thanks!

Last edited by r.rosati; 05-18-2016 at 12:29 PM. Reason: Added description & shebang
r.rosati is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 03:31 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO