CheckPwyColl {pathwayPCA} | R Documentation

## Check an Input Pathway Collection

### Description

Check the class and names of a `pathwayCollection` object. Add or fix names as appropriate. Add the `setsize` vector to the object.

### Usage

    CheckPwyColl(pwyColl_ls)

### Arguments

`pwyColl_ls` | A pathway collection supplied to the `CreateOmics` function

### Details

If there are no names, create them. If there are missing names, label them. If there are duplicated names (because R is stupid and allows duplicate element names in a list—but not a data frame!), then use the `data.frame` name rule to append a period followed by integers to the end of the name string.

Notes: if the supplied `pathways` object within your `pwyColl_ls` list has no names, then this pathway list will be named `path1`, `path2`, `path3`, ...; if any of the pathways are missing names, then the missing pathways will be named `noName` followed by the index of the pathway. For example, if the 112th pathway in the `pathways` list has no name (but other pathways do), then this pathway will be named `noName112`. Furthermore, if any of the pathway names are duplicated, then the duplicates will have `.1`, `.2`, `.3`, ... appended to the duplicate names until all pathway names are unique. Once all pathways have been verified to have unique names, then the pathway names are attached as attributes to the `TERMS` and `setsize` vectors (the `setsize` vector is calculated at object creation).

### Value

The same pathway collection, but with names modified as described in "Details" and the number of genes per pathway as the `setsize` element of the collection object.

### Examples

     # DO NOT CALL THIS FUNCTION DIRECTLY. CALL FROM WITHIN CreateOmics().

    ## Not run:
      data("colon_pathwayCollection")
      CheckPwyColl(colon_pathwayCollection)

    ## End(Not run)

[Package pathwayPCA version 1.8.0 Index]