CreateOmicsPath {pathwayPCA} | R Documentation

## Generation functions for `-Omics*`-class objects

### Description

These functions create valid objects of class `OmicsPathway`, `OmicsSurv`, `OmicsReg`, or `OmicsCateg`.

### Usage

    CreateOmicsPath(assayData_df, sampleIDs_char, pathwayCollection_ls)

    CreateOmicsSurv(
      assayData_df,
      sampleIDs_char,
      pathwayCollection_ls,
      eventTime_num,
      eventObserved_lgl
    )

    CreateOmicsReg(
      assayData_df,
      sampleIDs_char,
      pathwayCollection_ls,
      response_num
    )

    CreateOmicsCateg(
      assayData_df,
      sampleIDs_char,
      pathwayCollection_ls,
      response_fact
    )

### Arguments

`assayData_df` | An N \times p data frame with named columns.
`sampleIDs_char` | A character vector with the N sample names.
`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.
`eventTime_num` | A `numeric` vector with N observations corresponding to the last observed time of follow up.
`eventObserved_lgl` | A `logical` vector with N observations indicating right-censoring. The values will be `FALSE` if the observation was censored (i.e., we did not observe an event).
`response_num` | A `numeric` vector of length N: the dependent variable in an ordinary regression exercise.
`response_fact` | A `factor` vector of length N: the dependent variable of a generalized linear regression exercise.

### Details

Please note that the classes of the parameters are not flexible. The -Omics assay data must be or extend the class `data.frame`, and the response values (for a survival-, regression-, or categorical-response object) must match their expected classes exactly. The reason for this is to encourage the end user to pay attention to the quality and format of their input data. Because the functions internal to this package have only been tested on the classes described in the Arguments section, these class checks prevent unexpected errors (or worse, incorrect computational results without an error). These draconian input class restrictions protect the accuracy of your data analysis.

### Value

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

### OmicsPathway

Valid `OmicsPathway` objects will have no response information, just the mass spectrometry or bio-assay ("design") matrix and the pathway list. `OmicsPathway` objects should be created only when unsupervised pathway extraction is needed (not possible with Supervised PCA). Because of the missing response, no pathway testing can be performed on an `OmicsPathway` object.

### OmicsSurv

Valid `OmicsSurv` objects will have two response vectors: a vector of the most recently recorded follow-up times and a logical vector if that time marks an event (`TRUE`: observed event; `FALSE`: right- censored observation).

### OmicsReg and OmicsCateg

Valid `OmicsReg` and `OmicsCateg` objects with have one response vector of continuous (`numeric`) or categorial (`factor`) observations, respectively.

### See Also

`OmicsPathway`, `OmicsSurv`, `OmicsReg`, and `OmicsCateg`

### Examples

    # DO NOT CALL THESE FUNCTIONS DIRECTLY. USE CreateOmics() INSTEAD.

      data("colon_pathwayCollection")
      data("colonSurv_df")

    ## Not run:
      CreateOmicsPath(
        assayData_df = colonSurv_df[, -(1:3)],
        sampleIDs_char = colonSurv_df$sampleID,
        pathwayCollection_ls = colon_pathwayCollection
      )

      CreateOmicsSurv(
        assayData_df = colonSurv_df[, -(1:3)],
        sampleIDs_char = colonSurv_df$sampleID,
        pathwayCollection_ls = colon_pathwayCollection,
        eventTime_num = colonSurv_df$OS_time,
        eventObserved_lgl = as.logical(colonSurv_df$OS_event)
      )

      CreateOmicsReg(
        assayData_df = colonSurv_df[, -(1:3)],
        sampleIDs_char = colonSurv_df$sampleID,
        pathwayCollection_ls = colon_pathwayCollection,
        response_num = colonSurv_df$OS_time
      )

      CreateOmicsCateg(
        assayData_df = colonSurv_df[, -(1:3)],
        sampleIDs_char = colonSurv_df$sampleID,
        pathwayCollection_ls = colon_pathwayCollection,
        response_fact = as.factor(colonSurv_df$OS_event)
      )

    ## End(Not run)

[Package pathwayPCA version 1.8.0 Index]