-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version of run_tool exercise for discussion #6
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @claresloggett ! I was thinking, maybe the tool search/view/run part could be put in a separate exercise?
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"sort_tool = 'sort1'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"sort_tool = 'sort1'" | |
"sort_tool_id = 'sort1'" |
} | ||
], | ||
"source": [ | ||
"tool_details = tc.show_tool(sort_tool, io_details=True)\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"tool_details = tc.show_tool(sort_tool, io_details=True)\n", | |
"tool_details = tc.show_tool(sort_tool_id, io_details=True)\n", |
} | ||
], | ||
"source": [ | ||
"tc.run_tool(new_hist['id'], sort_tool,\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"tc.run_tool(new_hist['id'], sort_tool,\n", | |
"gi.tools.run_tool(new_hist['id'], sort_tool_id,\n", |
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"9) Create a `bioblend.galaxy.tools.ToolClient` object." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make it simpler I tend to use gi.tools
instead of creating separate objects.
} | ||
], | ||
"source": [ | ||
"pprint(tc.get_tools(name='Sort'))" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"pprint(tc.get_tools(name='Sort'))" | |
"pprint(gi.tools.get_tools(name='Sort'))" |
@@ -339,7 +347,522 @@ | |||
"cell_type": "markdown", | |||
"metadata": {}, | |||
"source": [ | |||
"8) View the results on the Galaxy server with your web browser." | |||
"8) Get the id of the output dataset from the workflow. You can get this from the history, or by getting the job id from `gi.workflows.show_invocation()` and then the output dataset id from the job using `gi.jobs.show_job()`. You'll need to wait until the workflow jobs have been scheduled." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"8) Get the id of the output dataset from the workflow. You can get this from the history, or by getting the job id from `gi.workflows.show_invocation()` and then the output dataset id from the job using `gi.jobs.show_job()`. You'll need to wait until the workflow jobs have been scheduled." | |
"8) Get the id of the output dataset from the workflow. You can get this from the history, or by getting first the job id from `gi.invocations.show_invocation()`, and then the output dataset id from the job using `gi.jobs.show_job()`. You will need to wait until the workflow jobs have been scheduled." |
} | ||
], | ||
"source": [ | ||
"invocation = gi.workflows.show_invocation(wf['id'],ret['id'])\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"invocation = gi.workflows.show_invocation(wf['id'],ret['id'])\n", | |
"invocation = gi.invocations.show_invocation(ret['id'])\n", |
It would be probably good to replace ret
with something like invocation
or wf_inv
here and above.
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"11) Check the tool inputs by calling `show_tool()` with `io_details=True`. It might be useful to open Galaxy and compare the inputs you see here to the tool inputs in the Galaxy UI." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"11) Check the tool inputs by calling `show_tool()` with `io_details=True`. It might be useful to open Galaxy and compare the inputs you see here to the tool inputs in the Galaxy UI." | |
"11) Inspect the tool inputs by calling `show_tool()` with `io_details=True`. It might be useful to open Galaxy and compare the inputs you see here to the tool inputs in the Galaxy UI." |
Some exercises added to the bioblend API notebook for discussion. For now just added to the ex1_bioblend_answers notebook; the exercises notebook hasn't been updated.
The basic idea is to get the output dataset from the workflow (i.e. the tabular dataset) and sort it using
run_tool()
.I think this may be too much, particularly for the upcoming conference where teaching might be slow. Some steps, like getting the output dataset, are a bit fiddly. Do we want this stuff in now? Or can it be simplified?