Bioconductor / AnnotationForge

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

Dont delete template man dir #2

Closed martinholub closed 4 years ago

martinholub commented 5 years ago
hpages commented 5 years ago

@martinholub Thanks for the pull request. Can you provide some context and motivation for it? What issue it addresses, was the issue discussed somewhere, how it can be reproduced etc... Thanks!

martinholub commented 5 years ago

Hi @hpages ,

the small change was done because the function would always try to access doc_template_names variable, although it may not have been created in the first place. Addiitonally, the template man pages in the install location of AnnotationForge would be deleted upon calling makeAnnDbPkg. This indeed could not have been desired behavior.

You can reproduce it with:

  dbdir <- "somedir"
  orgdb_name <- "somename"
  tax_id <- "1234" # NCBI taxonomy ID, pick a correct one
  orgdb <- OrganismDbi:::.taxIdToOrgDb(tax_id)

  db_path_sqlite <- file.path(dbdir, paste0(orgdb_name, ".sqlite"))
  file.copy(orgdb$conn@dbname, db_path_sqlite)

  mdata <- AnnotationDbi::metadata(orgdb)
  seed <- new("AnnDbPkgSeed",
              Package= paste0(orgdb_name, ".db"),
              Version="0.0.1",
              Author="me",
              Maintainer="you",
              PkgTemplate="NOSCHEMA.DB",
              AnnObjPrefix=orgdb_name,
              organism = mdata$value[mdata$name == "ORGANISM"],
              species = mdata$value[mdata$name == "SPECIES"],
              biocViews = "annotation",
              manufacturerUrl = "none",
              manufacturer = "none",
              chipName = "none")

AnnotationForge::makeAnnDbPkg(seed, db_path_sqlite, dest_dir = dbdir, no.man = TRUE)

where no.man can be T or F.

I am not aware of this being discussed somewhere else.

dvantwisk commented 5 years ago

Hi @martinholub,

I've been looking at your proposed change and I thank you for pointing out this issue. I do ask, however, that a few things about this push request be changed:

dvantwisk commented 5 years ago

@martinholub Did you still want to pursue this pull request?

martinholub commented 5 years ago

Sorry, Things have been busy on my side lately. Yeah, I would like to finish it, will try to do it soon. Thanks for patience.

martinholub commented 5 years ago

Hi @dvantwisk ,

I made the changes you asked for. Hope this closes the PR.

dvantwisk commented 4 years ago

Sorry this took so long. The changes seem good, I will merge the pull request now.