WhichPathways: Filter and Subset a 'pathwayCollection'-class Object by...

Description Usage Arguments Details Value Examples

View source: R/accessClass_pathwayCollection_which.R

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

1
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

1
2
3
4
5
6
7
8
9
  data("colon_pathwayCollection")
  
  WhichPathways(colon_pathwayCollection, "MAP", partial = TRUE)
  
  WhichPathways(
    colon_pathwayCollection,
    c("MAP4K5", "RELA"),
    matches = "all"
  )

pathwayPCA documentation built on Dec. 15, 2020, 6:14 p.m.