Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get gene info for zebrafish genes
# C.Savonen
# ALSF for CCDL
# 2019
# Purpose: Get gene info for Zebrafish/Human genes
# Replace 'Hs' with 'Dr' etc
columns(org.Hs.eg.db::org.Hs.eg.db)
# Get ensembl genes
genes <- AnnotationDbi::keys(org.Hs.eg.db::org.Hs.eg.db, "ENSEMBL")
# Retrieve transcripts for those
gene_info <- AnnotationDbi::select(org.Hs.eg.db::org.Hs.eg.db, keys = genes,
columns = c("ONTOLOGY", "GO"),
keytype = "ENSEMBL")
# Write to tsv file
readr::write_tsv(gene_info, "human_genes_info.tsv", col_names = FALSE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment