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:
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!
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.')
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!