Bioconductor / Contributions

Contribute Packages to Bioconductor
135 stars 33 forks source link

scQTLtools #3515

Open XFWuCN opened 3 months ago

XFWuCN commented 3 months ago

Hello Bioconductor team, I am submitting my R package {scQTLtools} for consideration for Bioconductor release.

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 @XFWuCN

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: scQTLtools
Type: Package
Title: An R package for single-cell eQTL analysis and visualization
Version: 0.99.0
Authors@R: c(
    person(given = "Xiaofeng", 
 family = "Wu",    
 email = "1427972815@qq.com", 
 role  = c("aut", "cre", "cph"), 
 comment = c(ORCID = "0009-0003-6254-5575")),
    person(given = "Xin",      
 family = "Huang", 
 email = "1097567240@qq.com",   
 role  = c("aut", "cph")),
    person(given = "Jingtong", 
 family = "Kang",  
 email = "1203178107@qq.com",     
 role = "com"),
    person(given = "Siwen",    
 family = "Xu",    
 email = "siwxu@gdpu.edu.cn",      
 role  = c("aut", "cph"))
    )
Description: This package specializes in analyzing and visualizing eQTL at the
    single-cell level. It can read gene expression matrices or Seurat data, 
    along with genotype data. It offers a function for cis-eQTL analysis to 
    detect eQTL within a given range, and another function to fit models with
    three methods. Using this package, users can also generate single-cell
    level visualization result.
Depends: R (>= 4.4.1.0)
Imports:
    ggplot2(>= 3.5.1),
    Matrix (>= 1.7-0),
    stats (>= 4.4.1),
    progress(>= 1.2.3),
    stringr(>= 1.5.1),
    dplyr(>= 1.1.4),
    SeuratObject(>= 5.0.2),
    methods(>= 4.4.1),
    magrittr(>= 2.0.3),
    patchwork(>= 1.2.0),
    DESeq2 (>= 1.45.3),
    AnnotationDbi(>= 1.67.0),
    VGAM (>= 1.1-11),
    limma (>= 3.61.9),
    biomaRt(>= 2.61.3),
    org.Hs.eg.db (>= 3.19.1),
    org.Mm.eg.db (>= 3.19.1),
    gamlss (>= 5.4-22)
Suggests: 
    BiocStyle,
    knitr,
    rmarkdown,
    testthat (>= 3.2.1.1)
License: MIT + file LICENSE
URL: https://github.com/XFWuCN/scQTLtools
VignetteBuilder: knitr
BugReports: https://github.com/XFWuCN/scQTLtools/issues
biocViews: Software,GeneExpression,GeneticVariability,SNP,
        DifferentialExpression,GenomicVariation,VariantDetection,Genetics,
        FunctionalGenomics,SystemsBiology,Regression,SingleCell,Normalization,
        Visualization
Encoding: UTF-8
RoxygenNote: 7.3.2
LazyData: false
Config/testthat/edition: 3
lshep commented 2 months ago

If this package is working with Single Cell Data, it should work with the standard Bioconductor class SingleCellExperiment. See https://contributions.bioconductor.org/important-bioconductor-package-development-features.html particularly interop with Bioconductor classes.

lshep commented 2 months ago

It will also be necessary to provide an abstract/intro section in your vignette that provides motivation for inclusion in Bioconductor and a review and comparison to existing Bioconductor packages with similar functionality or scope.

XFWuCN commented 2 months ago

If this package is working with Single Cell Data, it should work with the standard Bioconductor class SingleCellExperiment. See https://contributions.bioconductor.org/important-bioconductor-package-development-features.html particularly interop with Bioconductor classes.

Thank you for the review, we're working on it.

XFWuCN commented 1 month ago

If this package is working with Single Cell Data, it should work with the standard Bioconductor class SingleCellExperiment. See https://contributions.bioconductor.org/important-bioconductor-package-development-features.html particularly interop with Bioconductor classes.

Hi, we‘ve edit the createQTLObject() function and vignette of our R package according to the modification requirements, and we're done with it.

XFWuCN commented 1 month ago

To be specific,

  1. We added the possibility to input a SingleCellExperiment object as genedata parameter of the createQTLObject() function, and I made corresponding modifications in the header comment, DESCRIPTION, vignette example and test-createQTLObject.

  2. I added a motivation for inclusion in Bioconductor in the introduction section of my vignette.

  3. I added a comparison section for compare our R package with existing Bioconductor packages offering similar functionality. We found that only find iBMQ packge performs eQTL identification in Bioconductor.

Thank you for the review.

bioc-issue-bot commented 1 month 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 month 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 24.04.1 LTS): scQTLtools_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 git@git.bioconductor.org:packages/scQTLtools 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 month 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 1 month ago

Package 'scQTLtools' Review

Thank you for submitting your package to Bioconductor. The package passed check and build. 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.

unacceptable files

R code

bioc-issue-bot commented 2 weeks ago

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

XFWuCN commented 1 week ago

Thank you for providing such a detailed comment. We have benefited greatly from it. Here are our modifies and answers.

unacceptable files

General package development

  • [x] Important: Expose the org as a parameter instead of import with import.

    Done.

    I deleted import(org.Hs.eg.db) and import(org.Mm.eg.db) from the file ./R/callQTL.R

    We have chosen species as a parameter (from the file R/callQTL.R, lines 60 to line 69, and in file R/createQTLObject.R, line 32). we use load_OrgDb() to specific the org at line 64 and line 68 in file R/callQTL.R, and we pass OrgDb as a parameter when calling the R/createGeneLoc.R function at line 99.

  • [x] NOTE: no direct slot access with @ or slot() - accessors implemented and used.

    Done.

    We have defined new functions using setGeneric and setMethod, which are intended to replace the @ or slot() methods for accessing information. These new functions are saved in the generics.R file. Additionally, we have utilized these new functions to replace the direct access to slots using @ or slot() in various files as you pointed out, thereby achieving code optimization.

  • [x] NOTE: :: is not suggested in source code unless you can make sure all the packages are imported. Some people think it is better to keep ::. However, please be aware that you will need to manually double-check the imported items if you make any changes to the DESCRIPTION file during development. My suggestion is to remove one or two repetitions to trigger the dependency check.

    Done.

    I deleted all :: from the files that you mentioned above.

  • [x] NOTE: Vectorize: for loops present, try to replace them by *apply funcitons.

DONE.

  • [x] Important: Please consider to add drop=FALSE/TRUE to avoid/secure the reduction of dimension for matrices and arrays. Ignore this if using datatable.

    DONE.

  • [x] Important: expose all the mart as a parameter. Users may have trouble in connectting the main database but have to use the mirror sites.

    Done.

    We added supports for "worm" and "phytozome" in lines 77 to 96 of the callQTL.R file. In the createGeneLoc-callQTL.R file, we changed the function useEnsembl to useMart and took biomart as a parameter. In the createSNPLocs-call.R file, we take biomart as a parameter. This allows users to choose different biomarts alternatives when creating gene location matrix and snp location matrix.

  • [x] NOTE: Functional programming: code repetition.

    1. For the progress bar during model processing in linearModel.R, poissonModel.R, and zinbModel.R, we encapsulated it into a function called initialize_progress_bar.R.

    2. In visualizeQTL.R, we encapsulate some repetitive code into functions, such as get_counts, get_cell_groups, in get_data_by_id-utils.R and We merged the similar logic in two different biClassifys and encapsulated the process_classifyfunction to select different biClassifys.

    3. For the repetition in draw_boxplot, draw_QTLplot, and draw_violinplot, we have extracted the identical theme settings from the draw_boxplot, draw_QTLplot, and draw_violinplot functions and encapsulated them into a function named plots_theme_opts to reduce code redundancy.

    4. We added multiple functions to store duplicate code, such as adjust_pvalues.R , filter_by_abs_b.R, and process_matrix.R

    5. We have removed code blocks that repeatedly appeared in multiple functions and retained them only in the functions that called them. However, for some repetitive code blocks—such as extracting lines of code for slots from eQTL objects and similar parameters in different model functions—this is mainly the result of separating the functions of the three models from the callQTL function to reduce nested functions during early development.

      Regarding this duplication, in addition to the reasons mentioned above, it may also reflect our current coding level. We will continue to monitor duplicate code blocks in the future and strive to resolve them.

      We plead that these duplicate code blocks to pass.

    Documentation\

  • [x] Important: Consider to include a readme file for all extdata.

    We added introduction in file ./R/data. Is it ok?

  • [x] Note: Vignette should use BiocStyle package for formatting.

    DONE. In line 10, scQTLtools.Rmd, we added BiocStyle:: before html_document:

bioc-issue-bot commented 1 week 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.

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.

The following are build products from R CMD build on the Single Package Builder: Linux (Ubuntu 24.04.1 LTS): scQTLtools_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/scQTLtools 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 week ago

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

XFWuCN commented 1 week ago

We push the code again, this time we split the long function into small functions, making each function within 50 lines.

bioc-issue-bot commented 1 week 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.

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.

The following are build products from R CMD build on the Single Package Builder: Linux (Ubuntu 24.04.1 LTS): scQTLtools_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/scQTLtools to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

XFWuCN commented 1 week ago

Sorry, but I don't see any "WAENINGS" or "NOTES" in build report image image image image

lshep commented 1 week ago

indeed. There seems to be a bug that we will investigate why a warning appears

XFWuCN commented 1 week ago

Okay, thank you for your efforts. If there are any problems with the package, please let me know and we will reply positively.

jianhong commented 16 hours ago

Package 'scQTLtools' Review

The package passed check and build. It is in pretty good shape. 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.

R code