Import Covariance Matrix

For some specialized analyses, for instance quantitative genetics, it is necessary to export data to other programs and then import the resulting covariance matrices back into MorphoJ.

Covariance matrices can be imported from text files using spaces, tab stops or commas as delimiters between values. Covariance matrices can be complete or just the uper or lower triangular parts.

The files with covariance matrices are text files, using either tab stops, commas, semicolons or spaces as delimiters. The rows and columns can have labels (e.g. "x1", "y1" etc.), which will be ignored. Column labels, if present, are expected to be in the first line of the file, which is ignored if the entry in the second column cannot be interpreted as a number. Row labels are expected to be in the first column of each line (either there are row labels in all lines in the file or there are no row labels at all).

To import a covariance matrix, select Import Covariance Matrix in the File menu, and the following dialog box will appear:

The first item in the dialog box is a text field for entering the name of the new covariance matrix.

The next item is a button that can be selected if the covariance matrix is to be attached to a dataset rather than at the root of the project tree. If this button is clicked, the drop-down menu below it will be activated to show all the datasets contained in the project. If the covariance matrix is derived from a set of scores from a multivariate analysis in MorphoJ (e.g. a genetic covariance matrix from principal component scores), the user should normally choose the dataset with those scores to attach the covariance matrix, so that the covariance matrix can be converted back to the coordinate system of the original landmarks.

The following item is a drop-down menu where the type of matrix can be chosen: whether the file contains the complete matrix, just the upper triangular or just the lower triangular part.

The remaining items are the interface for selecting the file as well as the Open and Cancel buttons. Clicking the Open button will start the import process for the chosen file, whereas clicking Cancel will stop the process and return the program to its previous state.