Skip to content

Instantly share code, notes, and snippets.

@kozo2
Last active July 15, 2023 18:28
Show Gist options
  • Select an option

  • Save kozo2/6fdfcb96454fcb53d1d6 to your computer and use it in GitHub Desktop.

Select an option

Save kozo2/6fdfcb96454fcb53d1d6 to your computer and use it in GitHub Desktop.
tomato

I'm trying to create a custom OrgDb for tomato.

First I tried to add Uniprot table to the OrgDb with

https://github.com/kozo2/org.Sl.eg.db/blob/master/tomatoMakeOrgPkg.R

but I had an error like

https://gist.github.com/kozo2/528856852e372d74e429

May I ask for any advice?

I checked this error on R 3.2.2 + Annotation Forge 1.12.0 on Windows 10 and Mac OS X El Capitan‎.

You can reproduce this error with the following commands.

git clone git://github.com/kozo2/org.Sl.eg.db cd org.Sl.eg.db R

install.packages("splitstackshape") source("https://bioconductor.org/biocLite.R") biocLite("AnnotationForge") source("tomatoMakeOrgPkg.R")

links

> library(AnnotationForge)
> #makeOrgPackage(gene_info = fSym, chromosome = fChr, go = fGO,
> # this does NOT work
> makeOrgPackage(gene_info = fSym, chromosome = fChr, go = fGO, uniprot = fUniprot,
+ version = "0.1",
+ maintainer = "Kozo Nishida <knishida@riken.jp>",
+ author = "Kozo Nishida <knishida@riken.jp>",
+ outputDir = ".",
+ tax_id = "4081",
+ genus = "Solanum",
+ species = "lycopersicum",
+ goTable = "go")
Error in unique(unlist(unname(lapply(data, "[", "GID")))) :
error in evaluating the argument 'x' in selecting a method for function 'unique': Error in unlist(unname(lapply(data, "[", "GID"))) :
error in evaluating the argument 'x' in selecting a method for function 'unlist': Error in `[.data.table`(X[[i]], ...) :
When i is a data.table (or character vector), x must be keyed (i.e. sorted, and, marked as sorted) so data.table knows which columns to join to and take advantage of x being sorted. Call setkey(x,...) first, see ?setkey.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment