Skip to content

Instantly share code, notes, and snippets.

@jmchilton
Created May 5, 2015 19:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmchilton/27c5bb05e155a611294d to your computer and use it in GitHub Desktop.
Save jmchilton/27c5bb05e155a611294d to your computer and use it in GitHub Desktop.
Get the history name and encoded id from inside a Galaxy tool.
<tool id="history_context" name="history_context" version="1.0.0">
<command>
#set $history_id=$__app__.security.encode_id($output_dataset.creating_job.history.id)
#set $history_name=$output_dataset.creating_job.history.name
echo $history_id > $output_dataset;
echo $history_name >> $output_dataset;
</command>
<inputs>
<param name="ignored" type="integer" value="0" />
</inputs>
<outputs>
<data format="txt" name="output_dataset" />
</outputs>
</tool>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment