WhichPathways {pathwayPCA} | R Documentation

## Filter and Subset a `pathwayCollection`-class Object by Symbol.

### Description

The filter-subset method for pathways lists as returned by the `read_gmt` function. This function returns the subset of pathways which contain the set of symbols requested

### Usage

    WhichPathways(x, symbols_char, ...)

### Arguments

`x` | An object of class `pathwayCollection`.
`symbols_char` | A character vector or scalar of gene symbols or regions
`...` | Additional arguments passed to the `Contains` function

### Details

This function finds the index of each set that contains the symbols supplied, then returns those sets as a new `pathwayCollection` object. Find pathways that contain geneA OR geneB by passing the argument `matches = "any"` through `...` to `Contains` (this is the default value). Find pathways that contain geneA AND geneB by changing this argument to `matches = "all"`. Find all genes in a specified family by passing in one value to `short` and setting `partial = TRUE`.

### Value

An object of class `pathwayCollection`, but containing only the sets which contain the symbols supplied to `symbols_char`. If no sets are found to contain the symbols supplied, this function returns `NULL` and prints a warning.

### Examples

      data("colon_pathwayCollection")

      WhichPathways(colon_pathwayCollection, "MAP", partial = TRUE)

      WhichPathways(
        colon_pathwayCollection,
        c("MAP4K5", "RELA"),
        matches = "all"
      )

[Package pathwayPCA version 1.6.3 Index]