Filter by genes belonging to a gene set from a data frame
filterGS.Rd
Filter a data frame or vector by genes belonging to a gene set
Arguments
- genes
a character vector with gene IDs
- gs
a character vector corresponding to the IDs of the gene sets to be shown
- mset
Module set to use; see "tmodUtest" for details
- x
a data frame or a vector
- extra
no longer used.
Value
filterGS returns a logical vector of length equal to genes, with TRUE indicating that the given gene is a member of the gene sets in `gs`.
Details
filterGS filters a vector of gene IDs based on whether the IDs belong to a given set of gene sets, returning a logical vector.
The showModule function is deprecated and will be removed in future.
Examples
data(Egambia)
## LI.M127 – type I interferon response
sel <- filterGS("LI.M127", Egambia$GENE_SYMBOL)
head(Egambia[sel, ])
#> [1] GENE_SYMBOL GENE_NAME EG NID NID NID
#> [7] NID NID NID NID NID NID
#> [13] NID NID NID NID NID NID
#> [19] TB TB TB TB TB TB
#> [25] TB TB TB TB TB TB
#> [31] TB TB TB
#> <0 rows> (or 0-length row.names)