Version of run_tool exercise for discussion#6
Open
claresloggett wants to merge 1 commit into
Open
Conversation
nsoranzo
reviewed
Jul 17, 2020
Owner
nsoranzo
left a comment
There was a problem hiding this comment.
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'" |
Owner
There was a problem hiding this comment.
Suggested change
| "sort_tool = 'sort1'" | |
| "sort_tool_id = 'sort1'" |
| } | ||
| ], | ||
| "source": [ | ||
| "tool_details = tc.show_tool(sort_tool, io_details=True)\n", |
Owner
There was a problem hiding this comment.
Suggested change
| "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", |
Owner
There was a problem hiding this comment.
Suggested change
| "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." |
Owner
There was a problem hiding this comment.
To make it simpler I tend to use gi.tools instead of creating separate objects.
| } | ||
| ], | ||
| "source": [ | ||
| "pprint(tc.get_tools(name='Sort'))" |
Owner
There was a problem hiding this comment.
Suggested change
| "pprint(tc.get_tools(name='Sort'))" | |
| "pprint(gi.tools.get_tools(name='Sort'))" |
| "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." |
Owner
There was a problem hiding this comment.
Suggested change
| "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", |
Owner
There was a problem hiding this comment.
Suggested change
| "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." |
Owner
There was a problem hiding this comment.
Suggested change
| "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." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?