注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

wangyufeng的博客

祝愿BB 健康开心快乐每一天

 
 
 

日志

 
 

Adding a tool in Galaxy: A quick guide with an example  

2012-05-21 09:48:29|  分类: 生物信息分析 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
Adding a new tool in locally-hosted Galaxy environment is very easy though you will not get enough help in internet for it. Here, I am describing the steps and try to keep it as easy as possible.

Lets start:
Suppose, you want to add a tool in your locally-hosted Galaxy by which you can find some basic statistical information of genes saved in a fasta formated file.

At first create a folder (suppose it is Genes_stat) inside tools/ directory of Galaxy root directory.
Write the following python code and save it in Genes_stat/tools/ directory. Suppose its name is GenesStatisticalInfo.py

GeneStatPy.png.

 GenesStatisticalInfo.py<< Python code here.

    • Now, you need to write a tool configuration file. Write the following GeneStatisticalInfo.xml file and save it inside Gene_stat\tools\ directory.

GenesStatConfig.png

 GenesStatisticalInfo.xml<< Config fil?e here.


Find tool_conf.xml file located in Galaxy root directory. Just add a new section inside <toolbox> tag as follows:

tool_conf.png

Now, it's time to run Galaxy (if already it is running, run it again otherwise it will not get the updated information of configuration files). If everything is alright you will see your tool name Genes Stat>Show Genes Statistical Information in Galaxy tools box.

To test your tool, first you need to upload a sample fasta formated file using Get your Data>Upload from your computer.

UploadedFastaFile.png

 SampleInput1.fasta << Get a sample fasta formated file here.


Click Genes Stat>Show Genes Statistical Information of a fasta file. As a Source file select the dataset of uploaded fasta file. Click Execute button and see the output of your program as follows:

GenesStat3.png


Congratulations. You have done it.

Important notes:

a) As the output data format has been kept "tabular" in configuration file, you see the output in tabular form. You can change it if you want.

b) In python code (line number 6) , second command-line argument has been taken as output file name. Though any file will not be written in physical location but this argument show the Save icon in output box. If this output_file_name = sys.argv[2] line will be removed from python file you can't see Save icon there.

c) If File>Work Offline is checked in Firefox, Galaxy might not be updated. So, unchecked File>Work Offline if required.
via:http://bio-bio-1.wikispaces.com/How+to+add+a+tool+in+Galaxy+Environment
  评论这张
 
阅读(692)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017