Gene-to-symbol mappings
Usage
GeneToSymbol(object, ...)
# S4 method for DFrame
GeneToSymbol(
object,
format = c("makeUnique", "1:1", "unmodified"),
quiet = FALSE
)
# S4 method for GRanges
GeneToSymbol(object, ...)
Arguments
- object
Object.
- format
character(1)
. Formatting method to apply:"makeUnique"
: Recommended. Applymake.unique
to thegeneName
column. Gene names are made unique, while the identifiers remain unmodified.NA
gene names will be renamed to"unannotated"
."1:1"
: For gene names that map to multiple gene identifiers, select only the first annotated gene identifier. Incomplete elements withNA
gene name will be removed will be removed with an internalcomplete.cases
call."unmodified"
: ReturngeneId
andgeneName
columns unmodified, in long format. Incomplete elements withNA
gene name will be removed with an internalcomplete.cases
call.
- quiet
logical(1)
. Perform command quietly, suppressing messages.- ...
Arguments pass through to
DFrame
method.
Details
For some organisms, gene identifiers and gene names do not map 1:1 (e.g.
Homo sapiens and Mus musculus). Refer to the format
argument
here in the documentation for approaches that deal with this issue.
Examples
data(GRanges, package = "AcidTest")
## DFrame ====
df <- S4Vectors::DataFrame(
"geneId" = c(
"ENSG00000228572.7",
"ENSG00000182378.14"
),
"geneName" = c(
"AL954722.1",
"PLCXD1"
)
)
x <- GeneToSymbol(df)
print(x)
#> GeneToSymbol with 2 rows and 2 columns
#> geneId geneName
#> <character> <character>
#> 1 ENSG00000182378.14 PLCXD1
#> 2 ENSG00000228572.7 AL954722.1
## GRanges ====
object <- GRanges
x <- GeneToSymbol(object)