Bioconductor / Contributions

Contribute Packages to Bioconductor
133 stars 33 forks source link

scMET: Bayesian modelling of DNA methylation heterogeneity at single-cell resolution #2585

Closed andreaskapou closed 2 years ago

andreaskapou commented 2 years 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 2 years ago

Hi @andreaskapou

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: scMET
Type: Package
Title: Bayesian modelling of cell-to-cell DNA methylation heterogeneity
Version: 0.99.0
Authors@R: 
    person(given = "Andreas C.",
 family = "Kapourani",
 role = c("aut", "cre"),
 email = "kapouranis.andreas@gmail.com",
 comment = c(ORCID = "0000-0003-2303-1953"))
Description: High-throughput single-cell measurements of DNA methylomes can 
    quantify methylation heterogeneity and uncover its role in gene regulation. 
    However, technical limitations and sparse coverage can preclude this task. 
    scMET is a hierarchical Bayesian model which overcomes sparsity, 
    sharing information across cells and genomic features to robustly 
    quantify genuine biological heterogeneity. scMET can identify highly 
    variable features that drive epigenetic heterogeneity, and perform 
    differential methylation and variability analyses. We illustrate how 
    scMET facilitates the characterization of epigenetically distinct cell 
    populations and how it enables the formulation of novel hypotheses on the 
    epigenetic regulation of gene expression.
License: GPL-3 | file LICENSE
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
Biarch: true
Depends: 
    R (>= 4.1.0)
Imports: 
    methods,
    Rcpp (>= 0.12.0),
    RcppParallel (>= 5.0.1),
    rstan (>= 2.18.1),
    rstantools (>= 2.1.0),
    VGAM,
    data.table,
    magrittr,
    MASS,
    logitnorm,
    ggplot2,
    matrixStats,
    assertthat,
    viridis,
    coda,
    BiocStyle,
    cowplot,
    stats
Suggests: 
    testthat,
    knitr,
    rmarkdown
LinkingTo: 
    BH (>= 1.66.0),
    Rcpp (>= 0.12.0),
    RcppEigen (>= 0.3.3.3.0),
    RcppParallel (>= 5.0.1),
    rstan (>= 2.18.1),
    StanHeaders (>= 2.18.0)
SystemRequirements: GNU make
biocViews: ImmunoOncology, 
    DNAMethylation,
    DifferentialMethylation,
      GeneExpression,
      GeneRegulation,
    Epigenetics,
      Genetics,
      Clustering,
      FeatureExtraction,
      Regression,
      Bayesian,
      Sequencing, 
      Coverage,
      SingleCell
VignetteBuilder: knitr
vjcitn commented 2 years ago

This is a very interesting submission.

suppressPackageStartupMessages(library(scMET))
suppressPackageStartupMessages(library(data.table))
suppressPackageStartupMessages(library(magrittr))
set.seed(123)

magrittr should not be needed insofar as R 4.1 includes |>. Also you have a particular format for single cell data and do not use Bioconductor's SingleCellExperiment class. This will increase efforts for users to transform the customary representation to your format. Please introduce converters or adapters or add code to accommodate this representation.

andreaskapou commented 2 years ago

Hi,

Thanks for the suggestions! I added conversion function going from scmet to SCE objects and vice versa. I also added a section in the vignette file to highlight this functionality! Bumped package version and pushed it on Github.

Bestm CAK

andreaskapou commented 2 years ago

Hi any update on this? Should I do any more changes? Since the deadline for new Bioconductor packages is ending soon. Thanks again!

lshep commented 2 years ago

The deadline for packages in the queue to make the release is end of April so there is still time. We will look at the package shortly.

vjcitn commented 2 years ago

Is this from your code?

## Chain 1: ------------------------------------------------------------
## Chain 1: EXPERIMENTAL ALGORITHM:
## Chain 1:   This procedure has not been thoroughly tested and may be unstable
## Chain 1:   or buggy. The interface is subject to change.
## Chain 1: ------------------------------------------------------------
## Chain 1: 

Do we want this at this stage?

andreaskapou commented 2 years ago

Hi, thanks for the update!

No, actually the message comes from rstan where my probabilistic model is built. They still consider their Variational inference procedure experimental (see here: https://mc-stan.org/rstan/reference/stanmodel-method-vb.html) and they show this message whenever the function is called. I am happy to keep this message showing to the user, until its removed from rstan.

Thanks.

bioc-issue-bot commented 2 years ago

A reviewer has been assigned to your package. Learn what to expect during the review process.

IMPORTANT: Please read this documentation for setting up remotes to push to git.bioconductor.org. It is required to push a version bump to git.bioconductor.org to trigger a new build.

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 2 years ago

Dear Package contributor,

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

Your package has been built on Linux, Mac, and Windows.

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

bioc-issue-bot commented 2 years ago

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

bioc-issue-bot commented 2 years ago

Dear Package contributor,

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

Your package has been built on Linux, Mac, and Windows.

On one or more platforms, the build results were: "WARNINGS, TIMEOUT". 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. This link will be 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/scMET to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 2 years ago

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

bioc-issue-bot commented 2 years ago

Dear Package contributor,

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

Your package has been built on Linux, Mac, and Windows.

On one or more platforms, the build results were: "WARNINGS". 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. This link will be 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/scMET to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

andreaskapou commented 2 years ago

Hi,

The package was built and there were no errors only a single warning from the BiocCheck build report, which I am not sure what it means:

* Checking Package Dependencies... Warning in system2(cmd, args, stdout = TRUE, stderr = FALSE, env = "R_DEFAULT_PACKAGES=NULL") : running command 'R_DEFAULT_PACKAGES=NULL '/Library/Frameworks/R.framework/Resources/bin/R' -q --vanilla --slave -f /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BiocCheck/script/checkBadDeps.R --args "/Users/pkgbuild/packagebuilder/workers/jobs/2585/7c83e86ea30a7a4ddce974da0bb582d1ec3d5c6a/scMET_0.99.4.tar.gz" "/var/folders/7y/c__3_48d5y18p1_rhfs_4x9c0000gt/T//RtmpTggVSV/file26656999e55/lib" 2>/dev/null' had status 1

I saw this error appeared in #2488 and you mentioned this was a bug in BiocCheck and now has been fixed. Could you let me know how should I proceed?

Thanks in advance!

Best, CAK

LiNk-NY commented 2 years ago

Hi @andreaskapou

Yes, this has been fixed in Bioconductor/BiocCheck@output which will be merged soon. You can ignore it. FYI, R has replaced mentions of --slave for the --no-echo flag.

Pete @PeteHaitch will provide a review in due time. Thanks Pete!

Best, Marcel

PeteHaitch commented 2 years ago

Hi @andreaskapou,

Thank you for submitting scMet to Bioconductor. I'm excited to see tools for analysing single-cell methylation data!

That said, I don't think @vjcitn's initial concern about usage of and interoperability with the core Bioconductor class for storing single-cell data (SingleCellExperiment) is adequately addressed in the current version. Before accepting the package, I think that the converter functions need to be re-designed (discussed below).

Longer term, I think having the main scMET function(s) accept a SummarizedExperiment-derived class (e.g., SingleCellExperiment or BSseq from bsseq) would be highly desirable rather than requiring the user to do the interop as separate step(s). A SummarizedExperiment-derived class is a much more natural (and richer, better-supported, more-tested, etc.) data structure than scmet's ad hoc S3 classes. Perhaps it is necessary to ultimately create a data.table/data.frame representation of the data to pass to the rstan-based or ggplot2-based functionality (that's not clear to me right now), but I really think it would be a big improvement to keep the data.table/data.frame representation as the internal business of scMET (rather than exposing it to the user) and instead exposing a more Bioconductor-familiar interface based on SummarizedExperiment-derived objected to users.

For acceptance into Bioconductor, there are a number of Required points, as well as Recommended points, that I would ask you to first please address. Would you please provide line-by-line comments to my initial review so that I know what changes I'm looking for in my re-review.

Cheers, Pete

Required

suppressPackageStartupMessages(library(scMET))
fit_obj <- scmet(Y = scmet_dt$Y, X = scmet_dt$X, L = 4,
                 iter = 20000, seed = 12)

# A whole bunch of output omitted ...

#> Chain 1: Informational Message: The maximum number of iterations is reached! The algorithm may not have converged.
#> Chain 1: This variational approximation is not guaranteed to be meaningful.
#> Chain 1: 
#> Chain 1: Drawing a sample of size 2000 from the approximate posterior... 
#> Chain 1: COMPLETED.
#> Warning: Pareto k diagnostic value is 3.14. Resampling is disabled. Decreasing
#> tol_rel_obj may help if variational algorithm has terminated prematurely.
#> Otherwise consider using sampling instead.
#> Wed Apr 20 16:13:58 2022 : Posterior inference finished.
* NOTE: 'LazyData:' in the 'DESCRIPTION' should be set to false or
      removed
* NOTE: Update R version dependency from 4.1.0 to 4.2.0.
* NOTE: Avoid sapply(); use vapply()
* NOTE: Avoid 'cat' and 'print' outside of 'show' methods
* NOTE: Avoid using '=' for assignment and use '<-' instead
* NOTE: Avoid redundant 'stop' and 'warn*' in signal conditions
* WARNING: Remove set.seed usage (found 2 times)
* NOTE: Consider adding runnable examples to the following man pages
  which document exported objects:
  create_design_matrix.Rd, sce_to_scmet.Rd, scmet_to_sce.Rd
if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("scMET")

Recommended

bbmle_fit <- scmet_dt$Y[, bb_mle(cbind(total_reads, met_reads))
                      [c("mu", "gamma")], by = c("Feature")]
  * checking for GNU extensions in Makefiles ... NOTE
    GNU make is a SystemRequirements.

I don't understand this, because GNU make is already listed in SystemRequirements, but it seems like it might be another rstan-related thing (https://discourse.mc-stan.org/t/using-rstan-in-an-r-package-generates-r-cmd-check-notes/26628/3), so I think we can ignore it.

bioc-issue-bot commented 2 years ago

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

andreaskapou commented 2 years ago

Hi @PeteHaitch

Thanks for reviewing scMET and the detailed suggestions on making the package better. I agree that using S4 classes and making scMET accept SE derived objects would be optimal. However, in the current circumstances (my current post has shifted from DNA methylation) I do not have the time to refactor the whole package, but would leave it as future work?

Please see my line-by-line answers to your comments. Boxes with ticks are implemented as per your suggestions

Required

Recommended

Best, Andreas

bioc-issue-bot commented 2 years ago

Dear Package contributor,

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

Your package has been built on Linux, Mac, and Windows.

On one or more platforms, the build results were: "TIMEOUT". 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. This link will be 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/scMET to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

PeteHaitch commented 2 years ago

Thanks, Andreas. I've got grant deadlines this week but I will take a look next week.

Cheers, Pete

PeteHaitch commented 2 years ago

And once it's passing OK on BioC's build machines, please take a look at why it's now timing out there

andreaskapou commented 2 years ago

Hey Pete,

No worries at all and good luck with the grant application!

I increased the iter so I get a better fit in the vignette examples, which results in timing out. Will revert to old settings and submit again.

Best, CAK

bioc-issue-bot commented 2 years ago

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

bioc-issue-bot commented 2 years ago

Dear Package contributor,

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

Your package has been built on Linux, Mac, and Windows.

On one or more platforms, the build results were: "TIMEOUT". 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. This link will be 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/scMET to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 2 years ago

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

bioc-issue-bot commented 2 years ago

Dear Package contributor,

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

Your package has been built on Linux, Mac, and Windows.

On one or more platforms, the build results were: "TIMEOUT". 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. This link will be 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/scMET to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 2 years ago

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

bioc-issue-bot commented 2 years ago

Dear Package contributor,

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

Your package has been built on Linux, Mac, and Windows.

On one or more platforms, the build results were: "TIMEOUT". 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. This link will be 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/scMET to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 2 years ago

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

bioc-issue-bot commented 2 years ago

Dear Package contributor,

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

Your package has been built on Linux, Mac, and Windows.

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

Please see the build report for more details. This link will be 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/scMET to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 2 years ago

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

bioc-issue-bot commented 2 years ago

Dear Package contributor,

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

Your package has been built on Linux, Mac, and Windows.

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

Please see the build report for more details. This link will be 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/scMET to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

PeteHaitch commented 2 years ago

Thanks for your response to the review, @andreaskapou. The use of S3 is still non-standard, but since it doesn't seem to affect the package functionality and given your current circumstances feel free to leave as-is. A couple of final points to address, then we'll be ready to accept scMET. FYI I will be on leave until June 9, so there may be a delay in the package being formally accepted once you've made these changes.

Required

Recommended

andreaskapou commented 2 years ago

Hi @PeteHaitch , please see my line-by-line answers to your comments. Boxes with ticks are implemented as per your suggestions.

Best, Andreas

bioc-issue-bot commented 2 years ago

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

bioc-issue-bot commented 2 years ago

Dear Package contributor,

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

Your package has been built on Linux, Mac, and Windows.

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

Please see the build report for more details. This link will be 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/scMET to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 2 years 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.

PeteHaitch commented 2 years ago

Thank you for making those changes, @andreaskapou. I've now accepted the package into Bioconductor.

(Apologies, I thought I had already done this a few weeks ago!)

PeteHaitch commented 2 years ago

@lshep or @Bioconductor/core: should my changing the tag to '3a. accepted' have automatically triggered the next steps ('The master branch of your GitHub repository has been added to Bioconductor's git repository.' etc.)?

nturaga commented 2 years ago

Hi Pete

Lori has to do a manual package ingestion for all the packages that have been accepted. I believe this happens once per week.

It should happen soon.

On Thu, Jul 14, 2022, 1:24 AM Peter Hickey @.***> wrote:

@lshep https://github.com/lshep or @Bioconductor/core https://github.com/orgs/Bioconductor/teams/core: should my changing the tag to '3a. accepted' have automatically triggered the next steps ('The master branch of your GitHub repository has been added to Bioconductor's git repository.' etc.)?

— Reply to this email directly, view it on GitHub https://github.com/Bioconductor/Contributions/issues/2585#issuecomment-1184002118, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAU6QS5TZQQNLSYYRAOUPCTVT6QBHANCNFSM5ROXVGIA . You are receiving this because you are on a team that was mentioned.Message ID: @.***>

lshep commented 2 years ago

The master branch of your GitHub repository has been added to Bioconductor's git repository.

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

https://bioconductor.org/packages/scMET

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.