If you want to write results back for display in the application, you must perform the tasks described in this section.
The main tasks are:
Procedure
- Create a node_response.json file that tells the application which new columns or tables to be created.
- Create a new text file for each table in Proteome Discoverer to be modified or created.
- If multiple tables have associations, create the connection table for those associations.
- Write the node_response.json file to the same temporary folder as the node_args.json and exported text files for the Scripting Node to use.
- The structure of the response file is the same as the node_args.json file, but the fields CurrentWorkflowID and ExpectedResponseDescription are ignored.
- The script calculates the results of the new columns, exports these new columns as a tab-separated text file, and annotates the node_response.json file to tell the application to expect the new columns. Then the Scripting Node imports the columns back into the application result file for presentation.
The following example node_response.json file produces two new columns in the Pathway Protein Groups table.
Two new columns named “-10LogPValue Insulin Control” and "-10LogPValue IGF-1 Control" are created in the Pathway Protein Groups table. The ID columns were kept from the original exported .txt file for the PathwayProteinGroup.txt file.
The corresponding data file PathwayProteinGroup.out.txt includes the new columns with the values calculated by the script. This example output file from the script has the two additional columns to import back into the application through the Scripting Node. The empty columns in the application result have NA
as the entry.
The scripting node reads the output text files specified by the node_response.json file and displays the new columns in the tables in the application. The following figure shows the two new columns added to the Pathway Protein Groups table as specified in the node_response.json example file shown.