Skip to content

Instantly share code, notes, and snippets.

@tpoisot
Created January 7, 2014 21:31
Show Gist options
  • Save tpoisot/8307254 to your computer and use it in GitHub Desktop.
Save tpoisot/8307254 to your computer and use it in GitHub Desktop.
Automatic curation of the mangal DB : fill in NCBI IDs using taxize
library(rmangal)
library(taxize)
api = mangalapi(usr='tpoisot', pwd='nope, not telling you')
all_taxa = listTaxa(api)
for(tax in all_taxa)
{
identifier <- get_uid(tax$name, ask = FALSE)
if(! is.na(identifier)) tax$ncbi <- identifier[1]
patchTaxa(api, tax)
}
all_taxa = listTaxa(api)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment