For more complex scripts, it may be necessary to create new tables in the Proteome Discoverer results.

In addition to the steps to start the script described in Writing results as new columns to an existing table, do the following:

  • Create a new table and add it to the node_response.json for display in the results and a new tab-separated text file must be created with contents of the new table.
  • If there is a relationship between this new table and one or more existing tables, then a connection table is required to connect the IDs from each table.

Procedure

  1. Create the new table to be imported into Proteome Discoverer.
  2. Designate a unique ID number for each row in the new table.
  3. It is easiest to designate each row as an integer starting with an ID of 1.
  4. The ID for the new table must have the name of the table plus an additional ID term. In the following figure, the ID column is "ProteinStartsWith StartsWithID" for the table called ProteinStartsWidth. If the table name is not in the ID, the import fails.
  5. Write the column headers as the first row in the output .txt file, separated by tabs.
  6. Fill in the rest of the table columns with the results of interest.
  7. The following figure shows the results. The second column, ProteinStartsWith, shows the letters A-Z and numbers 0-9. The third column, StartsWithID, shows the number of times a protein was found with a description that starts with that character.
  8. Write this file out as a .txt file to the same temporary folder where node_args.json and node_response.json are located.

These data were generated using the second familiarization exercise in the Proteome Discoverer Familiarization Guide. The protein counts depend on the input dataset.

The example table produced by the "ProteinStartsWith.R" script
  1. Create the connection tables between the newly generated table and one or more existing tables.
  2. The Scripting Node uses the connection table when importing the data to allow use of the Show Associated Tables function in the application. The file must comply with the following:
  3. A new .txt file needs to contain the ID numbers that are related between the two tables to be connected.v For this example script, the "ProteinStartsWith StartsWithID" must be associated with all of the proteins whose descriptions that start with that character. The example script performs this row-by-row through the "TargetProtein.txt" file exported by the Scripting Node when the Proteins table is exported.
  4. The ID column headers need to have the same name as the ID columns from other text files for the two tables to be connected. In this example, the columns are "ProteinStartsWith StartsWith ID" and "Proteins Unique Sequence ID".
  5. For the .txt file name, use the names of the two tables to be connected, separated with a hyphen (-). For example, in the following figure, ProteinStartsWith-TargetProtein.txt.
  6. Example connection table between the newly created ProteinStartsWith table and the Proteins table
  7. Create a node_response.json file that includes the new table and the connection table. The file must do the following:
  8. The node_response.json file informs the Scripting Node which new data to present in the results. When a new table is to be created, the name of the table, the link to the .txt file that was created by the script that contains the data for the new table, and the description of each column name should be included.
  9. The names in the node_response.json must be exactly the same as those from the column headers in the text file and in quotes. The ID column should be labeled as "ID":"ID".
  10. The information for any connection table also needs to be added as an additional table in the node_response.json file. The data file link should be where the connection table was saved. The data format in this case is a "CSVConnectionTable" and the Options should specify the first table (for example, "ProteinStartsWith") and the second table (for example, "Proteins"). For the specific example, the table is structured as the following figure.
  11. The node_response.json file
    The node_response.json file
  12. Save the node_response.json file to the same temporary folder as the node_args.json file originally written by the Scripting Node.
  13. The scripting node will automatically load the node_response.json file and import the specified results.
  14. For the ProteinStartsWith example, the result in the application looks like the following figure. The connection table allows the application to display only those proteins that start with the letter selected in the ProteinStartsWith table.
  15. Output of ProteinStartsWith script for the data from Familiarization Exercise 2