Get an annotation data frame from biomaRt

get_annotation(dds, biomart_dataset, idtype)

Arguments

dds

A DESeq2::DESeqDataSet() object

biomart_dataset

A biomaRt dataset to use. To see the list, type mart = useMart('ensembl'), followed by listDatasets(mart).

idtype

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

Value

A data frame for ready use in pcaExplorer, retrieved from biomaRt.

Examples

library("airway")
data("airway", package = "airway")
airway
#> class: RangedSummarizedExperiment 
#> dim: 63677 8 
#> metadata(1): ''
#> assays(1): counts
#> rownames(63677): ENSG00000000003 ENSG00000000005 ... ENSG00000273492
#>   ENSG00000273493
#> rowData names(10): gene_id gene_name ... seq_coord_system symbol
#> colnames(8): SRR1039508 SRR1039509 ... SRR1039520 SRR1039521
#> colData names(9): SampleName cell ... Sample BioSample
dds_airway <- DESeq2::DESeqDataSetFromMatrix(assay(airway),
                                             colData = colData(airway),
                                             design = ~dex+cell)
if (FALSE) { # \dontrun{
get_annotation(dds_airway, "hsapiens_gene_ensembl", "ensembl_gene_id")
} # }