OPM {opm}R Documentation

Real classes of the opm package

Description

Classes whose members can be generated and manipulated by an opm user: OPM, OPMA, OPMD, OPMS and MOPMX.

Details

OPM is an acronym for ‘OmniLog(R) Phenotype Microarray’. This is the class for holding single-plate OmniLog(R) phenotype microarray data without aggregated values, but with information read from the original input CSV files as well as an additional arbitrary amount of arbitrarily organised metadata. Objects of this class are usually created by inputting files with read_single_opm or read_opm, not with a call to new or as.

OPM inherits from WMD and, hence, has all its methods.

Regarding the coercion of this class to other classes (see the as method from the methods package), consider the following:

OPMA is an acronym for ‘OPM, aggregated’. This is the class for holding single-plate OmniLog(R) phenotype microarray data together with aggregated values. Objects of this class are usually created by calling do_aggr on an OPM object, or by inputting files with read_single_opm or read_opm if these files already contain aggregated data.

OPMA inherits from OPM and, hence, has all its methods.

OPMD is an acronym for ‘OPM, discretised’. This is the class for holding single-plate OmniLog(R) phenotype microarray data together with aggregated and discretised values. Objects of this class are usually created by calling do_disc on an OPMA object, or by inputting files with read_single_opm or read_opm if these files already contain discretised data.

OPMD inherits from OPMA and, hence, has all its methods.

The discretised data are considered as ‘consistent’ with the curve parameter from which they have been estimated if no FALSE value corresponds to curve parameter larger than the curve parameter of any TRUE value; NA values are not considered when checking consistency. The strict.OPMD entry of opm_opt determines whether an error or only a warning is issued in the case of inconsistency.

OPMS is the class for holding multiple-plate OmniLog(R) phenotype microarray data with or without aggregated or discretised values. Regarding the name: OPMS is just the plural of OPM. Objects of this class are usually created by calling opms or other combination functions on OPM or derived objects, or by inputting files with read_opm if these files altogether contain more than a single plate. OPMS objects are not normally created with a call to new or as. The data may have been obtained from distinct organisms and/or replicates, but must correspond to the same plate type and must contain the same wells.

OPMS inherits from WMDS and, hence, has all its methods. As a rule, OPMS has the same methods as the OPM class, but adapted to a collection of more than one OPM object. Also, OPMS can hold OPMD and OPMA as well as OPM objects, even though this is not indicated for all its methods in this manual.

MOPMX is an object for holding OPMX objects with potentially multiple plate types. Regarding the name: the M stands for ‘multiple’. MOPMX objects are generated by read_opm(convert = "grp") and opms(group = TRUE). MOPMX objects can also be created with new or as and then further manipulated; see the examples below. MOPMX objects in many aspects behave like lists.

OPM_MCP_OUT is a data-frame based class useful as intermediate result of opm_mcp. See there and its annotated method for usages.

See Also

methods::Methods methods::new

Other classes: FOE, OPMA_DB, OPMD_DB, OPMX, OPM_DB, WMD, WMDS, WMDX, XOPMX, YAML_VIA_LIST

Examples

## overview on the classes
showClass("OPM")
## Class "OPM" [package "opm"]
## 
## Slots:
##                                              
## Name:  measurements     csv_data     metadata
## Class:       matrix    character         list
## 
## Extends: 
## Class "WMD", directly
## Class "OPMX", directly
## Class "XOPMX", directly
## Class "YAML_VIA_LIST", directly
## Class "WMDX", by class "WMD", distance 2
## 
## Known Subclasses: 
## Class "OPMA", directly
## Class "OPMD", by class "OPMA", distance 2
showClass("OPMA")
## Class "OPMA" [package "opm"]
## 
## Slots:
##                                                               
## Name:     aggregated aggr_settings  measurements      csv_data
## Class:        matrix          list        matrix     character
##                     
## Name:       metadata
## Class:          list
## 
## Extends: 
## Class "OPM", directly
## Class "WMD", by class "OPM", distance 2
## Class "WMDX", by class "OPM", distance 3
## Class "OPMX", by class "OPM", distance 2
## Class "XOPMX", by class "OPM", distance 2
## Class "YAML_VIA_LIST", by class "OPM", distance 2
## 
## Known Subclasses: "OPMD"
showClass("OPMD")
## Class "OPMD" [package "opm"]
## 
## Slots:
##                                                               
## Name:    discretized disc_settings    aggregated aggr_settings
## Class:       logical          list        matrix          list
##                                                 
## Name:   measurements      csv_data      metadata
## Class:        matrix     character          list
## 
## Extends: 
## Class "OPMA", directly
## Class "OPM", by class "OPMA", distance 2
## Class "WMD", by class "OPMA", distance 3
## Class "WMDX", by class "OPMA", distance 4
## Class "OPMX", by class "OPM", distance 3
## Class "XOPMX", by class "OPM", distance 3
## Class "YAML_VIA_LIST", by class "OPM", distance 3
showClass("OPMS")
## Class "OPMS" [package "opm"]
## 
## Slots:
##              
## Name:  plates
## Class:   list
## 
## Extends: 
## Class "WMDS", directly
## Class "OPMX", directly
## Class "XOPMX", directly
## Class "YAML_VIA_LIST", directly
## Class "WMDX", by class "WMDS", distance 2
showClass("MOPMX")
## Class "MOPMX" [package "opm"]
## 
## Slots:
##                           
## Name:      .Data     names
## Class:      list character
## 
## Extends: 
## Class "list", from data part
## Class "XOPMX", directly
## Class "vector", by class "list", distance 2
## OPMX conversions with as()
showMethods("coerce", classes = c("OPM", "OPMA", "OPMD", "OPMS"))
## Function: coerce (package methods)
## from="OPM", to="OPMA"
## from="OPM", to="OPMD"
## from="OPM", to="OPM_DB"
## from="OPM", to="data.frame"
## from="OPM", to="list"
## from="OPM", to="matrix"
## from="OPMA", to="OPM"
## from="OPMA", to="OPMA_DB"
## from="OPMA", to="OPMD"
## from="OPMA", to="data.frame"
## from="OPMA", to="list"
## from="OPMA", to="matrix"
## from="OPMA_DB", to="OPMA"
## from="OPMA_DB", to="OPMS"
## from="OPMD", to="OPM"
## from="OPMD", to="OPMA"
## from="OPMD", to="OPMD_DB"
## from="OPMD", to="data.frame"
## from="OPMD", to="list"
## from="OPMD", to="matrix"
## from="OPMD_DB", to="OPMD"
## from="OPMD_DB", to="OPMS"
## from="OPMS", to="MOPMX"
##     (inherited from: from="OPMX", to="MOPMX")
## from="OPMS", to="OPMA_DB"
## from="OPMS", to="OPMD_DB"
## from="OPMS", to="OPM_DB"
## from="OPMS", to="list"
## from="OPM_DB", to="OPM"
## from="OPM_DB", to="OPMS"
## from="list", to="OPM"
## from="list", to="OPMA"
## from="list", to="OPMD"
## from="list", to="OPMS"
data(vaas_1)
data(vaas_4)
(x <- as(vaas_1, "OPMA")) # drops the discretised data
## Class                 OPMA
## From file             ./E. coli DSM
##                       30083T_vim10_7B__1_28_PMX_0_8#30#2010_F_
##                       7B_5.csv
## Hours measured        95.75
## Number of wells       96
## Plate type            Gen III
## Position              7-B
## Setup time            8/30/2010 1:53:08 PM
## Metadata              5
## Aggregated            TRUE
## Discretized           FALSE
stopifnot(has_disc(vaas_1), !has_disc(x))
(x <- as(vaas_1, "OPM")) # drops the aggregated data
## Class                 OPM
## From file             ./E. coli DSM
##                       30083T_vim10_7B__1_28_PMX_0_8#30#2010_F_
##                       7B_5.csv
## Hours measured        95.75
## Number of wells       96
## Plate type            Gen III
## Position              7-B
## Setup time            8/30/2010 1:53:08 PM
## Metadata              5
## Aggregated            FALSE
## Discretized           FALSE
stopifnot(has_aggr(vaas_1), !has_aggr(x))

## MOPMX creation and conversion
(x <- new("MOPMX")) # don't do this with the other classes
## [1] Length      Plate.type  Aggregated  Discretized
## <0 rows> (or 0-length row.names)
## 
## => MOPMX object with 0 element(s), details are shown above.
##  Access the elements with [[ or $ to apply specific methods.
(x <- as(vaas_1, "MOPMX"))
##         Length Plate.type Aggregated Discretized
## Gen.III      1    Gen III       TRUE        TRUE
## 
## => MOPMX object with 1 element(s), details are shown above.
##  Access the elements with [[ or $ to apply specific methods.
(x <- as(vaas_4, "MOPMX"))
##         Length Plate.type Aggregated Discretized
## Gen.III      4    Gen III          4           4
## 
## => MOPMX object with 1 element(s), details are shown above.
##  Access the elements with [[ or $ to apply specific methods.
# conversion backwards is only possible as long as the MOPMX object contains
# only a single OPMX object
showMethods("coerce", classes = "MOPMX")
## Function: coerce (package methods)
## from="MOPMX", to="OPMA_DB"
## from="MOPMX", to="OPMD_DB"
## from="MOPMX", to="OPMX"
## from="MOPMX", to="OPM_DB"
## from="OPMD", to="MOPMX"
##     (inherited from: from="OPMX", to="MOPMX")
## from="OPMS", to="MOPMX"
##     (inherited from: from="OPMX", to="MOPMX")
## from="OPMX", to="MOPMX"
## from="OPM_DB", to="MOPMX"
## from="list", to="MOPMX"

[Package opm version 1.3.63 Index]