Created
July 24, 2014 15:59
-
-
Save jmchilton/38c33d365e116c750c21 to your computer and use it in GitHub Desktop.
Example script that runs Galaxy's random lines tool using bioblend.
This file contains 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
# Setup Galaxy instance and dataset for testing... | |
from bioblend import galaxy | |
gi = galaxy.GalaxyInstance("localhost:8080", "1957431058be3aa3c57ca312f4a05521") | |
history = gi.histories.create_history(name="TestRandomLines") | |
dataset_id = gi.tools.paste_content("1\n2\n3", history["id"])['outputs'][0]["id"] | |
# Prepare tool inputs. | |
from bioblend.galaxy.tools.inputs import inputs, dataset | |
random_lines_inputs = inputs().set("num_lines", 1).set("input", dataset(dataset_id)) | |
# Run tool. | |
tool_outputs = gi.tools.run_tool(history_id=history["id"], tool_id="random_lines1", tool_inputs=random_lines_inputs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment