This function calls the CreateOmicsPath, CreateOmicsSurv, CreateOmicsReg, and CreateOmicsCateg functions to create valid objects of the classes OmicsPathway, OmicsSurv, OmicsReg, or OmicsCateg, respectively.

CreateOmics(
  assayData_df,
  pathwayCollection_ls,
  response = NULL,
  respType = c("none", "survival", "regression", "categorical"),
  centerScale = c(TRUE, TRUE),
  minPathSize = 3,
  ...
)

Arguments

assayData_df

An \(N \times p\) data frame with named columns.

pathwayCollection_ls

A pathwayCollection list of known gene pathways with two or three elements:

  • pathways : A named list of character vectors. Each vector contains the names of the individual genes within that pathway as a vector of character strings. The names contained in these vectors must have non-empty overlap with the column names of the assayData_df data frame. The names of the pathways (the list elements themselves) should be the a shorthand representation of the full pathway name.

  • TERMS: A character vector the same length as the pathways list with the proper names of the pathways.

  • description : An optional character vector the same length as the pathways list with additional information about the pathways.

If your gene pathways list is stored in a .gmt file, use the read_gmt function to import your pathways list as a pathwayCollection list object.

response

An optional response object. See "Details" for more information. Defaults to NULL.

respType

What type of response has been supplied. Options are "none", "survival", "regression", and "categorical". Defaults to "none" to match the default response = NULL value.

centerScale

Should the values in assayData_df be centered and scaled? Defaults to TRUE for centering and scaling, respectively. See scale for more information.

minPathSize

What is the smallest number of genes allowed in each pathway? Defaults to 3.

...

Dots for additional arguments passed to the internal CheckAssay function.

Value

A valid object of class OmicsPathway, OmicsSurv, OmicsReg, or OmicsCateg.

Details

This function is a wrapper around the four CreateOmics* functions. The values supplied to the response function argument can be in a list, data frame, matrix, vector, Surv object, or any class which extends these. Because this function makes "best guess" type conversions based on the respType argument, this argument is mandatory if response is non-NULL. Further, it is the responsibility of the user to ensure that the coerced response contained in the resulting Omics object accurately reflects the supplied response.

For respType = "survival", response is assumed to be ordered by event time, then event indicator. For example, if the response is a data frame or matrix, this function assumes that the first column is the time and the second column the death indicator. If the response is a list, then this function assumes that the first entry in the list is the event time and the second entry the death indicator. The death indicator must be a logical or binary (0-1) vector, where 1 or TRUE represents a death and 0 or FALSE represents right-censoring.

Some of the pathways in the supplied pathways list will be removed, or "trimmed", during object creation. For the pathway-testing methods, these trimmed pathways will have \(p\)-values given as NA. For an explanation of pathway trimming, see the documentation for the IntersectOmicsPwyCollct function.

See also

Examples

### Load the Example Data ### data("colonSurv_df") data("colon_pathwayCollection") ### Create an OmicsPathway Object ### colon_OmicsPath <- CreateOmics( assayData_df = colonSurv_df[, -(2:3)], pathwayCollection_ls = colon_pathwayCollection )
#> #> ====== Creating object of class OmicsPathway ======
#> The input pathway database included 676 unique features.
#> The input assay dataset included 656 features.
#> Only pathways with at least 3 or more features included in the assay dataset are #> tested (specified by minPathSize parameter). There are 15 pathways which meet #> this criterion.
#> Because pathwayPCA is a self-contained test (PMID: 17303618), only features in #> both assay data and pathway database are considered for analysis. There are 615 #> such features shared by the input assay and pathway database.
### Create an OmicsSurv Object ### colon_OmicsSurv <- CreateOmics( assayData_df = colonSurv_df[, -(2:3)], pathwayCollection_ls = colon_pathwayCollection, response = colonSurv_df[, 1:3], respType = "surv" )
#> #> ====== Creating object of class OmicsSurv =======
#> The input pathway database included 676 unique features.
#> The input assay dataset included 656 features.
#> Only pathways with at least 3 or more features included in the assay dataset are #> tested (specified by minPathSize parameter). There are 15 pathways which meet #> this criterion.
#> Because pathwayPCA is a self-contained test (PMID: 17303618), only features in #> both assay data and pathway database are considered for analysis. There are 615 #> such features shared by the input assay and pathway database.
### Create an OmicsReg Object ### colon_OmicsReg <- CreateOmics( assayData_df = colonSurv_df[, -(2:3)], pathwayCollection_ls = colon_pathwayCollection, response = colonSurv_df[, 1:2], respType = "reg" )
#> #> ====== Creating object of class OmicsReg =======
#> The input pathway database included 676 unique features.
#> The input assay dataset included 656 features.
#> Only pathways with at least 3 or more features included in the assay dataset are #> tested (specified by minPathSize parameter). There are 15 pathways which meet #> this criterion.
#> Because pathwayPCA is a self-contained test (PMID: 17303618), only features in #> both assay data and pathway database are considered for analysis. There are 615 #> such features shared by the input assay and pathway database.
### Create an OmicsCateg Object ### colon_OmicsCateg <- CreateOmics( assayData_df = colonSurv_df[, -(2:3)], pathwayCollection_ls = colon_pathwayCollection, response = colonSurv_df[, c(1,3)], respType = "cat" )
#> #> ====== Creating object of class OmicsCateg =======
#> The input pathway database included 676 unique features.
#> The input assay dataset included 656 features.
#> Only pathways with at least 3 or more features included in the assay dataset are #> tested (specified by minPathSize parameter). There are 15 pathways which meet #> this criterion.
#> Because pathwayPCA is a self-contained test (PMID: 17303618), only features in #> both assay data and pathway database are considered for analysis. There are 615 #> such features shared by the input assay and pathway database.