GeneToSymbol: Gene-to-symbol mappings

GeneToSymbolR Documentation

Gene-to-symbol mappings

Description

Gene-to-symbol mappings

Usage

GeneToSymbol(object, ...)

## S4 method for signature 'DFrame'
GeneToSymbol(
  object,
  format = c("makeUnique", "1:1", "unmodified"),
  quiet = FALSE
)

## S4 method for signature 'GRanges'
GeneToSymbol(object, ...)

Arguments

object

Object.

format

character(1). Formatting method to apply:

  • "makeUnique": Recommended. Apply make.unique to the geneName 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 with NA gene name will be removed will be removed with an internal complete.cases call.

  • "unmodified": Return geneId and geneName columns unmodified, in long format. Incomplete elements with NA gene name will be removed with an internal complete.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.

Value

GeneToSymbol.

Note

Updated 2023-09-26.

See Also

makeGeneToSymbol().

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)

## GRanges ====
object <- GRanges
x <- GeneToSymbol(object)

acidgenomics/r-acidgenomes documentation built on Jan. 12, 2024, 4:06 a.m.