knitr::opts_chunk$set( cache = FALSE, echo = TRUE, message = FALSE, warning = FALSE) library(annotables)
Provides tables for converting and annotating Ensembl Gene IDs.
This is an R package.
source("https://bioconductor.org/biocLite.R") biocLite("stephenturner/annotables")
install.packages("devtools") devtools::install_github("stephenturner/annotables")
Many bioinformatics tasks require converting gene identifiers from one convention to another, or annotating gene identifiers with gene symbol, description, position, etc. Sure, biomaRt does this for you, but I got tired of remembering biomaRt syntax and hammering Ensembl's servers every time I needed to do this.
This package has basic annotation information from r ensembl_version
for:
grch38
)grch37
)grcm38
)rnor6
)galgal5
)wbcel235
)bdgp6
)Where each table contains:
ensgene
: Ensembl gene IDentrez
: Entrez gene IDsymbol
: Gene symbolchr
: Chromosomestart
: Startend
: Endstrand
: Strandbiotype
: Protein coding, pseudogene, mitochondrial tRNA, etc.description
: Full gene name/descriptionAdditionally, there are tx2gene
tables that link Ensembl gene IDs to Ensembl transcript IDs.
library(annotables)
Look at the human genes table (note the description column gets cut off because the table becomes too wide to print nicely):
grch38
Look at the human genes-to-transcripts table:
grch38_tx2gene
Tables are saved in tibble format, pipe-able with dplyr:
grch38 %>% dplyr::filter(biotype == "protein_coding" & chr == "1") %>% dplyr::select(ensgene, symbol, chr, start, end, description) %>% head %>% knitr::kable(.)
Example with DESeq2 results from the airway package, made tidy with biobroom:
library(DESeq2) library(airway) data(airway) airway <- DESeqDataSet(airway, design = ~cell + dex) airway <- DESeq(airway) res <- results(airway) # tidy results with biobroom library(biobroom) res_tidy <- tidy.DESeqResults(res) head(res_tidy)
res_tidy %>% dplyr::arrange(p.adjusted) %>% head(20) %>% dplyr::inner_join(grch38, by = c("gene" = "ensgene")) %>% dplyr::select(gene, estimate, p.adjusted, symbol, description) %>% knitr::kable(.)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.