Find or else create a matrix plate with plate_uid.

add_matrix_plate_with_specimens(
  plate_uid,
  location_id,
  specimen_entries,
  create_missing_specimens = FALSE,
  create_missing_subjects = FALSE
)

Arguments

plate_uid

unique identifier for matrix plate

location_id

integer ID for plate location

specimen_entries

list of specimen entries

create_missing_specimens

Logical whether or not to create missing specimens

create_missing_subjects

Logical whether or not to create missing study subjects

Value

returns the matrix plate, its study subjects, specimens, and tubes

Details

Specimen entries are named lists structured as:

specimen_entry -> {
  'uid': Unique study subject ID,
  'short_code': Unique study short code,
  'specimen_type': String descriptor of specimen, must be registered,
  'collection_date': Optional date of collection,
  'barcode': Matrix tube barcode,
  'well_position': Well position in plate,
  'comments': Optional comments about matrix tube
}

specimen entries should be created from a CSV