Bioconductor / Contributions

Contribute Packages to Bioconductor
134 stars 33 forks source link

lemur #3152

Closed const-ae closed 11 months ago

const-ae commented 1 year 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 1 year ago

Hi @const-ae

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: lemur
Type: Package
Title: Latent Embedding Multivariate Regression
Version: 0.99.1
Authors@R: person("Constantin", "Ahlmann-Eltze", email = "artjom31415@googlemail.com", 
     role = c("aut", "cre"), comment = c(ORCID = "0000-0002-3762-068X"))
Description: Fit a latent embedding multivariate regression (LEMUR) model to multi-condition
  single-cell data. The model provides a parametric description of single-cell data measured
  with complex experimental designs. The parametric model is used to (1) align conditions, (2) predict
  log fold changes between conditions for all cells, and (3) identify cell neighborhoods with 
  consistent log fold changes. For those neighborhoods, a pseudobulked differential expression test
  is conducted to assess which genes are significantly changed.
URL: https://github.com/const-ae/lemur
BugReports: https://github.com/const-ae/lemur/issues
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: false
Imports: 
    stats,
    utils,
    irlba,
    methods,
    SingleCellExperiment,
    SummarizedExperiment,
    rlang,
    vctrs,
    glmGamPoi (>= 1.12.0),
    BiocGenerics,
    S4Vectors,
    Matrix,
    DelayedMatrixStats,
    HDF5Array,
    MatrixGenerics,
    matrixStats,
    Rcpp,
    harmony,
    limma,
    BiocNeighbors
Suggests: 
    testthat (>= 3.0.0),
    tidyverse,
    uwot,
    dplyr,
    edgeR,
    knitr,
    rmarkdown
LinkingTo: 
    Rcpp,
    RcppArmadillo
Depends: 
    R (>= 4.1)
Config/testthat/edition: 3
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
biocViews: Transcriptomics, DifferentialExpression, SingleCell, DimensionReduction, Regression
VignetteBuilder: knitr
const-ae commented 1 year ago

I tried to fix all R CMD check / BiocCheck::BiocCheck() warnings and errors, but there are still still a couple of notes, which I want to explain here:

R CMD check results: 2 NOTES:

❯ checking top-level files ... NOTE Non-standard file/directory found at top level: ‘README.Rmd’

This file is necessary to share code between the README and the vignette.

❯ checking dependencies in R code ... NOTE Unexported objects imported by ':::' calls: ‘S4Vectors:::disableValidity’ ‘SingleCellExperiment:::.convert_subset_index’ See the note in ?::: about the use of this operator.

The use of S4Vectors:::disableValidity follows the example provided in the vignette on extending SummarizedExperiment.

The use of convert_subset_index mirrors the subsetting function from SingleCellExperiment. I did it to avoid code duplication. I could copy the source of that function, but note that convert_subset_index in turn calls a private method from SummarizedExperiment.

BiocCheck results: 11 NOTES

NOTE: Update R version dependency from 4.1 to 4.3.0.

I don't use any features introduced after 4.1 and I would like to keep the possibility open for people on older R versions to install the package using devtools::install_github()

NOTE: Consider adding these automatically suggested biocViews: ExperimentalDesign, Alignment

I don't think these would be helpful terms.

Checking coding practice...

  • NOTE: Avoid sapply(); use vapply()
  • NOTE: Avoid 1:...; use seq_len() or seq_along()
  • NOTE: Avoid redundant 'stop' and 'warn*' in signal conditions

I only use sapply in one very narrowly defined function where I carefully check input and output. Similarly I only use the 1:... pattern if the end is not a variable (e.g., 1:3). I think in such cases the short hand notation is appropriate and more readable than the alternative with seq_len().

NOTE: Avoid 'suppressWarnings'/'*Messages' if possible (found 1 times)

I do this once, in order to hide expected warnings from limma.

NOTE: The recommended function length is 50 lines or less. There are 13 functions greater than 50 lines. NOTE: Consider shorter lines; 620 lines (13%) are > 80 characters long. NOTE: Consider multiples of 4 spaces for line indents; 1564 lines (34%) are not.

Fair comments, but I use a different coding style and hope this is acceptable.

NOTE: Consider adding runnable examples to man pages that document exported objects.

I think there is only one man page without a runnable example and that is the reexport of vars. I think here the example would create more confusion than help.

NOTE: Cannot determine whether maintainer is subscribed to the Bioc-Devel mailing list (requires admin credentials). Subscribe here: https://stat.ethz.ch/mailman/listinfo/bioc-devel

I am subscribed to the mailing list.

bioc-issue-bot commented 1 year 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 1 year ago

Dear Package contributor,

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

Your package has been built on the Bioconductor Build System.

On one or more platforms, the build results were: "ERROR". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.

Please see the build report for more details.

The following are build products from R CMD build on the Bioconductor Build System: Linux (Ubuntu 22.04.2 LTS): lemur_0.99.1.tar.gz macOS 12.6.5 Monterey: lemur_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/lemur to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

Dear Package contributor,

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

Your package has been built on the Bioconductor Build System.

On one or more platforms, the build results were: "ERROR". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.

Please see the build report for more details.

The following are build products from R CMD build on the Bioconductor Build System: Linux (Ubuntu 22.04.2 LTS): lemur_0.99.2.tar.gz macOS 12.6.5 Monterey: lemur_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/lemur to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

Dear Package contributor,

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

Your package has been built on the Bioconductor Build System.

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 Bioconductor Build System: Linux (Ubuntu 22.04.2 LTS): lemur_0.99.3.tar.gz macOS 12.6.5 Monterey: lemur_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/lemur to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

Dear Package contributor,

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

Your package has been built on the Bioconductor Build System.

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 Bioconductor Build System: Linux (Ubuntu 22.04.2 LTS): lemur_0.99.4.tar.gz macOS 12.6.5 Monterey: lemur_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/lemur to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

lshep commented 12 months ago

If you want to have the README and vignette the same please have the vignette be the full text and code and either symlink or child the README from the vignette. Here is an example https://github.com/mtmorgan/rjsoncons/tree/main/inst/scripts . The vignette should be complete. Please update before we assign a reviewer

bioc-issue-bot commented 12 months ago

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

const-ae commented 12 months ago

Thanks for the feedback and providing the convenient example. I changed the content of the vignette and README.Rmd accordingly (https://github.com/const-ae/lemur/commit/0a76099de194bd7f22d26f331956d11ce3318c55)

bioc-issue-bot commented 12 months ago

Dear Package contributor,

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

Your package has been built on the Bioconductor Build System.

On one or more platforms, the build results were: "ERROR, skipped". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.

Please see the build report for more details.

The following are build products from R CMD build on the Bioconductor Build System: ERROR before build products produced.

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/lemur to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

const-ae commented 12 months ago

Harmony got updated on CRAN last week, including some breaking changes (https://cran.r-project.org/web/packages/harmony/NEWS). I will try to fix my calls to their functions ASAP.

bioc-issue-bot commented 12 months ago

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

bioc-issue-bot commented 12 months ago

Dear Package contributor,

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

Your package has been built on the Bioconductor Build System.

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 Bioconductor Build System: Linux (Ubuntu 22.04.2 LTS): lemur_0.99.6.tar.gz macOS 12.6.5 Monterey: lemur_0.99.6.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/lemur to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

const-ae commented 12 months ago

Harmony got updated on CRAN last week, including some breaking changes (https://cran.r-project.org/web/packages/harmony/NEWS). I will try to fix my calls to their functions ASAP.

I fixed the problems introduced by harmony's update.

bioc-issue-bot commented 12 months ago

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

jianhong commented 11 months ago

Package 'lemur' Review

Thank you for submitting your package to Bioconductor. The package passed check and build. It is in pretty good shape. However there are several things need to be fixed. Please try to answer the comments line by line when you are ready for a second review. Code: Note: please consider; Important: must be addressed.

The DESCRIPTION file

R code

bioc-issue-bot commented 11 months ago

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

const-ae commented 11 months ago

Thank you for the extensive feedback.

Please find my point-by-point response below:


The DESCRIPTION file Important: R version should be no less than 4.3

Fixed.

Note: vapply instead of sapply. In file R/util.R: at line 86 found ' res <- sapply(x, FUN, ...)'

I only use sapply in one very narrowly defined function where I carefully check input and output.

Important: No paste in message(), message, stop. Please move the paste\0 outside. In file R/geodesic_regression.R: at line 25 found ' stop("Cannot handle coordsystems of type: ", paste0(class(coordsystems), collapse = ", "))' In file R/handle_test_data_parameter.R: at line 31 found ' stop("Cannot handle 'indepdendet_data' of type: ", paste0(class(test_data), collapse = ", "))' In file R/parse_contrasts.R: at line 82 found ' stop("Setting the level of '", n, "' failed. You can only set the level of the following variables: ", paste0(covar, collapse = ", "))'

I think this NOTE is a false positive. I understand that message(paste0("Hello ", "world", "!")) is unnecessary. But here I used it to collapse some string: message("Hello ", paste0(1:3, collapse = "-")).

NOTE: :: and ::: is not suggested in source code unless you can make sure all the packages are imported. For :::, please try to ask the author to export the method or function. Some people think it is better to keep ::. However please note that you need to manully double check the import items when you make any change in the DESCRIPTION file during development. My recommendation is to remove one or two repeats to force the dependency check.

Using the :: notation to call functions from other packages is explicitly recommended in the R packages book.

I understand that calling private functions with ::: can be problematic, but my two use-cases follow documented examples:

The use of S4Vectors:::disableValidity follows the example provided in the vignette on extending SummarizedExperiment.

The use of convert_subset_index mirrors the subsetting function from SingleCellExperiment. I did it to avoid code duplication. I could copy the source of that function, but note that convert_subset_index in turn calls a private method from SummarizedExperiment.

Important: 1:n is not suggested in source code. Use seq_along or seq.int instead. In file R/find_de_neighborhoods.R: at line 277 found ' colnames <- c(colnames[1:3], "independent_indices", colnames[-(1:3)])' In file R/harmony_wrapper.R: at line 48 found ' harmony::RunHarmony(Y, rep(letters[1:2], length.out = 10), nclust = 2, max.iter = 0, return_object = TRUE, verbose = FALSE)' at line 50 found ' harmony::HarmonyMatrix(Y, rep(letters[1:2], length.out = 10), do_pca = FALSE, nclust = 2, max.iter.harmony = 0, return_object = TRUE)'

I only use the 1:... pattern if the end is not a variable (e.g., 1:3). I think in such cases the short hand notation is appropriate and more readable than the alternative with seq_len().

Important: Remove unused code.

Fixed. Thanks.

NOTE: Avoid 'suppressWarnings'/'*Messages' if possible In file R/bulk_de_wrappers.R: at line 40 found ' suppressWarnings({'

I need to use suppressWarnings to avoid an expected warning from limma about missing values.

To avoid the NOTE: Avoid redundant 'stop' and 'warn' in signal conditions in BioCheck, could you please change the word error to other word in

  • R/geodesic_regression.R (line 73, column 10)
  • R/geodesic_regression.R (line 77, column 10)
  • R/handle_design_parameter.R (line 97, column 12)
  • R/lemur.R (line 173, column 23)
  • R/lemur.R (line 193, column 13)

I fixed the error message in R/handle_design_parameter.R. The others are false positives.

NOTE: Functional programming: code repetition. Simplify the codes may help you to maintian the package.

I partially refactored my code to reduce redundancy.

Important: Please include Bioconductor installation instructions using BiocManager. rmd file vignettes/Introduction.Rmd

Fixed.

To avoid the '* NOTE: Consider adding runnable examples to man pages that document exported objects.' in BiocCheck, could you please add runnable examples to

  • reexports.Rd

I think having a runnable example on the reexports page would be more confusing than helpful.

C and Fortran code Important: remove the unused code.

Fixed. I removed the commented out cumz function.

bioc-issue-bot commented 11 months ago

Dear Package contributor,

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

Your package has been built on the Bioconductor Build System.

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 Bioconductor Build System: macOS 12.6.5 Monterey: lemur_0.99.8.tar.gz Linux (Ubuntu 22.04.2 LTS): lemur_0.99.8.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/lemur to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

const-ae commented 11 months ago

Hi @jianhong,

the deadline for packages to be included in the 3.18 release is today.

I have addressed all points in your review. Is there anything else I can do to make sure my package is included in the release?

Best, Constantin

const-ae commented 11 months ago

Hi @lshep,

first of all, sorry about being pushy; however, I would really like to see lemur included in the upcoming Bioconductor release. Jianhong's status indicates that he is currently busy, so I was wondering if you have any additional comments on what needs to be addressed before the package can be accepted into Bioconductor.

Best, Constantin

jianhong commented 11 months ago

@const-ae You still have one day to fix all the issue. Please try to make change accordingly even you think it is not important or it is false positive report. The target is that to remove the warning and note as much as possible during the BiocCheck. I will check it again tomorrow morning. Hope you will catch this release cycle.

const-ae commented 11 months ago

Thanks for the comment. I made the requested changes and explained them in this comment. Also the latest build report came in with no warnings.

jianhong commented 11 months ago

Please double check all the comments. As I said, even you think is is false positive report, If I marked as important, I hope I can see the changes. eg., you can add a runnable example to show to to load the data in the file reexports.Rd.

const-ae commented 11 months ago

Okay, thanks for the further explanation.

bioc-issue-bot commented 11 months ago

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

bioc-issue-bot commented 11 months ago

Dear Package contributor,

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

Your package has been built on the Bioconductor Build System.

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 Bioconductor Build System: Linux (Ubuntu 22.04.2 LTS): lemur_0.99.10.tar.gz macOS 12.6.5 Monterey: lemur_0.99.10.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/lemur to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 11 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 11 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/const-ae.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("lemur"). The package 'landing page' will be created at

https://bioconductor.org/packages/lemur

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.