Data spread sheet (TABLES)

Introduction.

At many places throughout the program, WHAT IF generates numbers that belong with a residue. Examples are surface accessibility, energy, hydrophobic moment, quality value, etc. The tables menu provides a tool to combine this information. This menu is a very primitive spread sheet. However, it is meant to get more spread sheet like options in the (not to near) future. At present, you can put values into so-called tables, and then use the table menu to organize the output of these tables.

In several menu's you will find a command TAB*** or ***TAB. These commands store the numerical results obtained by an option from that menu in a table. In other cases an individual option will ask if the results should be stored in a table or not. These commands can all also be executed from the TABLES menu.

In this case sometimes the option in the TABLES menu will simply execute an option from another menu, and half way prompt you if you want to store the results in a table, you then better say YES, or otherwise WHAT IF can get confused. Sorry for this, but I cannot do everything the way I would really want, sometimes it has to be enough to stop when it works.... There are only 4000 working hours in a year!

WARNING. Tables are dumb. If you change the contents of your soup, the tables are no longer valid. See the next paragraph.

Table format

Tables are rather elementary data structures. A table consists of a name, a type indicator (types can be real, integer, or character*4 (is word of four characters)), and a set of numbers or character*4's. There is no intelligent correlation between the location of a number in a table, and a residue number in the soup. Tables simply always assume that the first number in the table belongs with the first number in the soup, etc.

Table administration

Initialize tables (TABINI)

The command TABINI will cause WHAT IF to (re-)initialize all parameters and variables that are related to TABLES. This is an irreversible process. See also TABSAV.

Saving tables (TABSAV)

The command TABSAV will cause WHAT IF to prompt you for a file name. It will then write all parameters and variables that are relevant to the tables menu into this file. See TABRES about restoring later.

Restoring tables (TABRES)

The command TABRES will cause WHAT IF to prompt you for a file name. It will then restore all parameters and variables that are relevant to the tables menu into this file. See TABSAV about saving information first.

List of available tables (TABDIR)

The command TABDIR will cause WHAT IF to show you the list of all presently active tables. For every table the name, the type (REAL, INT, or CHAR), and the number of values in this table will be shown.

Deleting tables (TABDEL)

The command TABDEL will cause WHAT IF to prompt you for the number of a table. The indicated table will be deleted entirely from WHAT IF's memory.

Tables parameters (PARAMS)

The command PARAMS will bring you to the menu from which you can change the parameters used by the tables options. This menu has help in it.

At present there are no TABLES related parameters (yet).

Tables, input and output

Reading a table from a file (TABGET)

The command TABGET will cause WHAT IF to prompt you for a file name and a table number. The table will be filed with the table values read from the table file. The table file may hold reals or integers, but the table in WHAT IF will be of type real.

A table file is a formatted file. The first two lines are skipped by WHAT IF, and can be used to document the file. They can also be left empty. After that maximally 4000 free format numbers, one number per line, should follow. In case of multiple numbers per line, only the first number will be read.

Make a formatted table file (TABOUT)

The command TABOUT will cause WHAT IF to prompt you for a table number and for an output file. It will then create that file with the name and the contents of the given table in it. This will be a formatted (human readable) file. In this file every value will be on a new line.

Listing tables (TABSHO)

The command TABSHO will cause WHAT IF to prompt you for a list of table numbers. It will then list the header information for these tables (in the order you gave). Thereafter it will list the values found in these tables in columns at the screen. Be aware that only twelve columns fit at the screen.

Writing a table to a file (TABLST)

The command TABLST will cause WHAT IF to prompt you for the number of a table. Thereafter you will be prompted for a file name, a default will be suggested. You can change this file name, but are suggested not to do so. The table type, table name and length will be written as header in the indicated file, followed by the table values, one value per line.

Display a table at the screen (TABGRA)

The command TABGRA allows you to display a table at the graphics screen. This can only be a numerical table. Lines at the screen get the color of the alpha carbon of the residue they belong to. You will be prompted for the table number.

Plot a table (TABPST)

The command TABPST allows you to plot a table at a postscript laser writer. You will be prompted for the table number.

Creating tables.

There are many ways to create a table. Throughout WHAT IF there are places where you find a command with TAB as part of its name. These commands create tables. Other commands ask you if the results should be stored in a table too. Some commands are not yet ready for usage with tables, simply because of a lack of time (I only thought of this data structure one and a half years after starting to write the program...), but these will be TABLE-ized in the future.

Most of the table creation commands found elsewhere in the program are also found in the TABLES menu.

Making residue type tables (TABAA)

The command TABAA will cause WHAT IF to prompt you for a range, a table number and a table name. It will then fill the given table with the residue types from the given range. Only amino acids and nucleic acids should be used here, but only a warning is issued if you use something else.

Database averaged accessibility table (TABAAC)

The command TABAAC will cause WHAT IF to prompt you for a range, a table number, and a table name. It will then store for these residues the database average accessibility in the requested table. The avaerage is taken over all residues of the same type. So, the tabel value for every alanine in the soup will be the same, namely the avaerage accessibility of all alanines in the databases. See also EVAACC in the accessibility chapter.

Making accessibility tables (TABACC)

The command TABACC will cause WHAT IF to prompt you for a range, a table number, and a table name. It will then store the residue accessibilities for these residues in the requested table. If for one or more requested residues the surface accessibility is not yet known, WHAT IF will execute the SETACC command from the ACCESS menu first. See the accessibility chapter.

Making B-factor tables (TABABF)

The command TABABF will cause WHAT IF to prompt you for a range, a table number, and a table name. It will then store the average atomic B-factor for these residues in the requested table.

Making B-factor tables (TABBFT)

The command TABBFT will cause WHAT IF to prompt you for a range, a table number, and a table name. It will then store the B-factors of the alpha carbons for these residues in the requested table.

Tabulating bumps (TABBMP)

The command TABBMP can be used to make an integrated bump table as described in the ANACON chapter.

Making residue type tables (TABCHI)

The command TABCHI will cause WHAT IF to prompt you for a range, a table number and a table name. Thereafter you will be prompted for the torsion angle you want to tabulate. It will then fill the given table with the requested torsion angle from the given range. Only amino acids should be used here. Torsion angles that do not exist (like eg chi-2 in valine) will be set to 0.0. The phi-angle from an N-terminal residue, and psi and omega from C-terminal residues are set to 999.9.

Making energy term tables (TABETM)

The command TABETM will cause WHAT IF to prompt you for a range, a table number and a table name. You will then be prompted for the energy term. These are numbered from 1 till 10 (10 being the sum of 1 till 9), see the chapter on using GROMOS for a description of these energy terms. This option assumes that you have executed the GETETM option before you executed the TABETM option. See GETETM in the GROMOS menu. The table will be filled with the value of the requested energy term, integrated over the atoms in the residue.

Electron density table (TABEVD)

The command TABEVD will cause WHAT IF to execute the EVADEN option in the XRAY menu. This option will prompt you for a range, a table number and a table name. The convolution between the electron density and the bell shaped atoms will be integrated over the atoms per residue, and stored in the table. This option assumes that there is an electron density map available. See the chapter on X-ray options.

Making hydrogen bond tables (TABHBO)

The command TABHBO will cause WHAT IF to prompt you for a range, a table number and a table name. It will then show you a mini menu. The table will be filled with hydrogen bond counting statistics according to your choice from this menu. At present you can choose from:

1) Count hydrogen bonded atoms per residue. The number of atoms involved in a hydrogen bond is counted, and stored in the table. NOT the number of hydrogen bonds formed.

2) Number of unsatisfied hydrogen bond donors and/or acceptors per residue.

3) Number of buried unsatisfied hydrogen bond donors and/or acceptors per residue. Buried is defined by the LIMBUR parameter in the parameter sub-menu of the ACCESS menu. The default is 2 squared Angstrom per atom.

You have to go to the HBONDS menu and execute the PARAMS command in that menu before executing the TABHBO command if you do not want to use the default hydrogen bond determination parameters.

Making secondary structure tables (TABHST)

The command TABHST will cause WHAT IF to prompt you for a range, a table number and a table name. It will then fill the table with the secondary structure of that range as determined by DSSP.

Make a table with numbers (TABNUM)

The command TABNUM will cause WHAT IF to prompt you for a range, a table number, and a table name. It will then prompt you for a starting value. It will fill the table with simple numbers, starting with your starting value, every next number increased by one.

Making residue tables (TABPNM)

The command TABPNM will cause WHAT IF to prompt you for a range, a table number and a table name. It will then fill the given table with the PDB residue identifiers (those are the numbers that WHAT IF always puts out in brackets) from the given range.

Making property tables (TABPRP)

Several options in WHAT IF produce one number per residue. Often these values need to be used later, and in those cases WHAT IF stores them in a location called property. The commands that deal with these values all have the three letter code PRP in them. If you have property values stored, the command TABPRP can be used to make a property value table. TABPRP will cause WHAT IF to prompt you for a range, a table number and a table name. It will then fill the given table with the property values.

Making tables from sequence files (TABPIR)

The command TABPIR will cause WHAT IF to prompt you for the number of a PIR file, the residue range, the table number and a table name. It will then fill the given table with the residue types from the given range. The first residue from the given range will be the first entry in the table.

Making residue quality tables (TABQUA)

The command TABQUA will cause WHAT IF to prompt you for a range, a table number and a table name. It will then fill the given table with the packing quality for the residues in the given range. Only amino acids should be used here. This option is equivalent to the QUARNG option in the QUALITY menu. See the chapter on quality control in the writeup.

Making symmetry contact tables (TABSMC)

The command TABSMC will cause WHAT IF to prompt you for a range, a table number and a table name. It will then fill the given table with the number symmetry related residues contacted by each residue in the given range. Only amino acids should be used here. This option can only work properly if all required symmetry information is available. See the chapter on symmetry in the writeup.

Manipulating single table

Shifting tables (TABDWN)

The command TABDWN will cause WHAT IF to prompt you for a table number. Thereafter you will be prompted for a starting position, and for a shift value. All table values that are in the table at or after the position of the starting value will be shifted towards lower table index numbers by an amount as indicated by the shift parameter. In the following example, the middle table is the initial situation, the right table is the situation after TABDWN with starting value 5, and shift parameter 2. The left table gives the table index values.
   1      17         17
   2     -21        -21
   3     -56    /-> -18
   4     -33   /     12
   5     -18 -/       1
   6      12    /->  92
   7       1   /      0
   8      92 -/       0
   9       0          0
  10       0          0
  11    ....       ....
In case of a shift larger than the starting value, those table values that would end up at position zero, or with negative table index. The following example is the same as the previous, but now for starting point 3, and shift value 5.
   1      17 -//////-> 12
   2     -21 -/////     1
   3     -56 -////     92
   4     -33 -///       0
   5     -18 -//  /->   0
   6      12 -/  /      0
   7       1    /       0
   8      92   /        0
   9       0  /         0
  10       0-/          0
  11    ....         ....

Shifting tables (TABUP)

The command TABUP will cause WHAT IF to prompt you for a table number. Thereafter you will be prompted for a starting position, and for a shift value. All table values that are in the table at or after the position of the starting value will be shifted towards higher table index numbers by an amount as indicated by the shift parameter. The gap that is created this way is filled with zeros in numerical tables, and with blanks in character tables. In the following example, the middle table is the initial situation, the right table is the situation after TABUP with starting value 3, and shift parameter 2. The left table gives the table index values.
   1   -3       -3
   2  106      106
   3   18-\      0
   4   -7  \     0
   5    0   \-> 18
   6   12       -7
   7   -1        0
   8    0       12
   9    0       -1
  10    0        0
  11 ....

Manipulating pairs of tables

Introduction

There are several operations available to combine pairs of tables. This section describes those. The following holds for all table combining options:

Both tables should be numerical, but may be of different types.

If at least one of the input rows is of type real, the created output row will be of type real. If both input rows are of type integer, the created output row will be of type integer.

The output row will have the same length as the longest of the two input rows.

Uninitialized table values are taken as zero.

Adding tables (TABADD)

The command TABADD will cause WHAT IF to prompt you for two input tables and for the name and number of an output table. The output table will be filled with the sum of the two values of the input tables.

Both input tables should be numerical. If both input tables are integer (only holding whole numbers), the resultant table will be integer, otherwise real.

Angular difference between tables (TABADF)

If two tables represent angles in degrees, and you want to see the differences, you can not use a normal subtraction because 359 and 1 degree are very close, but would give a very large difference. The TABADF option can help, because it will do a subtraction like TABSUB, but on a 360 degree circle. TABADF always returns values between 0 and 179 degrees.

Taking the average of two tables (TABAVE)

The command TABAVE will cause WHAT IF to prompt you for two input tables and for the name and number of an output table. The output table will be filled with the average of the two values of the input tables.

Both input tables should be numerical. If both input tables are integer (only holding whole numbers), the resultant table will be integer, otherwise real.

Average difference between two tables (TABCOR)

The command TABCOR will cause WHAT IF to prompt you for two tables and for a residue range. The average difference (and standard deviation) of the table values in these two tables for the given range will be calculated. Also these differences are calculated after the second table got shifted one position down or up respectively. this allows to get an impression about the smoothness of the differences as function of the sequence number.

Both tables are allowed to be of type real or integer or mixed. You are allowed to give twice the same table (in that case the first part of the output will be meaningless, but the shifted correlations are auto-correlations).

Marking the difference between two tables (TABDIF)

The command TABDIF will cause WHAT IF to prompt you for two input tables and for the name and number of an output table. The output table will hold the word DIFF if the difference between the two values of the input tables is larger than a cutoff that you are prompted for.

Both input tables should be numerical.

Marking the difference between two tables (TABDF2)

The command TABDF2 will cause WHAT IF to prompt you for two input tables and for the name and number of an output table.

If the input tables are numerical you will be prompted for a cutoff. The output table will hold the value 1.0 where-ever the input tables differ more than the cutoff; otherwise 0.0

If the input tables are logical or character tables the output table will hold 0.0 or 1.0 when the input tables are identical or different respectively

Both input tables should be of the same type (real, integer, text or logical).

Taking the maximum of two tables (TABMAX)

The command TABMAX will cause WHAT IF to prompt you for two input tables and for the name and number of an output table. The output table will be filled with the largest of the two values of the input tables.

Both input tables should be numerical. If both input tables are integer (only holding whole numbers), the resultant table will be integer, otherwise real.

Taking the minimum of two tables (TABMIN)

The command TABMIN will cause WHAT IF to prompt you for two input tables and for the name and number of an output table. The output table will be filled with the smallest of the two values of the input tables.

Both input tables should be numerical. If both input tables are integer (only holding whole numbers), the resultant table will be integer, otherwise real.

Multiplying tables (TABMUL)

The command TABMUL will cause WHAT IF to prompt you for two input tables and for the name and number of an output table. The output table will be filled with the product of the two values of the input tables.

Both input tables should be numerical. If both input tables are integer (only holding whole numbers), the resultant table will be integer, otherwise real.

Subtracting tables (TABSUB)

The command TABSUB will cause WHAT IF to prompt you for two input tables and for the name and number of an output table. The output table will be filled with the value of the first table minus the value of the second input table.

Both input tables should be numerical. If both input tables are integer (only holding whole numbers), the resultant table will be integer, otherwise real.

Logical tables

Several options exist to generate or manipulate logical tables. Logical tables can only hold the values TRUE or FALSE.

Create a logical table from a numerical table (TBLVGT)

The command TBLVGT will cause WHAT IF to prompt you for an input table, an output table, and a cutoff value. The input table should hold numbers. The output table will be a logical table. The output table will be set to TRUE where-ever the input table is greater than the cutoff; FALSE otherwise.

Create a logical table from a numerical table (TBLVEQ)

The command TBLVEQ will cause WHAT IF to prompt you for an input table, an output table, and a value. The input table should hold numbers. The output table will be a logical table. The output table will be set to TRUE where-ever the input table is equal to the cutoff; FALSE otherwise. Real numbers will be rounded to the nearest integer before the comparison is made (the rounding is only for the comparison, the table value will not be changed).

Create a logical table from two character tables (TBLDFC)

The command TBLDFC will cause WHAT IF to prompt you for two character tables and a new table. The output table will be a logical table. The output table will be set to TRUE where-ever the input tables are equal; FALSE otherwise.

Invert a logical table (TBLINV)

The command TBLINV causes WHAT IF to prompt you for a table. You should give the number of a logical table. This table will be inverted, i.e. every TRUE value will be made FALSE and vice versa.

Logical AND on two tables (TBLAND)

With the command TBLAND you can cause WHAT IF to prompt you for two logical tables. It will create a new table that hold the pairwise logical ANDs of the two input tables. You will be prompted for the output table name and table number.

Logical OR on two tables (TBLOR)

With the command TBLOR you can cause WHAT IF to prompt you for two logical tables. It will create a new table that hold the pairwise logical ORs of the two input tables. You will be prompted for the output table name and table number.

Logical statistics per residue type (TBLSTS)

The command TBLSTS will cause WHAT IF to prompt you for the number of a logical table. It will count how often each of the 20 residue types is TRUE or FALSE in this table.

Other table related options

Correlate table with residue types (TABCAA)

The command TABCAA will cause WHAT IF to prompt you for a range and a table number. It will then calculate for each of the 20 residue types the average value (with standard deviation etc) in this table.

Display table values in graphics window (TABCUP)

The command TABCUP toggles the so-called Continuous UPdate mode on and off. Upon switching this mode on, you will be prompted for the table number(s). If program control is passed to the graphics screen by typing GO, the table values for all requested tables will be shown for the ten residues around the last picked residue. These values are written with 'transparent' characters, and are automatically updated if you look at the next residue by picking it.

Make a two table scatter plot (TABSCT)

The command TABSCT will prompt you for two tables. It will than produce a scatter plot for the values in these two tables. This plot will be stored in a MOL-item, and will be pickable.

Put a table in the property values (SETPRP)

Several options in WHAT IF produce one number per residue. Often these values need to be used later, and in those cases WHAT IF stores them in a location called property. The commands that deal with these values all have the three letter code PRP in them. If you have property values stored, the command TABPRP can be used to make a property value table. The command SETPRP can be used to transfer information the other way around. SETPRP copies a table into the property values. Be aware that the first table element will be copied into the property value that belongs with the first residue in the soup. If your table and the soup are no (no longer) running parallel, use firts TABUP or TABDWN to make them run parallel again.