Gene-to-symbol mappings
Usage
GeneToSymbol(object, ...)
# S4 method for class 'DFrame'
GeneToSymbol(
object,
format = c("makeUnique", "1:1", "unmodified"),
quiet = FALSE
)
# S4 method for class 'GRanges'
GeneToSymbol(object, ...)Arguments
- object
Object.
- format
character(1). Formatting method to apply:"makeUnique": Recommended. Applymake.uniqueto thegeneNamecolumn. Gene names are made unique, while the identifiers remain unmodified.NAgene 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 withNAgene name will be removed will be removed with an internalcomplete.casescall."unmodified": ReturngeneIdandgeneNamecolumns unmodified, in long format. Incomplete elements withNAgene name will be removed with an internalcomplete.casescall.
- quiet
logical(1). Perform command quietly, suppressing messages.- ...
Arguments pass through to
DFramemethod.
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)