list_plate_well: List plates and wells

list_platesR Documentation

List plates and wells

Description

Plates and wells are special cases of Sample objects and play an important organizational role when openBIS is used in HTS experiments. All InfectX screens were arrayed onto 384-well plates, arranged into 16 rows (A through P) and 24 columns (1 through 24). Plate and PlateIdentifier objects are used to identify plates while for wells only WellIdentifier objects exists for representing individual wells. Additional objects relevant in this context are PlateMetadata, which for all associated wells contain respective WellMetadata objects and PlateWellReferenceWithDatasets objects, each holding a Plate object and a WellPosition object, thereby in a sense also identifying individual wells.

Usage

list_plates(token, x = NULL, ...)

## S3 method for class 'NULL'
list_plates(token, x, ...)

## S3 method for class 'ExperimentIdentifier'
list_plates(token, x, ...)

## S3 method for class 'Experiment'
list_plates(token, x, ...)

list_plate_metadata(token, x, ...)

## S3 method for class 'PlateIdentifier'
list_plate_metadata(token, x, ...)

## S3 method for class 'Plate'
list_plate_metadata(token, x, ...)

## S3 method for class 'Sample'
list_plate_metadata(token, x, ...)

plate_id(code, space)

as_plate_id(x, ...)

## S3 method for class 'Plate'
as_plate_id(x, ...)

## S3 method for class 'Sample'
as_plate_id(x, ...)

## S3 method for class 'PlateMetadata'
as_plate_id(x, ...)

## S3 method for class 'PlateIdentifier'
as_plate_id(x, ...)

list_wells(token, x, ...)

## S3 method for class 'PlateIdentifier'
list_wells(token, x, ...)

## S3 method for class 'Plate'
list_wells(token, x, ...)

## S3 method for class 'Sample'
list_wells(token, x, ...)

## S3 method for class 'MaterialScreening'
list_wells(token, x, experiment = NULL,
  include_datasets = FALSE, ...)

## S3 method for class 'MaterialIdentifierScreening'
list_wells(token, x,
  experiment = NULL, include_datasets = FALSE, ...)

## S3 method for class 'MaterialGeneric'
list_wells(token, x, experiment = NULL,
  include_datasets = FALSE, ...)

## S3 method for class 'MaterialIdentifierGeneric'
list_wells(token, x,
  experiment = NULL, include_datasets = FALSE, ...)

well_id(perm_id, plate, well_pos = NULL, well_code = NULL, ...)

as_well_id(x, ...)

## S3 method for class 'WellMetadata'
as_well_id(x, ...)

## S3 method for class 'WellIdentifier'
as_well_id(x, ...)

well_pos(row = NULL, col = NULL, name = NULL)

Arguments

token

Login token as created by login_openbis().

x

Object to limit the number of returned wells or plates.

...

Generic compatibility. Extra arguments will be passed to make_requests().

code, space

Character vectors that together can be used to create PlateIdentifier objects.

experiment

Additionally, the search can be limited to a single experiment, specified either as Experiment or ExperimentIdentifier.

include_datasets

Logical switch indicating whether to also return the connected image and image analysis data sets.

perm_id, plate, well_pos

Character vector, set of plate objects and set of well position objects, all of the same length or length 1, that together can be used to create WellIdentifier objects.

well_code

Character vector where each entry is of the form barcode:well_name, e.g. FOO-BAR-1:A1, FOO-BAR-1:A2, etc.

row, col

Character vector of plate row names or numeric vector of plate row indices and numeric vector of plate column indices, both of the same length or of length 1.

name

Character vector of well name, where each entry is of the form A1, A2, etc.

Details

Plate objects are listed using list_plates(), which can either list all available plates (default or dispatch on NULL) or restrict the listing to a set of supplied experiment objects (dispatch on either Experiment or ExperimentIdentifier objects). If multiple experiments are used for limiting the search (i.e. a json_vec of experiments), a separate API call for each object has to be made. PlateMetadata objects (including all corresponding WellMetadata objects) are retrieved by list_plate_metadata() which can be dispatched on objects that represent plates, including Plate, PlateIdentifier and Sample (given that the sample is of type PLATE). Finally, PlateIdentifier can be created either by calling plate_id() or though coercion of Plate, Sample (with type PLATE) or PlateMetadata objects using the function as_plate_id(). Neither plate_id() nor as_plate_id() incur API calls.

Wells can be listed with list_wells(), which returns WellIdentifier objects if dispatch occurs on objects representing plates, including Plate, PlateIdentifier and Sample (with type PLATE). In this case the entire set of well id objects corresponding to the selected plates is returned and a separate API call is required per plate.

Whenever list_wells() is dispatched on material objects (any of MaterialScreening, MaterialIdentifierScreening, MaterialGeneric or MaterialIdentifierGeneric), PlateWellReferenceWithDatasets objects are returned, representing wells associated with the given material. If multiple material ids are passed, an API call for each object is issued. The well search can be limited to an experiment by passing a single Experiment or ExperimentIdentifier object as experiment argument and image dataset references as well as feature vector dataset references can be retrieved as part of the PlateWellReferenceWithDatasets objects if the logical switch include_datasets is set to TRUE. A separate API call per passed material object is required.

Instantiation of WellIdentifier objects can be done either using the constructor well_id() or via coercion of WellMetadata objects by calling as_well_id(). Well samples cannot be coerced to well id objects as they do not contain all fields that are required. A further object type relevant to this context is that of WellPosition, encoding the position of a well within a plate. Such objects can be created using the constructor well_pos().

Value

Depending on the number of resulting objects, either a json_class (single object) or a json_vec (multiple objects), is returned. For list_plates(), the additional class attribute Plate is added, while list_plate_metadata() returns PlateMetadata and plate_id()/as_plate_id() yield PlateIdentifier objects. For individual wells, list_wells(), well_id() and as_well_id() all return objects with sub-type WellIdentifier. Finally, WellPosition objects are created by well_pos().

openBIS

  • \Sexpr[results=rd]{infx::docs_link("sas", "listPlates")}
  • \Sexpr[results=rd]{infx::docs_link("sas", "listPlateWells")}
  • \Sexpr[results=rd]{infx::docs_link("sas", "getPlateMetadataList")}

See Also

Other object listing functions: list_datasets, list_experiments, list_material, list_projects, list_samples

Examples


  tok <- login_openbis()

  # search for an experiment, e.g. ADENO-AU-K1
  exp <- search_openbis(tok,
                        search_criteria(
                          property_clause("pathogen", "Adenovirus"),
                          property_clause("library", "Ambion"),
                          property_clause("geneset", "Kinome"),
                          property_clause("replicate", 1L)
                        ),
                        target_object = "experiment")

  # list all plates associated with this experiment
  plates <- list_plates(tok, exp)
  length(plates)
  as_plate_id(plates)

  # for a plate, fetch meta data objects
  meta <- list_plate_metadata(tok, plates[[1L]])
  print(meta, depth = 2L, length = 15L)
  print(meta[["wells"]][[1L]], depth = 2L)

  # search for a sample object corresponding to plate BB01-1I
  samp <- search_openbis(tok,
                         search_criteria(
                           attribute_clause("code",
                                            "/INFECTX_PUBLISHED/BB01-1I")
                         ),
                         target_object = "sample")

  # list all wells for this sample
  wells <- list_wells(tok, samp)
  identical(as_well_id(meta[["wells"]][[1L]]),
            wells[[1L]])

  # search for the material corresponding to MTOR
  mat <- search_openbis(tok,
                        search_criteria(
                          property_clause("gene_symbol", "MTOR")
                        ),
                        target_object = "material")
  # search for associated wells, limited to ADENO-AU-K1
  mtor <- list_wells(tok, mat, exp)
  plates <- get_field(mtor, "experimentPlateIdentifier")
  as_plate_id(plates)
  unique(get_field(mtor, "wellPosition"))

  logout_openbis(tok)



ropensci/infx documentation built on May 14, 2022, 5:51 p.m.