addIds: Add IDs to rowRanges of a SummarizedExperiment

Description Usage Arguments Value Examples

View source: R/addIds.R

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

1
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

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

tximeta documentation built on April 13, 2021, 6:01 p.m.