Gene-to-symbol mappings

Gene2Symbol(object, ...)

# S4 method for DataFrame
Gene2Symbol(object, format = c("makeUnique", "unmodified", "1:1"))

# S4 method for GRanges
Gene2Symbol(object, format = c("makeUnique", "unmodified", "1:1"))

Arguments

object

Object.

...

Additional arguments.

format

character(1). Formatting method to apply:

  • "makeUnique": Recommended. Apply make.unique() to the geneName column. Gene symbols are made unique, while the gene identifiers remain unmodified.

  • "unmodified": Return geneId and geneName columns unmodified, in long format.

  • "1:1": For gene symbols that map to multiple gene identifiers, select

Value

Gene2Symbol.

Note

For some organisms, gene names and gene symbols 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.

For the format argument, note that "long" was used instead of "unmodified" prior to v0.10.10.

Updated 2021-03-03.

See also

Examples

data(GRanges, package = "AcidTest") ## DataFrame ==== df <- DataFrame( "geneId" = c( "ENSG00000228572.7", "ENSG00000182378.14" ), "geneName" = c( "AL954722.1", "PLCXD1" ) ) x <- Gene2Symbol(df) print(x)
#> Gene2Symbol with 2 rows and 2 columns #> geneId geneName #> <character> <character> #> 1 ENSG00000228572.7 AL954722.1 #> 2 ENSG00000182378.14 PLCXD1
## GRanges ==== object <- GRanges x <- Gene2Symbol(object)