搜索
查看: 2230|回复: 0

[Other] 写一个网页来调取访问者的电脑的IGV软件

[复制链接]

633

主题

1189

帖子

4054

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4054
发表于 2017-5-18 17:16:37 | 显示全部楼层 |阅读模式
第一眼看到,真心觉得好神奇。
后来我搜索了一下:https://software.broadinstitute.org/software/igv/ControlIGV
其实没啥,因为IGV软件本身是JAVA写的,在你电脑打开运行的时候,不仅仅是给了一个界面给你,同时在后台打开了http://localhost:60151/ 端口,这样就可以通过它来通信咯。如果没有打开,那么就自行搜索去打开。

我模仿写了一个,http://www.biotrainee.com/jmzeng/igv/igv_jmzeng.html

比如这个网页;http://www.biotrainee.com/jmzeng/igv/DynamicLinkExamples.html 就是通过JS在button上面写函数,通过60151端口传输数据即可。
原始代码如下:
[mw_shl_code=xhtml,true]<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="webstart.js"></script>
    <title></title>
</head>
<body>

<br/>
<button type="button"
       >Load</button>
<br/>
<br/>
<button type="button"
       >Load with genome</button>
<br/>
<br/>
<button type="button"
       >Load with genome, merge=true</button>
<br/>
<br/>
<button type="button"
       >Load with genome, merge=true, locus</button>
<br/>
<br/>
<button type="button"
       >Load with genome, merge=false, locus</button>
<br/>
<br/>
<button type="button"
       >Load with genome, merge=true, locus, name</button>
<br/>
<br/>
<button type="button"
       >Load 2 genes, merge=true,</button>
<br/>
<br/>


</body>
</html>[/mw_shl_code]

Links to Load Data

The second type of link will load data into a running IGV.  This makes use of the listener port, which must be enabled.  This option can be controlled on the "Advanced" preferences tab, and is enabled by default listening on port 60151.   Links can be created to load data or jump to a locus as follows.

http://localhost:port/load?file=URL&locus=locus&genome=genome&merge=[true|false]&name=name

http://localhost:port/goto?locus=locus

The file parameter value can be a URL or a comma-delimited list of URLs to most IGV-supported data file types (exceptions listed below), or a session file.   The merge parameter (optional) controls whether or not the loaded data is merged with the existing IGV session, or a loaded into a new session.  If false, any data currently loaded will be unloaded after clicking this link.   The default value is false if file is a session file, true otherwise.  The name parameter (optional) specifies a name or names for the track.  If multiple tracks are loaded as a comma-delimited list, the name parameter value should also be a comma-delimited list of the same size.   The name parameter is ignored if loading a session.

Examples:

http://localhost:60151/load?file=http://www.broadinstitute.org/igvdata/annotations/hg18/conservation/pi.12mer.wig.tdf&locus=egfr&genome=hg18

http://localhost:60151/load?file=http://www.broadinstitute.org/igvdata/exampleFiles/gbm_session.xml&merge=true

http://localhost:60151/goto?locus=egfr



上一篇:NCBI的SRA数据库里面所有样本的描述信息
下一篇:fastSTRUCTURE,简单快速进行群体结构分析
你这个问题很复杂,需要打赏,请点击 http://www.bio-info-trainee.com/donate 进行打赏,谢谢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|生信技能树 ( 粤ICP备15016384号  

GMT+8, 2020-3-31 09:24 , Processed in 0.019412 second(s), 25 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.