buildEntrezGeneDb {AnnotationDbi}R Documentation

builds an Entrez Gene centric organism database

Description

These functions contact the NCBI eutils web services and then construct an organism (org.Xx.eg.db) database.

Usage

  getGeneStuff(entrezGenes, dir="files")
  buildEntrezGeneDb(entrezGenes, file="test.sqlite")
  getEntrezGenesFromTaxId(taxId)

Arguments

entrezGenes character vector of entrez Gene IDs that you want annotated. We presently check to make sure these are from the same species. You will get an error if they aren't.
file file to write the database to. Traditionally these end with the .sqlite extension.
dir directory for storing parsed XML.
taxId A taxonomy ID from NCBI. You can browse these to select the species of interest from their website.

Value

In the case of getEntrezGenesFromTaxId, this will be a character vector of entrez gene IDs. In the case of buildEntrezGeneDb, then you will produce a SQLite database. In the case of getGeneStuff, then you get back a list of named lists containing parsed XML values for each 800 long chunk of entrez Gene IDs.

Examples

  ## seems that some of the EGs are not from the taxid specified? (more tests)
  ## EGs <- getEntrezGenesFromTaxId(taxId)
  ## temporarily, lets use known EGs to run tests
  #library(org.Hs.eg.db)
  #EGs <- Lkeys(org.Hs.egCHR)
  #EGs <- EGs[c(1:10)] ## Obviously NOT a typical step.
  ## XML is broken, so I need a workaround for this.
  #system.time(buildEntrezGeneDb(EGs,file=tempfile()))

  #debug(getGeneStuff)
  #buildEntrezGeneDb(EGs,file=tempfile())

[Package AnnotationDbi version 1.14.1 Index]