Download presentation
Presentation is loading. Please wait.
1
Creating dynamic tools with Galaxy ProTo
Morten Johansen, Sveinung Gundersen, Abdulrahman Azab, Eivind Hovig, Geir Kjetil Sandve GCC 2016
2
How to develop Galaxy tools
3
Write a script and create a XML wrapper for it
Galaxy Tool XML Planemo
4
ProTo: All in Python
5
ProTo ==Python from proto.tools.GeneralGuiTool import GeneralGuiTool class def getToolName(cls): "”” Specifies a header of the tool, which is displayed at the top of the page. """ return "Test Tool"
6
@classmethod def getInputBoxNames(cls): return [('First number’,'firstNum’), ('Second Number', 'secondNum’)] def getOptionsBoxFirstNum(cls): return '' def getOptionsBoxSecondNum(cls, prevChoices): return ''
7
@classmethod def execute(cls, choices, galaxyFn=None, username=''): """ Is called when execute-button is pushed by web- user. Should print output as HTML to standard out, which will be directed to a results page in Galaxy history. """ print int(choices.firstNum) + int(choices.secondNum)
8
Other input boxes: Dropdown List
@classmethod def getInputBoxNames(cls): return [(’Dropdown List’,’list’)] def getOptionsBoxList(cls): return ['item'+str(i) for i in range(5)]
9
Other input boxes: Option List
@classmethod def getInputBoxNames(cls): return [(’Option List’,’optionList’)] def getOptionsBoxOptionList(cls): return OrderedDict([('item'+str(i),False) for i in range(5)])
10
Other input boxes: Table (static)
@classmethod def getInputBoxNames(cls): return [(’Static table’,’table’)] def getOptionsBoxTable(cls): return [['header1','header2'], ['cell1_1','cell1_2'],['cell2_1','cell2_2']]
11
Now, let’s try it
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.