Skip to contents

UploadSamples() can be used to upload wetlab samples to the sampleDB database.

Usage

UploadSpecimens(
  user_data,
  storage_type_id = NULL,
  database = Sys.getenv("SDB_PATH")
)

Arguments

storage_type_id

A string specifying the type of samples that are being uploaded Options include: micronix, cryovial and dbs

upload_data

A dataframe of SampleDB Upload data.
Required upload_data columns are:
position: the row and column of the sample in the storage housing label: the sample's label or barcode study_subject_id: the StudySubject id of for the subject in the cohort (ie study) study_short_code: the code of the study specimen_type: the sample type collection_date: (optional) the date the sample was first collected from the cohort StudySubject

#' upload data example without collection_date

positionlabelstudy_subject_idspecimen_typestudy_short_code
A0xxx1subject_1PLASMAKAM06
A1xxx2subject_2PLASMAKAM06

upload data example with collection_date

positionlabelstudy_subject_idspecimen_typestudy_short_codecollection_data
A0xxx1subject_1PLASMAKAM062022-04-11
A1xxx2subject_2PLASMAKAM062022-04-11
container_name

A string specifying the name of the container the samples are in. Names must be unique within each sample type.

container_barcode

A string specifying the barcode for the container the samples are in. Container barcodes are optional. Barcodes must be unique within each sample type.

freezer_address

A list specifying the freezer address used to store samples.
Required items in the freezer_address list are name, level_I and level_II. If the freezer_address type is minus eighty then level_I and level_II items specify the rack and position, respecively. If the freezer_address type is minus twenty then level_I and level_II items specify the shelf and basket, respecively.

Examples

if (FALSE) { # \dontrun{
UploadSamples(sample_type = "micronix",
              upload_data = tibble(position = c("A0"),
                                   label = c("XXX 1"),
                                   study_subject_id = c("1"),
                                   specimen_type = c("PLASMA"),
                                   study_short_code = c("KAM06"),
                                   collection_date = c("2021-04-10")),
               container_name = "test_container",
               freezer_address = list(name = "TBD",
                                      level_I = "TBD",
                                      level_II = "seve's working basket"))
} # }