The subset method for pathways lists as returned by the read_gmt function.

# S3 method for pathwayCollection
[[(x, name_char)

Arguments

x

An object of class pathwayCollection.

name_char

The name of a pathway in the collection or its unique ID.

Value

A list of the pathway name (Term), unique ID (pathID), contents (IDs), description (description), and number of features (Size).

Details

This function finds the index matching the name_char argument to the TERMS field of the pathwayCollection-class Object, then subsets the pathways list, TERMS vector, description vector, and setsize vector by this index. If you subset a trimmed pathwayCollection object, and the function errors with "Pathway not found.", then the pathway specified has been trimmed from the pathway collection.

Also, this function does not allow for users to overwrite any portion of a pathway collection. These objects should rarely, if ever, be changed. If you absolutely must change the components of a pathwayCollection object, then create a new one with the codeCreatePathwayCollection function.

Examples

data("colon_pathwayCollection") colon_pathwayCollection[["KEGG_RETINOL_METABOLISM"]]
#> $Term #> [1] "KEGG_RETINOL_METABOLISM" #> #> $PathID #> [1] "pathway60" #> #> $IDs #> [1] "RPE65" "CYP3A5" "UGT2B28" "CYP4A11" "CYP3A4" "RDH8" "DHRS3" #> [8] "CYP2C18" "ADH1B" "ADH1C" "ADH4" "ADH5" "DGAT2" "ADH1A" #> [15] "BCMO1" "RDH10" "CYP26A1" "UGT2B11" "CYP2C9" "AWAT2" "CYP26C1" #> [22] "CYP2C19" "CYP2C8" "CYP2B6" "UGT2A3" "CYP2A13" "UGT1A4" "CYP3A7" #> [29] "UGT1A1" "UGT1A3" "CYP26B1" "DHRS9" "UGT1A10" "DGAT1" "UGT1A8" #> [36] "UGT1A7" "UGT1A6" "ALDH1A1" "RETSAT" "RDH12" "LRAT" "RDH11" #> [43] "UGT1A5" "CYP2A6" "CYP2A7" "CYP4A22" "DHRS4" "CYP1A1" "CYP1A2" #> [50] "ADH7" "ADH6" "UGT2A1" "ALDH1A2" "CYP3A43" "DHRS4L2" "RDH16" #> [57] "UGT1A9" "RDH5" "UGT2B10" "UGT2B7" "PNPLA4" "UGT2B4" "UGT2B17" #> [64] "UGT2B15" #> #> $Description #> [1] NA #> #> $Size #> [1] 64 #>