list_plate_well.Rd
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.
list_plates(token, x = NULL, ...) # S3 method for NULL list_plates(token, x, ...) # S3 method for ExperimentIdentifier list_plates(token, x, ...) # S3 method for Experiment list_plates(token, x, ...) list_plate_metadata(token, x, ...) # S3 method for PlateIdentifier list_plate_metadata(token, x, ...) # S3 method for Plate list_plate_metadata(token, x, ...) # S3 method for Sample list_plate_metadata(token, x, ...) plate_id(code, space) as_plate_id(x, ...) # S3 method for Plate as_plate_id(x, ...) # S3 method for Sample as_plate_id(x, ...) # S3 method for PlateMetadata as_plate_id(x, ...) # S3 method for PlateIdentifier as_plate_id(x, ...) list_wells(token, x, ...) # S3 method for PlateIdentifier list_wells(token, x, ...) # S3 method for Plate list_wells(token, x, ...) # S3 method for Sample list_wells(token, x, ...) # S3 method for MaterialScreening list_wells(token, x, experiment = NULL, include_datasets = FALSE, ...) # S3 method for MaterialIdentifierScreening list_wells(token, x, experiment = NULL, include_datasets = FALSE, ...) # S3 method for MaterialGeneric list_wells(token, x, experiment = NULL, include_datasets = FALSE, ...) # S3 method for 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 WellMetadata as_well_id(x, ...) # S3 method for WellIdentifier as_well_id(x, ...) well_pos(row = NULL, col = NULL, name = NULL)
token | Login token as created by |
---|---|
x | Object to limit the number of returned wells or plates. |
... | Generic compatibility. Extra arguments will be passed to
|
code, space | Character vectors that together can be used to create
|
experiment | Additionally, the search can be limited to a single
experiment, specified either as |
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 |
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. |
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()
.
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()
.
Other object listing functions: list_datasets
,
list_experiments
,
list_material
, list_projects
,
list_samples
# \donttest{ 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)#> [1] 7as_plate_id(plates)#> ┌─█─PlateIdentifier #> │ ├─plateCode = BB01-1I #> │ └─spaceCodeOrNull = INFECTX_PUBLISHED #> ├─█─PlateIdentifier #> │ ├─plateCode = KB2-01-1I #> │ └─spaceCodeOrNull = INFECTX_PUBLISHED #> ├─█─PlateIdentifier #> │ ├─plateCode = KB2-02-1I #> │ └─spaceCodeOrNull = INFECTX_PUBLISHED #> ├─█─PlateIdentifier #> │ ├─plateCode = KB2-03-1I #> │ └─spaceCodeOrNull = INFECTX_PUBLISHED #> ├─█─PlateIdentifier #> │ ├─plateCode = KB2-04-1I #> │ └─spaceCodeOrNull = INFECTX_PUBLISHED #> ├─█─PlateIdentifier #> │ ├─plateCode = KB2-05-1I #> │ └─spaceCodeOrNull = INFECTX_PUBLISHED #> └─█─PlateIdentifier #> ├─plateCode = KB2-06-1I #> └─spaceCodeOrNull = INFECTX_PUBLISHED# for a plate, fetch meta data objects meta <- list_plate_metadata(tok, plates[[1L]]) print(meta, depth = 2L, length = 15L)#> █─PlateMetadata #> ├─permId = 20111223112852092-318030 #> ├─plateCode = BB01-1I #> ├─spaceCodeOrNull = INFECTX_PUBLISHED #> ├─plateGeometry = █─Geometry #> │ ├─width = 24 #> │ └─height = 16 #> ├─properties = [$PLATE_GEOMETRY = 384_WELLS_16X24, PLATE_TYPE = CheckerBoard... #> └─wells = ┌─█─WellMetadata #> │ └─... #> ├─█─WellMetadata #> │ └─... #> ├─█─WellMetadata #> │ └─... #> ...#> █─WellMetadata #> ├─permId = 20121012090101856-1360590 #> ├─plateIdentifier = █─PlateIdentifier #> │ ├─permId = 20111223112852092-318030 #> │ ├─plateCode = BB01-1I #> │ └─spaceCodeOrNull = INFECTX_PUBLISHED #> ├─wellPosition = █─WellPosition #> │ ├─wellRow = 1 #> │ └─wellColumn = 1 #> ├─code = BB01-1I:A1 #> ├─type = CONTROL_WELL #> ├─properties = [WELL_QUALITY_STATUS = UNKNOWN, CONTROL_LINK = ATP6V1A (CONTROL)] #> └─materialProperties = █─MaterialScreening #> ├─materialTypeIdentifier = █─MaterialTypeIdentifierSc... #> │ └─... #> ├─materialCode = ATP6V1A #> ├─properties = [DESCRIPTION = ATP6V1A, INHIBITOR_OF =... #> └─materialProperties = █─MaterialScreening #> └─...# 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]])#> [1] TRUE# 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)#> ┌─█─PlateIdentifier #> │ ├─plateCode = KB2-01-1I #> │ └─spaceCodeOrNull = INFECTX_PUBLISHED #> ├─█─PlateIdentifier #> │ ├─plateCode = KB2-02-1I #> │ └─spaceCodeOrNull = INFECTX_PUBLISHED #> └─█─PlateIdentifier #> ├─plateCode = KB2-03-1I #> └─spaceCodeOrNull = INFECTX_PUBLISHED#> [[1]] #> █─WellPosition #> ├─wellRow = 11 #> └─wellColumn = 9 #>