Contributions icon indicating copy to clipboard operation
Contributions copied to clipboard

BREW3R.r

Open lldelisle opened this issue 1 year ago • 22 comments

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

  • Repository: https://github.com/lldelisle/BREW3R.r

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

  • [X] I understand that by submitting my package to Bioconductor, the package source and all review commentary are visible to the general public.

  • [X] I have read the Bioconductor Package Submission instructions. My package is consistent with the Bioconductor Package Guidelines.

  • [X] I understand Bioconductor Package Naming Policy and acknowledge Bioconductor may retain use of package name.

  • [X] I understand that a minimum requirement for package acceptance is to pass R CMD check and R CMD BiocCheck with no ERROR or WARNINGS. Passing these checks does not result in automatic acceptance. The package will then undergo a formal review and recommendations for acceptance regarding other Bioconductor standards will be addressed.

  • [X] My package addresses statistical or bioinformatic issues related to the analysis and comprehension of high throughput genomic data.

  • [X] I am committed to the long-term maintenance of my package. This includes monitoring the support site for issues that users may have, subscribing to the bioc-devel mailing list to stay aware of developments in the Bioconductor community, responding promptly to requests for updates from the Core team in response to changes in R or underlying software.

  • [X] I am familiar with the Bioconductor code of conduct and agree to abide by it.

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

  • [X] The 'devel' branch for new packages and features.
  • [X] The stable 'release' branch, made available every six months, for bug fixes.
  • [X] Bioconductor version control using Git (optionally via GitHub).

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.

lldelisle avatar Feb 21 '24 20:02 lldelisle

Hi @lldelisle

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: BREW3R.r
Type: Package
Title: R package associated to BREW3R
Version: 0.99.0
Authors@R: 
    person(given = "Lucille",
 family = "Lopez-Delisle",
 role = c("aut", "cre"),
 email = "[email protected]",
 comment = c(ORCID = "0000-0002-1964-4960"))
Description: This R package provide functions that are used in the BREW3R
    workflow. This mainly contains a function that extend a gtf as GRanges using
    information from another gtf (also as GRanges). The process allows to extend
    gene annotation without increasing the overlap between gene ids.
License: GPL-3
Encoding: UTF-8
LazyData: false
RoxygenNote: 7.3.1
Imports:
    dplyr,
    GenomicRanges,
    methods,
    S4Vectors,
    tidyselect,
    utils
Suggests: 
    testthat (>= 3.0.0),
    IRanges,
    knitr,
    rmarkdown,
    BiocStyle,
    rtracklayer
biocViews:
    GenomeAnnotation
Config/testthat/edition: 3
URL: https://github.com/lldelisle/BREW3R.r
BugReports: https://github.com/lldelisle/BREW3R.r/issues/
VignetteBuilder: knitr

bioc-issue-bot avatar Feb 21 '24 20:02 bioc-issue-bot

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 avatar Feb 26 '24 16:02 bioc-issue-bot

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): BREW3R.r_0.99.0.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 [email protected]:packages/BREW3R.r to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot avatar Feb 26 '24 16:02 bioc-issue-bot

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 avatar Mar 04 '24 14:03 bioc-issue-bot

Hi @lldelisle

Thank you for your submission. Please see the review below.

Best regards, Marcel


BREW3R.r

  • Overall, the package looks good. It looks like the range operations rely heavily on the tidyverse which is not really designed for that in mind. Consider using methods in GenomicRanges that may help the code be more robust.

DESCRIPTION

  • Looks good.

NAMESPACE

  • Minor: Consider using the native pipe over dplyr::'%>%'.

vignettes

  • Keep the text at a max 80 character width. IMO, it is easier to review and maintain.
  • Avoid mentioning devtools in the vignette. Simply use BiocManager with a username/repo character input.
  • Consider adding mustWork = TRUE argument to system.file calls
  • Consider providing a verbose = FALSE default to the extend_granges function. Prioritize informative text and remove text e.g., "Extend last exons.", "Extending them.", etc.
  • Load GenomicRanges in the vignette and avoid using GenomicRanges:: qualifiers.
  • Use runValue on the Rle to extract the character strand value, e.g., runValue(strand(gene_after[1])) and add one to the output i.e., (x == "+") + 1 instead of using if ... else (seen in plotting chunks).

R

  • Consider using @importFrom GenomicRanges ... to import functions such as strand, start()<-, etc.
  • Consider reducing the cyclomatic complexity of the extend_granges function currently it is at a value of 16: cyclocomp::cyclocomp(extend_granges)
  • Have you considered using intra-range methods from GenomicRanges, e.g., flank, resize, shift etc. It seems like those could be useful and robust operations.

tests

Coverage looks good:

covr::package_coverage()
BREW3R.r Coverage: 89.71%
R/extend_granges.R: 76.29%
R/helpers.R: 92.23%

LiNk-NY avatar Mar 27 '24 16:03 LiNk-NY

Thank you very much for your review. I have started to adress your points in https://github.com/lldelisle/BREW3R.r/pull/1

  • For the verbose, I decided to include 3 levels of verbose with default set to 1 with only stats. The problem is that with large gtf the function can be very long, it can be useful to have messages that indicates the progression.
  • The cyclomatic complexity seems to be directly linked to the optional messages that display progression. I would prefer to keep these, is it ok for you?

I am trying to strongly reduce the usage of tidyverse in favor of resize etc... but this needs a lot of rethinking.

lldelisle avatar Mar 29 '24 16:03 lldelisle

Hi Lucille, @lldelisle

Please consider this resource for working with verbosity: https://ropensci.org/blog/2024/02/06/verbosity-control-packages/ Usually, a package-wide option (along with a wrapper function provided by e.g., rlang, cli, futile.logger, etc.) is preferred and as a side-effect, it will cut down on the number of conditional statements.

-Marcel

LiNk-NY avatar Apr 02 '24 15:04 LiNk-NY

Hi @LiNk-NY , Thank you very much for the tip. I have included this, see https://github.com/lldelisle/BREW3R.r/pull/1/commits/661e9bc002fcd6abf5b3e4cdf08e4b3b47a5d425 So I converted my verbose = 1 to rlang::inform, my verbose = 2 to a new function progression_msg and debug to debug_msg. But this did not decreased the cyclomatic complexity as my function progression_msg has a conditional statement inside...

Except from that my PR contains a new version which do not use dplyr anymore. Do you want to review my PR or should I merge it and then you review?

lldelisle avatar Apr 02 '24 22:04 lldelisle

But this did not decreased the cyclomatic complexity as my function progression_msg has a conditional statement inside...

Hi Lucille, @lldelisle Thank you for making those changes. The improvement can be seen via:

> cyclocomp::cyclocomp(expr=BREW3R.r::extend_granges)
[1] 4

It looks good!

Please merge first and I can follow up with the review.

-Marcel

LiNk-NY avatar Apr 02 '24 22:04 LiNk-NY

I have merged.

lldelisle avatar Apr 03 '24 07:04 lldelisle

Hi Lucille, @lldelisle Have you pushed your changes to git.bioconductor.org? Best, Marcel

LiNk-NY avatar Apr 03 '24 19:04 LiNk-NY

Please make sure that the global variables are accounted for. See the NOTE:

* checking R code for possible problems ... NOTE
add_new_exons: no visible binding for global variable ‘transcript_id’
add_new_exons: no visible binding for global variable ‘start’
add_new_exons: no visible binding for global variable
  ‘three_prime_query’
add_new_exons: no visible binding for global variable ‘end’
add_new_exons: no visible binding for global variable ‘exon_number’
adjust_for_collision: no visible binding for global variable
  ‘old_width’
adjust_for_collision: no visible binding for global variable ‘width’
extend_granges: no visible binding for global variable ‘type’
extend_granges: no visible binding for global variable ‘id’
extend_using_overlap: no visible binding for global variable ‘type’
extract_last_exon: no visible binding for global variable ‘type’
filter_new_exons: no visible binding for global variable
  ‘collision_base’
filter_new_exons: no visible binding for global variable ‘start’
filter_new_exons: no visible binding for global variable ‘end’
overlap_different_genes: no visible binding for global variable
  ‘query_gene_id’
overlap_different_genes: no visible binding for global variable
  ‘subject_gene_id’
Undefined global functions or variables:
  collision_base end exon_number id old_width query_gene_id start
  subject_gene_id three_prime_query transcript_id type width
Consider adding
  importFrom("stats", "end", "start")

You can use with() inside of a subset function to avoid the NOTE e.g.,

subset(mtcars, with(mtcars, mpg > 20))
  • There are some typos in the argument names. See groupping_variable in the ~extend_last_exon~ extract_last_exon function.

All else looks good. Please bump the version and push to git.bioconductor.org for another build and check. Thanks, -Marcel

LiNk-NY avatar Apr 03 '24 20:04 LiNk-NY

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

bioc-issue-bot avatar Apr 03 '24 20:04 bioc-issue-bot

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): BREW3R.r_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 [email protected]:packages/BREW3R.r to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot avatar Apr 03 '24 20:04 bioc-issue-bot

Indeed they are all within a subset... Thanks for the typo, I will fix them tomorrow. groupping should be grouping, right? And extend last exon? should be exons?

lldelisle avatar Apr 03 '24 20:04 lldelisle

groupping should be grouping, right?

Yes

And extend last exon? should be exons?

Sorry, I meant to type extract_last_exon as the name of the function where groupping_variable is an argument. But it does seem like the function should also be plural as the documentation title suggests.

LiNk-NY avatar Apr 03 '24 20:04 LiNk-NY

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

bioc-issue-bot avatar Apr 04 '24 07:04 bioc-issue-bot

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): BREW3R.r_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 [email protected]:packages/BREW3R.r to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot avatar Apr 04 '24 07:04 bioc-issue-bot

Hi @LiNk-NY , I fixed the 2 typos and used with in the subset to avoid the NOTE about the undefined variables. Are you happy with my changes. Or do I need to change something else? Thanks

lldelisle avatar Apr 08 '24 09:04 lldelisle

Hi @lldelisle , Thank you for making those changes. The package has been accepted. Best regards, Marcel

LiNk-NY avatar Apr 08 '24 13:04 LiNk-NY

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.

bioc-issue-bot avatar Apr 08 '24 13:04 bioc-issue-bot

Thanks

lldelisle avatar Apr 08 '24 13:04 lldelisle

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/lldelisle.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("BREW3R.r"). The package 'landing page' will be created at

https://bioconductor.org/packages/BREW3R.r

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.

lshep avatar Apr 16 '24 12:04 lshep