mk_dist_matrix function

Internal helper function to set up an (n m) x (n m) pairwise distance matrix for a plate with n rows and m columns

Internal helper function to set up an (n m) x (n m) pairwise distance matrix for a plate with n rows and m columns

mk_dist_matrix( plate_x = 12, plate_y = 8, dist = "minkowski", p = 2, penalize_lines = "soft" )

Arguments

  • plate_x: Dimension of plate in x direction (i.e number of columns)
  • plate_y: Dimension of plate in y direction (i.e number of rows)
  • dist: Distance function as understood by stats::dist()
  • p: p parameter, used only if distance metric is 'minkowski'. Special cases: p=1 - Manhattan distance; p=2 - Euclidean distance
  • penalize_lines: How to penalize samples of the same group in one row or column of the plate. Valid options are: 'none' - there is no penalty and the pure distance metric counts, 'soft' - penalty will depend on the well distance within the shared plate row or column, 'hard' - samples in the same row/column will score a zero distance

Returns

The matrix with pairwise distances between any wells on the plate