Bioconductor / AnnotationForge

Tools for building SQLite-based annotation data packages
https://bioconductor.org/packages/AnnotationForge
4 stars 9 forks source link

makeOrgPackageFromNCBI: Error in h(simpleError(msg, call)) #33

Open phoebee-h opened 2 years ago

phoebee-h commented 2 years ago

Hi, Thank you all for developing this tool and appreciated for the kindly reply. I have asked a question before (https://github.com/Bioconductor/AnnotationForge/issues/29) which came with an additional advice as to my original question: try "makeOrgPackageFromNCBI" since the organism was well-annotated in NCBI. Indeed, it works fine with the first try, but when I create another orgdb and reuse the files as previous downloaded, it shows the error. A similar question has been asked before (https://github.com/Bioconductor/AnnotationForge/issues/25), but was not exactly solved according to the error.

AnnotationForge::makeOrgPackageFromNCBI(version = "0.1",
                       author = "PHOEBE <xxx@xxx.com>",
                       maintainer = "PHOEBE <xxx@xxx.com>",
                       outputDir = ".",
                       tax_id = "4530",
               rebuildCache = FALSE,
                       genus = "Oryza",
                       species = "sativa")

image

image

In addition to the error, I am also curious about the function "makeOrgPackageFromNCBI" (1) What info would be required for a certain species? (Just checking tax_id exists in "gene2accession.gz"?) How a GO column was filled even if this taxid not shown in "gene2go.gz"?

less zcat gene2go.gz | cut -f 1 | uniq  ## only 42 uniq tax_id

image

(2) When I checked with your the source code, wondering if the genus/species name affects in building step? What if it matches several names? Seem that it would grep the first one. https://github.com/Bioconductor/AnnotationForge/blob/c876e91870a708d07ec15bc4231c1c3ff46d2b7e/R/makeOrgPackageFromNCBI.R#L1401

taxdb <- GenomeInfoDb:::loadTaxonomyDb()
taxdb[taxdb$tax_id == "9940",]

image

Thank you in advance. Best regards. Phoebe