crosswalk {hgnc} | R Documentation |
Convert an HGNC value to another
Description
crosswalk()
will convert values found in one of the columns of an
HGNC gene data set to values in another.
Usage
crosswalk(value, from, to = from, hgnc_dataset = import_hgnc_dataset())
Arguments
value |
A character vector of values to be matched in the |
from |
The name of the column in the HGNC gene data set ( |
to |
The name of the column whose values are to be returned,
corresponding to matches in the |
hgnc_dataset |
A data frame corresponding to a HGNC gene data set.
Typically, you'd get hold of a HGNC gene data set with
|
Examples
## Not run:
# Map a gene symbol to its HUGO identifier.
crosswalk(value = "A1BG", from = "symbol", to = "hgnc_id")
# If `from` and `to` refer to the same column, `crosswalk()` will filter
# out unmatched values by converting them to `NA`.
crosswalk(value = c("A1BG", "Not a gene"), from = "symbol", to = "symbol")
# This is the default behavior, so you can simply call:
crosswalk(value = c("A1BG", "Not a gene"), from = "symbol")
## End(Not run)
[Package hgnc version 0.3.0 Index]