addIds: Add IDs to rowRanges of a SummarizedExperiment

View source: R/addIds.R

addIdsR Documentation

Add IDs to rowRanges of a SummarizedExperiment

Description

For now this function just works with SummarizedExperiments with Ensembl gene or transcript IDs. See example of usage in tximeta vignette. For obtaining multiple matching IDs for each row of the SummarizedExperiment set multiVals="list". See select for documentation on use of multiVals.

Usage

addIds(se, column, fromDb = FALSE, gene = FALSE, ...)

Arguments

se

the SummarizedExperiment

column

the name of the new ID to add (a column of the org package database or of the TxDb/EnsDb is fromDb=TRUE)

fromDb

logical, whether to use the TxDb/EnsDb that is associated with se. Default is FALSE, and an org package is used. Currently only implemented for transcript level (gene=FALSE). Column names can be viewed with columns(retrieveDb(se))

gene

logical, whether to map by genes or transcripts (default is FALSE). if rows are genes, and easily detected as such (ENSG or ENSMUSG), it will automatically switch to TRUE. if rows are transcripts and gene=TRUE, then it will try to use a gene_id column to map IDs to column

...

arguments passed to mapIds

Value

a SummarizedExperiment

Examples


example(tximeta)
library(org.Dm.eg.db)	
se <- addIds(se, "REFSEQ", gene=FALSE)


mikelove/tximeta documentation built on Oct. 21, 2024, 5:46 a.m.