Repository navigation
Distance Matrices
A distance matrix is a table that gives the distance between every pair of nodes. Use it when distances have already been computed, for example by another program, so MicrobeTrace does not need the sequences. Choose Matrix as the file's kind in the Files view.
A matrix can be a CSV file, or the first sheet of an Excel file. It has one of the layouts below.
The first row holds the IDs across the top. The first cell is empty. Each later row starts with its ID, followed by the distances to every other node:
,A,B,C
A,,0.01,0.2
B,0.01,,0.05
C,0.2,0.05,
Every ID must appear once in the top row, and each must have one row of its own. If a row is missing, MicrobeTrace refuses the file and names the ID, since the file may have been cut off.
Either the upper or the lower triangle may be filled, and the rest left blank. This is the same file with only the upper triangle:
,A,B,C
A,,0.01,0.2
B,,,0.05
C,,,
Blank cells are not distances, so they are skipped. A cell that is not a number is also skipped, and the log gives an example of it.
If the first cell is not empty, the first column holds the IDs and each row is one node. This works with either triangle filled. MicrobeTrace may not guess this layout from the contents, so choose Matrix on the file's row if it shows a different kind.
- Each cell becomes a link with that distance. Decimal commas are read as decimal points.
- A matrix has no columns to choose. To add attributes, load a node list with it.