我写了一个小册子来打开一个用户定义的网络链接,在这个特定的情况下,一个特定的基因组位置在 UCSC 基因组浏览器中。
javascript:d=%22%22+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);d=d.replace(/%5Cr%5Cn%7C%5Cr%7C%5Cn/g,%22%20,%22);if(!d)d=prompt(%22Enter%20the%20chromosomal%20location%20(ex.%20chr1:213243007-213243247):%22,%20%22%22);if(d!=null)location=%22http://genome.ucsc.edu/cgi-bin/hgTracks?hgS_doOtherUser=submit&hgS_otherUserName=Denilw&hgS_otherUserSessionName=mrkdOvrExpUniqMonometh&position=%22+escape(d).replace(/%20/g,%22+%22);void%200
人类基因组中有 24 条染色体可以显示,我想做以下事情:
1)从用户输入的字符串中解析出染色体
在 java 脚本中使用正则表达式从 chr22:213243007-213243247 解析 22 或从 chrX:213243007-213243247 解析 X
2)根据用户输入在UCSC表单的下拉选项中进行选择
对于 22 条染色体中的每一条,共有 88 条染色体,有 4 条轨迹或数据集要显示。根据上面选择的链接,这些可以在UCSC 基因组浏览器的“自定义轨道”部分中选择,例如
HS0356_chr_ CHROMOSOME _duplicates_standard_len_triangle HS0445_dpwg_chr_chr CHROMOSOME _duplicates_standard_len_triangle HS1328_chr_ CHROMOSOME _duplicates_standard_len_triangle HS1329_dpwg_chr_chr CHROMOSOME _duplicates_standard_len_triangle
然后我想要上面的下拉菜单,其中CHROMOSOME在第 1 部分中定义为从隐藏更改为完整,以便只显示感兴趣的染色体的数据。
也许这样的事情会有所帮助: http: //www.codeproject.com/KB/scripting/autoselect.aspx