Matching rows by name

Author

Cox Lab

Published

June 27, 2024

1 General

2 Brief description

The base matrix is copied. Rows of the second matrix are associated with rows of the base matrix via matching expressions in a textual column from each matrix. Selected columns of the second matrix are attached to the first matrix. If exactly one row of the second matrix corresponds to a row of the base matrix, values are just copied. If more than one row of the second matrix matches to a row of the first matrix, the corresponding values are averaged (actually the median is taken) for numerical and expression columns and concatenated for textual and categorical columns.

3 Parameters

3.1 Base matrix

Specifies the matrix, whose rows are used as basis for the matching of the entries in a defined column. If no matrix is selected, the default value is empty, otherwise the default is the currently selected matrix. The selection can be changed by first clicking on “Base matrix” line of the pop-up window and then clicking on the matrix of choice in the middle pane (see parameter window A).

3.2 Other matrix

Specifies the matrix, whose rows are matched to the ones of the “Base matrix”. If no matrix is selected, the default value is empty, otherwise the default is the currently selected matrix. The selection can be changed by first clicking on “Other matrix” line of the pop-up window and then clicking on the matrix of choice in the middle pane (see parameter window A).

3.3 Matching column 1

Selected text column of the “Base matrix” that is used for matching (default: first text column in the matrix).

3.4 Matching column 2

Selected text column of the “Other matrix” that is used for matching (default: first text column in the matrix).

3.5 Indicator

If checked, a categorical column called as the “Other matrix” will be added (default: unchecked). A “+” in the column indicates that at least one row of the second matrix matches.

3.6 Expression columns

Selected expression columns of the “Other matrix” that should be added to the “Base matrix” (default: no expression columns are selected).

3.7 Combine expression column values

Defines the combination of multiple expression values, in case multiple rows of the “Other matrix” match to a row of the “Base matrix” (default: Median). The combination can be selected from a predefined list of operations:

  • Median
  • Mean
  • Minimum
  • Maximum
  • Sum

3.8 Categorical columns

Selected categorical columns of the “Other matrix” that should be added to the “Base matrix” (default: no categorical columns are selected).

3.9 Text columns

Selected text columns of the “Other matrix” that should be added to the “Base matrix” (default: no text columns are selected).

3.10 Numerical columns

Selected numerical columns of the “Other matrix” that should be added to the “Base matrix” (default: no numerical columns are selected).

3.11 Combine numerical values

Defines the combination of multiple numerical values, in case multiple rows of the “Other matrix” match to a row of the “Base matrix” (default: Median). The combination can be selected from a predefined list of operations:

  • Median
  • Mean
  • Minimum
  • Maximum
  • Sum
  • Keep separate

4 Parameter window