Convert genes to symbols
Source:R/AllGenerics.R
, R/convertGenesToSymbols-methods.R
convertGenesToSymbols.Rd
Convert genes to symbols
Usage
convertGenesToSymbols(object, ...)
convertSymbolsToGenes(object, ...)
# S4 method for SummarizedExperiment
convertGenesToSymbols(object, strict = FALSE)
# S4 method for SummarizedExperiment
convertSymbolsToGenes(object, strict = FALSE)
Arguments
- object
Object.
- strict
logical(1)
. Require that all identifiers contain gene name (symbol) metadata stored in the object. Disabled by default, to support objects containing custom gene identifiers, such as FASTA spike-ins.- ...
Additional arguments.
Examples
data(RangedSummarizedExperiment, package = "AcidTest")
## SummarizedExperiment ====
object <- RangedSummarizedExperiment
x <- convertGenesToSymbols(object)
print(x)
#> class: RangedSummarizedExperiment
#> dim: 500 12
#> metadata(3): version date interestingGroups
#> assays(1): counts
#> rownames(500): TSPAN6 TNMD ... ABCF2 CHPF2
#> rowData names(10): broadClass description ... ncbiGeneId seqCoordSystem
#> colnames(12): sample01 sample02 ... sample11 sample12
#> colData names(1): condition
## Interconvert back to gene IDs.
y <- convertSymbolsToGenes(x)
print(y)
#> class: RangedSummarizedExperiment
#> dim: 500 12
#> metadata(3): version date interestingGroups
#> assays(1): counts
#> rownames(500): ENSG00000000003.15 ENSG00000000005.6 ...
#> ENSG00000033050.9 ENSG00000033100.16
#> rowData names(10): broadClass description ... ncbiGeneId seqCoordSystem
#> colnames(12): sample01 sample02 ... sample11 sample12
#> colData names(1): condition