Use the following approach when integrating a new script into the Scripting Node:
Procedure
- Create a new empty script.
- The script contents depend on what you want it to do. For practice, the media’s Scripting Node folder contains scripts that you can use as templates.
- Use an example dataset with the type of result for which the script will be used.
- Add the Scripting Node to the workflow, and make sure that the Archive Datafiles parameter is True.
- This setting will export all of the files required by the script.
- Modify the custom script to accept the node_args.json file.
- This information is detailed in Reading the node_args.json file into the script.
- Load the text files containing the Proteome Discoverer result information into the script.
- If you are writing data back into the Proteome Discoverer application, do the following:
- Create the output text files.
- Create the connection tables (if necessary).
- Create the node_response.json file.
- This information is detailed in Writing results as new columns to an existing table.
- Test the script within the application.
- Testing is an iterative process. The primary challenge is to correctly format the output text files and the node_response.json files so that the Scripting Node can recognize the results.
- If the node_response.json file is not recognized (and results are not presented in the application), compare it to the node_args.json file to make sure the structure is the same.