Bioconductor / Contributions

Contribute Packages to Bioconductor
131 stars 33 forks source link

UCSC.utils #3343

Closed hpages closed 2 months ago

hpages commented 3 months ago

Update the following URL to point to the GitHub repository of the package you wish to submit to Bioconductor

Confirm the following by editing each check box to '[x]'

I am familiar with the essential aspects of Bioconductor software management, including:

For questions/help about the submission process, including questions about the output of the automatic reports generated by the SPB (Single Package Builder), please use the #package-submission channel of our Community Slack. Follow the link on the home page of the Bioconductor website to sign up.

bioc-issue-bot commented 3 months ago

Hi @hpages

Thanks for submitting your package. We are taking a quick look at it and you will hear back from us soon.

The DESCRIPTION file for this package is:

Package: UCSC.utils
Title: Low-level utilities to retrieve data from the UCSC Genome Browser
Description: A set of low-level utilities to retrieve data from the UCSC
    Genome Browser. Most functions in the package access the data via
    the UCSC REST API but some of them query the UCSC MySQL server
    directly. Note that the primary purpose of the package is to support
    higher-level functionalities implemented in downstream packages
    like GenomeInfoDb or txdbmaker.
biocViews: Infrastructure, GenomeAssembly, Annotation, GenomeAnnotation,
    DataImport
URL: https://bioconductor.org/packages/UCSC.utils
BugReports: https://github.com/Bioconductor/UCSC.utils/issues
Version: 0.99.0
License: Artistic-2.0
Encoding: UTF-8
Authors@R: person("Hervé", "Pagès", role=c("aut", "cre"),
              email="hpages.on.github@gmail.com")
Imports: methods, stats, httr, rjson, S4Vectors
Suggests: DBI, RMariaDB, GenomeInfoDb, testthat, knitr, rmarkdown, BiocStyle
VignetteBuilder: knitr
bioc-issue-bot commented 3 months ago

Your package has been added to git.bioconductor.org to continue the pre-review process. A build report will be posted shortly. Please fix any ERROR and WARNING in the build report before a reviewer is assigned or provide a justification on why you feel the ERROR or WARNING should be granted an exception.

IMPORTANT: Please read this documentation for setting up remotes to push to git.bioconductor.org. All changes should be pushed to git.bioconductor.org moving forward. It is required to push a version bump to git.bioconductor.org to trigger a new build report.

Bioconductor utilized your github ssh-keys for git.bioconductor.org access. To manage keys and future access you may want to active your Bioconductor Git Credentials Account

bioc-issue-bot commented 3 months ago

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

Congratulations! The package built without errors or warnings on all platforms.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: Linux (Ubuntu 22.04.3 LTS): UCSC.utils_0.99.1.tar.gz

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to git@git.bioconductor.org:packages/UCSC.utils to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 3 months ago

A reviewer has been assigned to your package for an indepth review. Please respond accordingly to any further comments from the reviewer.

bioc-issue-bot commented 3 months ago

Received a valid push on git.bioconductor.org; starting a build for commit id: 95c7183f389888893b00a4cd2943cf152b05421a

bioc-issue-bot commented 3 months ago

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

Congratulations! The package built without errors or warnings on all platforms.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: Linux (Ubuntu 22.04.3 LTS): UCSC.utils_0.99.2.tar.gz

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to git@git.bioconductor.org:packages/UCSC.utils to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

LiNk-NY commented 3 months ago

Hi Hervé, @hpages

Thank you for your submission. See the review below.

Best regards, Marcel


UCSC.utils

DESCRIPTION

NAMESPACE

UCSC.utils:::.API_query(
    "getData/track",
    query = list(genome = "mm9", track = "cytoBandIdeo"),
    api.url = UCSC.utils::UCSC.api.url()
) |>
    httr::content(as = "text", encode = "UTF-8") |>
    jsonlite::fromJSON()

vignettes

R

tests

> covr::package_coverage(type="all")
UCSC.utils Coverage: 90.06%
R/zzz.R: 0.00%
R/00utils.R: 20.00%
R/UCSC.api.url.R: 77.78%
R/REST_API.R: 84.31%
R/fetch_UCSC_track_data.R: 84.62%
R/UCSC_dbselect.R: 87.50%
R/list_UCSC_genomes.R: 94.37%
R/get_UCSC_chrom_sizes.R: 95.45%
R/list_UCSC_tracks.R: 98.77%
bioc-issue-bot commented 3 months ago

Received a valid push on git.bioconductor.org; starting a build for commit id: aabc641d9be01032c8c4fe1133b1295e50382caf

bioc-issue-bot commented 3 months ago

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

Congratulations! The package built without errors or warnings on all platforms.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: Linux (Ubuntu 22.04.3 LTS): UCSC.utils_0.99.3.tar.gz

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to git@git.bioconductor.org:packages/UCSC.utils to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

hpages commented 3 months ago

Thanks Marcel for suggesting to switch to jsonlite::fromJSON(). The fact that it automatically turns JSON tabular data into a data frame is a nice feature. UCSC's JSON is quite messy though so some data massaging and sanity checks will still be needed even after the switch. This will require some extensive testing.

bioc-issue-bot commented 3 months ago

Received a valid push on git.bioconductor.org; starting a build for commit id: f82b56085c3dcd5448778eb040ba0c20fc831312

bioc-issue-bot commented 3 months ago

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

Congratulations! The package built without errors or warnings on all platforms.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: Linux (Ubuntu 22.04.3 LTS): UCSC.utils_0.99.4.tar.gz

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to git@git.bioconductor.org:packages/UCSC.utils to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

hpages commented 3 months ago

Switch from rjson::fromJSON to jsonlite::fromJSON done in UCSC.utils 0.99.4 (see https://github.com/Bioconductor/UCSC.utils/commit/f82b56085c3dcd5448778eb040ba0c20fc831312).

Consider using httr::stop_for_status to check for errors.

Done.

Note that both httpcache and httr2 provide caching mechanisms.

That's good to know. However doing my own caching is very easy and the caching facilities that these packages bring to the table don't have enough value to justify introducing a new dependency or switching from httr to httr2. Also I'm caching the parsed JSON, or a transformed version of it, not the raw HTTP response.

Thanks again for your feedback.

H.

LiNk-NY commented 2 months ago

Thanks Hervé @hpages I tried to run the example in the comments and got an error in R/REST_API.R. It looks like json_string should be text instead. See the diff:

diff --git a/R/REST_API.R b/R/REST_API.R
index 608c15b..1891f06 100644
--- a/R/REST_API.R
+++ b/R/REST_API.R
@@ -20,7 +20,7 @@
     json_string <- content(response, as="text", encoding="UTF-8")
     stopifnot(is.character(json_string), length(json_string) == 1L)
     if (is.na(json_string)) {
-        json_string <- content(response, as="json_string",
+        json_string <- content(response, as="text",
                                encoding="Windows-1252")
         stopifnot(isSingleString(json_string))
     }

FWIW: Here is the example:

    query <- list(genome="eboVir3", track="iedbBcell")
    .API_query("getData/track", query=query)
bioc-issue-bot commented 2 months ago

Received a valid push on git.bioconductor.org; starting a build for commit id: 486d43624f3f50a5ed75aa902790a887ad6553bd

bioc-issue-bot commented 2 months ago

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

Congratulations! The package built without errors or warnings on all platforms.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: Linux (Ubuntu 22.04.3 LTS): UCSC.utils_0.99.5.tar.gz

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to git@git.bioconductor.org:packages/UCSC.utils to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

hpages commented 2 months ago

arghh.. thanks for the eagle eyes!

Fixed in UCSC.utils 0.99.5

LiNk-NY commented 2 months ago

Hi Hervé, @hpages

Thank you for making the change. Your package has been accepted.

Best regards, Marcel

bioc-issue-bot commented 2 months ago

Your package has been accepted. It will be added to the Bioconductor nightly builds.

Thank you for contributing to Bioconductor!

Reviewers for Bioconductor packages are volunteers from the Bioconductor community. If you are interested in becoming a Bioconductor package reviewer, please see Reviewers Expectations.

lshep commented 2 months ago

The default branch of your GitHub repository has been added to Bioconductor's git repository as branch devel.

To use the git.bioconductor.org repository, we need an 'ssh' key to associate with your github user name. If your GitHub account already has ssh public keys (https://github.com/hpages.keys is not empty), then no further steps are required. Otherwise, do the following:

  1. Add an SSH key to your github account
  2. Submit your SSH key to Bioconductor

See further instructions at

https://bioconductor.org/developers/how-to/git/

for working with this repository. See especially

https://bioconductor.org/developers/how-to/git/new-package-workflow/ https://bioconductor.org/developers/how-to/git/sync-existing-repositories/

to keep your GitHub and Bioconductor repositories in sync.

Your package will be included in the next nigthly 'devel' build (check-out from git at about 6 pm Eastern; build completion around 2pm Eastern the next day) at

https://bioconductor.org/checkResults/

(Builds sometimes fail, so ensure that the date stamps on the main landing page are consistent with the addition of your package). Once the package builds successfully, you package will be available for download in the 'Devel' version of Bioconductor using BiocManager::install("UCSC.utils"). The package 'landing page' will be created at

https://bioconductor.org/packages/UCSC.utils

If you have any questions, please contact the bioc-devel mailing list (https://stat.ethz.ch/mailman/listinfo/bioc-devel); this issue will not be monitored further.