Skip to contents

process_sherlock() extracts and transforms result data from the Synergy H1 reader

Usage

process_sherlock(
  filepath,
  sample_type = c("mucus", "fin clip"),
  layout_type = c("split_plate_early_late", "split_plate_late_early",
    "split_plate_spring_winter", "split_plate_winter_spring", "triplicate",
    "single_assay_ots28_early", "single_assay_ots28_late", "single_assay_ots16_spring",
    "single_assay_ots16_winter", "custom"),
  plate_run_id = NULL,
  plate_size = c(96, 384),
  custom_layout_filepath = NULL
)

Arguments

filepath

Synergy H1 reader output excel file with corresponding plate run layout in a sheet titled "plate_map"

sample_type

either mucus or fin_clip

layout_type

either split_plate_early_late, split_plate_late_early, split_plate_spring_winter, split_plate_winter_spring, triplicate, single_assay_ots28_early, single_assay_ots28_late, single_assay_ots16_spring, or single_assay_ots16_winter

plate_run_id

plate run identifier generated by running add_plate_run().

plate_size

either 96 or 384

Value

A table to be passed to add_raw_assay_results():

1) raw_assay_results

  • sample_id

  • raw_fluorescence

  • background_value

  • time

  • plate_run_id

  • well_location

Sample Details

The Synergy H1 result output from plate runs is organized using generic identifiers that need to be mapped to the real sample identifiers in order to properly associate the results with the correct sample id in the database.The output file’s “Layout” section contains the well locations for samples encoded as non-unique generic sample ids (e.g., SPL1, BLK). The number of rows and columns in the Layout vary based on the plate size. A plate size 96 has rows A:H and columns 1:12 and a plate size 384 has rows A:P and columns 1:24. The results for each sample are found within columns that are the letter-number combination of the well location captured in the Layout section (e.g., if SPL1 is in row A and column 3, then the measurements at each time step are recorded in a column labeled A3). To map the sample ids to the generic identifiers produced by the Synergy H1 software (e.g., SPL1 and A3), the user must provide the true sample ids and other metadata at each well location in the as a dataframe containing these columns:

  • location: (character) letter-number combination based on Synergy H1 Layout grid (e.g., A3)

  • sample_id: (character) unique ID of mucus swab or fin clip made up of site code, year, sample event, sampling bin, and count within sampling bin (e.g., BTC22_3_A_1)

  • sample_type: (numeric) provide 1 for mucus and 2 for fin clip

  • assay_id: (numeric) the ID for assay types (e.g., 1 = OTS28 Early 1), use get_assay() to view all available options.

  • plate_run_id: (numeric) the ID returned from running add_plate_run(), the function that creates a new plate run record in the database to associate important metadata with the assay results

Examples

sample_details = readr::read_csv("data-raw/sample_layout_template_384.csv")
#> Error: 'data-raw/sample_layout_template_384.csv' does not exist in current working directory ('C:/Users/emanuel/projects/jpe/grunID/docs/reference').
process_sherlock(filepath = "data-raw/081022_Chnk_JPE_Early_Plates7-10_results.xlsx",
                 sample_details = sample_details,
                 plate_size = 384)
#> Error in process_sherlock(filepath = "data-raw/081022_Chnk_JPE_Early_Plates7-10_results.xlsx",     sample_details = sample_details, plate_size = 384): unused argument (sample_details = sample_details)