The program BlocDiag was developed in the programming language C by Ferdinand Moldenhauer and Stefan Schuster in 1999/2000 based on a Pascal source code (Schuster, S. and Schuster R., 1991). It runs on UNIX systems and with slight changes on MS-DOS platforms. Parts of the input functions were programmed object oriented. That requires a g++ compiler for UNIX. To compile the source code use:

`g++ BlocDiag.cpp -o BlocDiag.e`

Please have a look at the Delphi program as well. This program was developed by Holger Nathansen. The package contains source code, executable and documentation. If you do not need the sources, consider downloading this package.

The program BlocDiag.exe runs on Win32 platforms and expects a stoichiometric matrix in an ASCII file, such as the matrix given in Table 1 but without R: 1, R: 2, etc. in the first row and without S1 and S2 in the first column. To get a larger input matrix example please click here.

R: 1 R: 2 R: 3 R: 4 S1 1 -1 1 -1 S2 0 0 -1 1

Table 1: Stoichiometric input matrix

S1, S2: internal metabolites (cf. Fig. 1); R: 1 - R: 4: reactions 1 to 4. These symbols are here given for clarity,
they must not be involved in the input file.

The columns and rows correspond to the enumerated reactions and enumerated metabolites, respectively in a rectangular matrix. From the first row the program automatically reads the number of reactions. The stoichiometric matrix, N, contains the stoichiometric coefficients as integers or zeros, all of them separated with white spaces (blanks or tabulators). Internal metabolites are separated in the stoichiometric matrix with a line feed (new line character). There are no limits for the numbers of reactions or internal metabolites.

Start the program BlocDiag from a command line as follows:

`BlocDiag`

or

`BlocDiag [path]input.file`

If the first option is used, the user is asked for the input file name. The file name extension which follows the dot of the input file name is automatically changed to "blc" to indicate the output file. The output file is written in the same directory as the input file. If the input file has no extension the program asks for the complete output file name. The output file name is displayed for your control in any case. It is not, however, checked whether there already exists a file with this name. In the next step the input matrix is displayed.

After reading the input file the stoichiometric matrix is transformed to a row echelon form with the help of the Gauss algorithm, and the rank of the stoichiometric matrix is calculated. Afterwards the null-space matrix lambda is calculated, which fulfils the equation

N lambda = 0 .

This matrix is calculated in such a way that it contains the lowest possible integer values. The null-space matrix lambda is then block-diagonalised by rearrangement of rows and columns. This representation is of interest in order to detect subsystems that are independent of each other with respect to flux. If in such a subsystem, a generalized Wegscheider condition is fulfilled, it is a strictly detailed balanced subnetwork (Schuster, S. and Schuster, R., 1991, Heinrich, R. and Schuster, S., 1996).

The output matrix is written on screen and to an ASCII file. Zeroes are not written. Each block of the output matrix is separated by horizontal and vertical lines. The rows correspond to the reactions, i.e. to the columns in the stoichiometric matrix. The output rows contain the number of the reaction corresponding to the number of the column of the stoichiometric matrix. This is important because the rows are rearranged in the course of the block-diagonalization. Numbers and vertical lines are separated by tabulators for using the output file in other software, such as Microsoft EXCEL.

1 | | R: 1 1 | | R: 2 ------------------------ | 1 | R: 3 | 1 | R: 4 ------------------------

Table 1: Block-diagonalised output matrix

The block-diagonalised output matrix can be processed and sorted with a spreadsheet program (e.g. Microsoft Excel).

R1 R2 P1 -> S1 -> P2 R4 ( ) R3 S2

Figure 1: Reaction scheme, an example, where 2 blocks arise.

S1, S2 internal metabolites

P1, P2 external metabolites

R1 - R4 reactions R: 1 to R: 4

**Reference**

Schuster, S. and Schuster, R.: Detecting Strictly Detailed Balanced Subnetworks in Open Chemical Reaction Networks. J. Math. Chem. 6 (1991) 17-40.

Heinrich, R. and Schuster, S.: The Regulation of Cellular Systems, Chapman and Hall, New York (1996).

If there are questions please send an e-mail to

Dr. Ferdinand Moldenhauer fmolden@mdc-berlin.de or

PD Dr. Stefan Schuster schuster@hpbio1.Biologie.HU-Berlin.de