get_annotation_orgdb: Get an annotation data frame from org db packages

View source: R/get_annotation.R

get_annotation_orgdbR Documentation

Get an annotation data frame from org db packages

Description

Get an annotation data frame from org db packages

Usage

get_annotation_orgdb(dds, orgdb_species, idtype, key_for_genenames = "SYMBOL")

Arguments

dds

A DESeqDataSet() object

orgdb_species

Character string, named as the org.XX.eg.db package which should be available in Bioconductor

idtype

Character, the ID type of the genes as in the row names of dds, to be used for the call to mapIds()

key_for_genenames

Character, corresponding to the column name for the key in the orgDb package containing the official gene name (often called gene symbol). This parameter defaults to "SYMBOL", but can be adjusted in case the key is not found in the annotation package (e.g. for org.Sc.sgd.db).

Value

A data frame for ready use in pcaExplorer, retrieved from the org db packages

Examples

library("airway")
data("airway", package = "airway")
airway
dds_airway <- DESeq2::DESeqDataSetFromMatrix(assay(airway),
                                             colData = colData(airway),
                                             design = ~dex+cell)
anno_df <- get_annotation_orgdb(dds_airway, "org.Hs.eg.db", "ENSEMBL")
head(anno_df)

federicomarini/pcaExplorer documentation built on Sept. 29, 2024, 9:31 p.m.