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

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

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.

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.

Examples

data("colon_pathwayCollection") WhichPathways(colon_pathwayCollection, "MAP", partial = TRUE)
#> Object with Class(es) 'pathwayCollection', 'list' [package 'pathwayPCA'] with 2 elements: #> $ pathways:List of 8 #> $ TERMS : chr [1:8] "KEGG_ERBB_SIGNALING_PATHWAY" ...
WhichPathways( colon_pathwayCollection, c("MAP4K5", "RELA"), matches = "all" )
#> Object with Class(es) 'pathwayCollection', 'list' [package 'pathwayPCA'] with 2 elements: #> $ pathways:List of 1 #> $ TERMS : chr "PID_TNF_PATHWAY"