π€Manage Tool Inputs & Outputs
Specify your tool's output files to ensure the tool runs and results are saved.
Tool Inputs
To learn how to create parameterized inputs, please see Example: Boltz-2 Tool.
You cannot have a Tool input named "File" as this will cause the Tool to crash. "File" is a protected name and your input parameter should be named something different like inputFile or similar.
We strongly recommend keeping all of your user input parameters in one place in your Workspace code when you are developing a Tool. If you are using a Python notebook, we recommend having only one cell marked as parameters when Casting to a Tool.
Tool Workspace Link
When you are creating an Onto Tool, you will be asked to select a Workspace Snapshot to base that Tool on. If you have created a Tool and linked it to a Snapshot, then create a new Snapshot of that Workspace, it will look like the Tool has updated to use the new Snapshot. However this won't actually work unless you manually select the new Snapshot.
Tool Outputs
This is all about to change!!!
Tools on Ontologic's platform have a special outputs/
directory where the results from the tool will be retrieved upon completion of a run. This is treated like a temporary directory, from where your output files will be copied into the Files directory, and will then be available in the Files tab.
Every tool must output at least one file into the outputs/
folder, or it will fail to run.
When you are developing your Tool in a Workspace, we strongly recommend beginning by parameterizing all of your input and output paths. This will make the development process significantly easier, as you may need to test and change these paths between your Workspace and your Tool runs.
How to reference outputs in the Script & Parameters tab
To specify outputs in the Script & Parameters tab, use a relative path, like the example below:
# Place this example in the "Script & Parameters" section to place files in the outputs folder.
echo 'Your text here' > outputs/helloworld.txt

How to reference outputs in the IDE
The special outputs/
directory is created at runtime, so it isn't visible inside the IDE.
If you want to test whether your code will have the correct outputs, you may add /home/ontologic/outputs/
.

Note: including an outputs directory in the IDE is not sufficient to make sure your tool runs! You must put output files you want to save into the outputs folder in the Script & Parameters tab.
Using output subdirectories
To create outputs that are organized in a file tree, make sure to use relative paths in the Script & Parameters tab.

Use relative paths to make nested directories.
Create each directory with mkdir
and make sure that each folder has at least one file inside.
# Place this example in the "Script & Parameters" section to make subdirectories.
mkdir outputs/anotherfolder
echo 'Result' > outputs/result.html
echo 'Another file' > outputs/anotherfolder/another-file.txt
Note: folders without a file inside will not be viewable from the Data page.
View nested directories in the Data page, not the Run Details page.
Run output folders retain subdirectory structure in the Data page of Ontologic. The Output tab of the Run Details view will always show output files in a flat list, but all subdirectory structure is maintained in the Data page.

Last updated