Skip to content

Instantly share code, notes, and snippets.

@kozo2
Last active May 25, 2019 14:54
Show Gist options
  • Save kozo2/7312cfd0e4884fbbade59a0a7b078eb5 to your computer and use it in GitHub Desktop.
Save kozo2/7312cfd0e4884fbbade59a0a7b078eb5 to your computer and use it in GitHub Desktop.
# IPI data from ftp://ftp.ebi.ac.uk/pub/databases/IPI/last_release/current/ipi.genes.MOUSE.xrefs.gz
library(tidyverse)
ipi_genes_MOUSE <- read.delim("ipi.genes.MOUSE.xrefs", "\t", escape_double = FALSE, col_names = FALSE, trim_ws = TRUE, skip = 1)
ipi2ncbigene <- ipi_genes_MOUSE %>% select(9,10) %>%
separate(X9, into=c("NCBI_GENEID", "GENE_NAME")) %>%
separate_rows(X10) %>%
filter(X10 != "") %>%
drop_na(NCBI_GENEID) %>%
distinct()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment