Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scQTLtools #3515

Open
10 tasks done
XFWuCN opened this issue Aug 13, 2024 · 37 comments
Open
10 tasks done

scQTLtools #3515

XFWuCN opened this issue Aug 13, 2024 · 37 comments
Assignees
Labels
2. review in progress assign a reviewer and a more thorough review of package code and documentation taking place OK

Comments

@XFWuCN
Copy link

XFWuCN commented Aug 13, 2024

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 understand that by submitting my package to Bioconductor,
    the package source and all review commentary are visible to the
    general public.

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

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

  • 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.

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

  • 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.

  • 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:

  • The 'devel' branch for new packages and features.
  • The stable 'release' branch, made available every six
    months, for bug fixes.
  • 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.

@bioc-issue-bot
Copy link
Collaborator

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

@bioc-issue-bot bioc-issue-bot added the 1. awaiting moderation submitted and waiting clearance to access resources label Aug 13, 2024
@lshep
Copy link
Contributor

lshep commented Sep 3, 2024

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 lshep added 3e. pending pre-review changes review has indicated blocking concern that needs attention 3d. needs interop Package must explicitly use Bioconductor structures and methods labels Sep 3, 2024
@lshep
Copy link
Contributor

lshep commented Sep 3, 2024

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
Copy link
Author

XFWuCN commented Sep 4, 2024

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
Copy link
Author

XFWuCN commented Sep 19, 2024

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
Copy link
Author

XFWuCN commented Sep 19, 2024

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.

@lshep lshep added pre-check passed pre-review performed and ready to be added to git and removed 3e. pending pre-review changes review has indicated blocking concern that needs attention 3d. needs interop Package must explicitly use Bioconductor structures and methods labels Sep 23, 2024
@bioc-issue-bot
Copy link
Collaborator

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 bioc-issue-bot added pre-review on bioconductor git and access to on demand build but not assigned reviewer until build report clean and removed 1. awaiting moderation submitted and waiting clearance to access resources pre-check passed pre-review performed and ready to be added to git labels Sep 23, 2024
@bioc-issue-bot
Copy link
Collaborator

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.

@lshep lshep added 2. review in progress assign a reviewer and a more thorough review of package code and documentation taking place and removed pre-review on bioconductor git and access to on demand build but not assigned reviewer until build report clean labels Sep 26, 2024
@bioc-issue-bot
Copy link
Collaborator

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

@jianhong
Copy link

jianhong commented Oct 9, 2024

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

  • Important: unacceptable files present (see .gitignore for a listing).
    • ./tests/testthat/Rplots.pdf

General package development

  • Important: Expose the org as a parameter instead of import with import.
    • in line 28 import(org.Hs.eg.db)
    • in line 29 import(org.Mm.eg.db)

R code

  • NOTE: no direct slot access with @ or slot() - accessors implemented and used.
    • In file R/callQTL.R:
      • at line 48 found ' if (length(eQTLObject@filterData) == 0) {'
      • at line 51 found ' expressionMatrix <- eQTLObject@filterData$expMat'
      • at line 52 found ' snpMatrix <- eQTLObject@filterData$snpMat'
      • at line 55 found ' biClassify <- eQTLObject@biClassify'
      • at line 56 found ' species <- eQTLObject@species'
      • at line 192 found ' eQTLObject@useModel <- useModel'
      • at line 193 found ' eQTLObject@eQTLResult <- result'
    • In file R/createQTLObject.R:
      • at line 52 found ' cat(nrow(object@rawData$rawExpMat),'
      • at line 53 found ' "features across", ncol(object@rawData$rawExpMat),'
      • at line 55 found ' cat(nrow(object@rawData$snpMat), "SNPs across",'
      • at line 56 found ' ncol(object@rawData$snpMat), "samples in snpMatrix\n")'
      • at line 57 found ' if (length(object@filterData) != 0) {'
      • at line 59 found ' cat(nrow(object@filterData$expMat),'
      • at line 60 found ' "features across", ncol(object@filterData$expMat),'
      • at line 62 found ' cat(nrow(object@filterData$snpMat),'
      • at line 64 found ' ncol(object@filterData$snpMat),'
      • at line 67 found ' if (length(object@useModel) != 0) {'
      • at line 68 found ' cat("model used: ", object@useModel)'
      • at line 185 found ' metadata <- genedata@meta.data[group]'
    • In file R/filterGeneSNP.R:
      • at line 31 found ' if (!is.null(eQTLObject@rawData$normExpMat)) {'
      • at line 32 found ' nor_expressionMatrix <- as.data.frame(eQTLObject@rawData$normExpMat)'
      • at line 46 found ' snpMatrix <- as.data.frame(eQTLObject@rawData$snpMat)'
      • at line 51 found ' biClassify <- eQTLObject@biClassify'
      • at line 88 found ' eQTLObject@filterData <- list('
    • In file R/linearModel-utils.R:
      • at line 39 found ' if (length(eQTLObject@filterData) == 0) {'
      • at line 42 found ' expressionMatrix <- round(eQTLObject@filterData$expMat * 1000)'
      • at line 43 found ' snpMatrix <- eQTLObject@filterData$snpMat'
      • at line 44 found ' unique_group <- unique(eQTLObject@groupBy$group)'
      • at line 62 found ' split_cells <- rownames(eQTLObject@groupBy)[eQTLObject@groupBy$group == k]'
    • In file R/normalizeGene.R:
      • at line 21 found ' expressionMatrix <- eQTLObject@rawData$rawExpMat'
      • at line 42 found ' eQTLObject@rawData$normExpMat <- normalizedData'
    • In file R/poissonModel-utils.R:
      • at line 40 found ' if (length(eQTLObject@filterData) == 0) {'
      • at line 44 found ' expressionMatrix <- round(eQTLObject@filterData$expMat * 1000)'
      • at line 45 found ' snpMatrix <- eQTLObject@filterData$snpMat'
      • at line 46 found ' unique_group <- unique(eQTLObject@groupBy$group)'
      • at line 63 found ' split_cells <- rownames(eQTLObject@groupBy)[eQTLObject@groupBy$group == k]'
    • In file R/visualizeQTL.R:
      • at line 36 found ' eQTLresult <- eQTLObject@eQTLResult'
      • at line 37 found ' expressionMatrix <- eQTLObject@filterData$expMat'
      • at line 38 found ' snpMatrix <- eQTLObject@filterData$snpMat'
      • at line 39 found ' biClassify <- eQTLObject@biClassify'
      • at line 42 found ' unique_group <- unique(eQTLObject@groupBy$group)'
      • at line 50 found ' split_cells <- rownames(eQTLObject@groupBy)['
      • at line 51 found ' eQTLObject@groupBy$group == i]'
    • In file R/zinbModel-utils.R:
      • at line 37 found ' if (length(eQTLObject@filterData) == 0) {'
      • at line 41 found ' expressionMatrix <- round(eQTLObject@filterData$expMat * 1000)'
      • at line 42 found ' snpMatrix <- eQTLObject@filterData$snpMat'
      • at line 43 found ' unique_group <- unique(eQTLObject@groupBy$group)'
      • at line 49 found ' split_cells <- rownames(eQTLObject@groupBy)['
      • at line 50 found ' eQTLObject@groupBy$group == j]'
  • 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.
    • In file R/DESeq_normalize-normalizeGene.R:
      • at line 20 found ' dds <- DESeq2::DESeq(dds)'
      • at line 21 found ' normalizedData <- DESeq2::counts(dds, normalized = TRUE)'
    • In file R/limma_normalize-normalizeGene.R:
      • at line 15 found ' normalizedData <- limma::normalizeBetweenArrays(expressionMatrix,'
    • In file R/log_normalize-normalizeGene.R:
      • at line 17 found ' Matrix::colSums(expressionMatrix),'
    • In file R/poissonModel-utils.R:
      • at line 98 found ' lmodel <- stats::glm(combined_df$gene_mat ~ combined_df$snp_mat,'
      • at line 142 found ' lmodel <- stats::glm(combined_df$gene_mat ~ combined_df$snp_mat,'
  • NOTE: Vectorize: for loops present, try to replace them by *apply funcitons.
    • In file R/callQTL.R:
      • at line 103 found ' for (i in seq_len(nrow(gene_loc))) {'
      • at line 107 found ' for (j in seq_len(nrow(snps_loc))) {'
      • at line 139 found ' for (i in seq_len(nrow(gene_loc))) {'
      • at line 143 found ' for (j in seq_len(nrow(snps_loc))) {'
    • In file R/checkSNPList-callQTL.R:
      • at line 24 found ' for (i in seq_len(length(snpList))) {'
    • In file R/linearModel-utils.R:
      • at line 49 found ' for (k in unique_group) {'
      • at line 75 found ' for (i in seq_len(length(snpIDs))) {'
      • at line 88 found ' for (j in seq_len(length(geneIDs))) {'
      • at line 124 found ' for (i in seq_len(length(snpIDs))) {'
      • at line 130 found ' for (j in seq_len(length(geneIDs))) {'
    • In file R/poissonModel-utils.R:
      • at line 51 found ' for (k in unique_group) {'
      • at line 76 found ' for (i in seq_len(length(snpIDs))) {'
      • at line 89 found ' for (j in seq_len(length(geneIDs))) {'
      • at line 127 found ' for (i in seq_len(length(snpIDs))) {'
      • at line 133 found ' for (j in seq_len(length(geneIDs))) {'
    • In file R/visualizeQTL.R:
      • at line 49 found ' for(i in unique_group){'
      • at line 133 found ' for(j in seq_len(length(unique_group))){'
      • at line 142 found ' for(j in seq_len(length(unique_group))){'
      • at line 150 found ' for(j in seq_len(length(unique_group))){'
      • at line 158 found ' for(j in seq_len(length(unique_group))){'
    • In file R/zinbModel-utils.R:
      • at line 48 found ' for (j in unique_group) {'
      • at line 93 found ' for (gene in genes) {'
      • at line 245 found ' for (i in seq_len(length(snpIDs))) {'
      • at line 306 found ' for (gene in genes) {'
      • at line 479 found ' for (i in seq_len(length(snpIDs))) {'
  • Important: Please consider to add drop=FALSE/TRUE to avoid/secure the reduction of dimension for matrices and arrays. Ignore this if using datatable.
    • In file R/filterGeneSNP.R:
      • at line 40 found ' filtered_expressionMatrix <- nor_expressionMatrix[valid_genes, ]'
      • at line 69 found ' filtered_snpMatrix <- snpMatrix[filtered_snp_ids, ]'
      • at line 84 found ' filtered_snpMatrix <- snpMatrix[filtered_snp_ids, ]'
    • In file R/linearModel-utils.R:
      • at line 63 found ' expressionMatrix_split <- expressionMatrix[, split_cells]'
      • at line 64 found ' snpMatrix_split <- snpMatrix[, split_cells]'
      • at line 77 found ' snp_mat <- snpMatrix_split[snpid, ]'
      • at line 90 found ' gene_mat <- expressionMatrix_split[gene_id, ]'
      • at line 126 found ' snp_mat <- snpMatrix_split[snpid, ]'
      • at line 132 found ' gene_mat <- expressionMatrix_split[gene_id, ]'
      • at line 173 found ' result <- result[order(result[, "adjusted_pvalue"]), ]'
      • at line 175 found ' result <- result[result$adjusted_pvalue <= pAdjustThreshold, ]'
      • at line 181 found ' result <- result[result$abs_b >= logfcThreshold, ]'
    • In file R/normalizeGene.R:
      • at line 28 found ' expressionMatrix <- expressionMatrix[rowsum != 0, ]'
    • In file R/poissonModel-utils.R:
      • at line 64 found ' expressionMatrix_split <- expressionMatrix[, split_cells]'
      • at line 65 found ' snpMatrix_split <- snpMatrix[, split_cells]'
      • at line 78 found ' snp_mat <- snpMatrix_split[snpid, ]'
      • at line 91 found ' gene_mat <- expressionMatrix_split[gene_id, ]'
      • at line 129 found ' snp_mat <- snpMatrix_split[snpid, ]'
      • at line 135 found ' gene_mat <- expressionMatrix_split[gene_id, ]'
      • at line 177 found ' result <- result[order(result[, "adjusted_pvalue"]), ]'
      • at line 179 found ' result <- result[result$adjusted_pvalue <= pAdjustThreshold, ]'
      • at line 185 found ' result <- result[result$abs_b >= logfcThreshold, ]'
    • In file R/remove_outliers-visualizeQTL.R:
      • at line 32 found ' sample_gene <- exprsMat[Geneid, ]'
    • In file R/visualizeQTL.R:
      • at line 52 found ' split_expressionMatrix <- expressionMatrix[, split_cells]'
      • at line 53 found ' snpMatrix_split <- snpMatrix[, split_cells]'
      • at line 62 found ' result_split <- result[result_split1, ]'
      • at line 93 found ' result_split <- result[result_split1, ]'
      • at line 109 found ' counts_AA <- unlist(split_expressionMatrix[Geneid, AA_cells])'
      • at line 110 found ' counts_Aa <- unlist(split_expressionMatrix[Geneid, Aa_cells])'
      • at line 111 found ' counts_aa <- unlist(split_expressionMatrix[Geneid, aa_cells])'
      • at line 136 found ' df_split <- df_all[df_all$group == group_split, ]'
      • at line 145 found ' df_split <- df_all[df_all$group == group_split, ]'
      • at line 153 found ' df_split <- df_all[df_all$group == group_split, ]'
      • at line 161 found ' df_split <- df_all[df_all$group == group_split, ]'
    • In file R/zinbModel-utils.R:
      • at line 51 found ' expressionMatrix_split <- expressionMatrix[, split_cells]'
      • at line 52 found ' snpMatrix_split <- snpMatrix[, split_cells]'
      • at line 95 found ' counts_1 <- unlist(expressionMatrix_split[gene, ref_cells])'
      • at line 96 found ' counts_2 <- unlist(expressionMatrix_split[gene, alt_cells])'
      • at line 308 found ' counts_1 <- unlist(expressionMatrix_split[gene, AA_cells])'
      • at line 309 found ' counts_2 <- unlist(expressionMatrix_split[gene, Aa_cells])'
      • at line 310 found ' counts_3 <- unlist(expressionMatrix_split[gene, aa_cells])'
      • at line 524 found ' result <- result[order(result[, "adjusted_pvalue"]), ]'
      • at line 526 found ' result <- result[result$adjusted_pvalue <= pAdjustThreshold, ]'
  • Important: expose all the mart as a parameter. Users may have trouble in connectting the main database but have to use the mirror sites.
    • In file R/createGeneLoc-callQTL.R:
      • at line 16 found ' gene_mart <- useEnsembl(biomart = "ensembl",'
    • In file R/createSNPsLoc-callQTL.R:
      • at line 14 found ' snp_mart <- useMart(biomart = "ENSEMBL_MART_SNP", dataset = snpDataset)'
  • NOTE: Functional programming: code repetition.
    • repetition in callQTL, linearModel, poissonModel, visualizeQTL, and zinbModel
      • in callQTL
        • line 5: if (length(eQTLObject@filterData) == 0) {
        • line 6: stop("Please filter the data first.")
        • line 7: }
        • line 8: else {
        • line 9: expressionMatrix <- eQTLObject@filterData$expMat
        • line 10: snpMatrix <- eQTLObject@filterData$snpMat
        • line 11: }
      • in linearModel
        • line 1: geneIDs, snpIDs, biClassify = FALSE, pAdjustMethod = "bonferroni",
        • line 2: pAdjustThreshold = 0.05, logfcThreshold = 0.1)
        • line 3:{
        • line 4: if (length(eQTLObject@filterData) == 0) {
        • line 5: stop("Please filter the data first.")
        • line 6: }
        • line 7: expressionMatrix <- round(eQTLObject@filterData$expMat *
        • line 8: 1000)
        • line 9: snpMatrix <- eQTLObject@filterData$snpMat
        • line 10: unique_group <- unique(eQTLObject@groupBy$group)
        • line 11: result_all <- data.frame()
        • line 12: message("Start calling eQTL")
        • line 13: for (k in unique_group) {
        • line 14: result <- data.frame(SNPid = character(), group = character(),
        • line 15: Geneid = character(), pvalue = double(), adjusted_pvalue = double(),
        • line 16: b = double(), abs_b = double(), Remark = character(),
        • line 17: stringsAsFactors = FALSE)
        • line 18: split_cells <- rownames(eQTLObject@groupBy)[eQTLObject@groupBy$group ==
        • line 19: k]
        • line 20: expressionMatrix_split <- expressionMatrix[, split_cells]
        • line 21: snpMatrix_split <- snpMatrix[, split_cells]
        • line 22: if (biClassify == FALSE) {
        • line 23: message(k, ":")
        • line 24: message("0% 10 20 30 40 50 60 70 80 90 100%")
        • line 25: message("[----|----|----|----|----|----|----|----|----|----|")
        • line 26: pb <- progress_bar$new(total = length(snpIDs), format = "[:bar]",
        • line 27: clear = FALSE, width = 51)
        • line 28: for (i in seq_len(length(snpIDs))) {
        • line 29: snpid <- snpIDs[i]
        • line 30: snp_mat <- snpMatrix_split[snpid, ]
        • line 31: snp_mat <- as.data.frame(snp_mat)
        • line 32: snp_mat$cells <- rownames(snp_mat)
        • line 33: replace_2_and_3 <- function(x) {
        • line 34: ifelse(x == 2, 3, ifelse(x == 3, 2, x))
        • line 35: }
        • line 36: snp_mat_new <- snp_mat %>% mutate_all(list(~replace_2_and_3(.)))
        • line 37: for (j in seq_len(length(geneIDs))) {
        • line 38: gene_id <- geneIDs[j]
        • line 39: gene_mat <- expressionMatrix_split[gene_id,
        • line 40: ]
        • line 41: gene_mat <- as.data.frame(gene_mat)
        • line 42: gene_mat$cells <- rownames(gene_mat)
        • line 43: combined_df <- merge(snp_mat, gene_mat, by = "cells")
        • line 44: combined_df <- subset(combined_df, snp_mat !=
        • line 45: 5)
        • line 47: if (length(summary(lmodel)$coefficients[, "Pr(>|t|)"]) >=
        • line 48: 2) {
        • line 49: lmout_pvalue <- summary(lmodel)$coefficients[2,
        • line 50: "Pr(>|t|)"]
        • line 51: lmout_b <- summary(lmodel)$coefficients[2,
        • line 52: "Estimate"]
        • line 53: new_row <- data.frame(SNPid = snpid, group = k,
        • line 54: Geneid = geneIDs[j], pvalue = lmout_pvalue,
        • line 55: b = lmout_b)
        • line 56: result <- rbind(result, new_row)
        • line 57: }
        • line 58: }
        • line 59: pb$tick()
        • line 60: }
        • line 61: message("finished!")
        • line 62: }
        • line 63: else if (biClassify == TRUE) {
        • line 64: snpMatrix_split[snpMatrix_split == 3] <- 2
        • line 65: message(k, ":")
        • line 66: message("0% 10 20 30 40 50 60 70 80 90 100%")
        • line 67: message("[----|----|----|----|----|----|----|----|----|----|")
        • line 68: pb <- progress_bar$new(total = length(snpIDs), format = "[:bar]",
        • line 69: clear = FALSE, width = 51)
        • line 70: for (i in seq_len(length(snpIDs))) {
        • line 71: snpid <- snpIDs[i]
        • line 72: snp_mat <- snpMatrix_split[snpid, ]
        • line 73: snp_mat <- as.data.frame(snp_mat)
        • line 74: snp_mat$cells <- rownames(snp_mat)
        • line 75: for (j in seq_len(length(geneIDs))) {
        • line 76: gene_id <- geneIDs[j]
        • line 77: gene_mat <- expressionMatrix_split[gene_id,
        • line 78: ]
        • line 79: gene_mat <- as.data.frame(gene_mat)
        • line 80: gene_mat$cells <- rownames(gene_mat)
        • line 81: combined_df <- merge(snp_mat, gene_mat, by = "cells")
        • line 82: combined_df <- subset(combined_df, snp_mat !=
        • line 83: 5)
        • line 85: if (length(summary(lmodel)$coefficients[, "Pr(>|t|)"]) >=
        • line 86: 2) {
        • line 87: lmout_pvalue <- summary(lmodel)$coefficients[2,
        • line 88: "Pr(>|t|)"]
        • line 89: lmout_b <- summary(lmodel)$coefficients[2,
        • line 90: "Estimate"]
        • line 91: new_row <- data.frame(SNPid = snpid, group = k,
        • line 92: Geneid = geneIDs[j], pvalue = lmout_pvalue,
        • line 93: b = lmout_b)
        • line 94: result <- rbind(result, new_row)
        • line 95: }
        • line 96: }
        • line 97: pb$tick()
        • line 98: }
        • line 99: message("finished!")
        • line 100: }
        • line 101: else {
        • line 102: stop("biClassify can only be selected as 'TRUE' or 'FALSE'")
        • line 103: }
        • line 104: if (!pAdjustMethod %in% c("bonferroni", "holm", "hochberg",
        • line 105: "hommel", "BH")) {
        • line 106: stop("Invalid p-adjusted method. Please choose from 'bonferroni', 'holm',\n'hochberg', 'hommel', or'fdr or BH'.")
        • line 107: }
        • line 108: result[, "adjusted_pvalue"] <- p.adjust(result[, "pvalue"],
        • line 109: method = "BH")
        • line 110: result <- result[order(result[, "adjusted_pvalue"]),
        • line 111: ]
        • line 112: rownames(result) <- NULL
        • line 113: result <- result[result$adjusted_pvalue <= pAdjustThreshold,
        • line 114: ]
        • line 115: result <- result %>% mutate(abs_b = abs(result[, "b"]))
        • line 116: result <- result[result$abs_b >= logfcThreshold, ]
        • line 117: result_all <- rbind(result_all, result)
        • line 118: }
        • line 119: return(result_all)
      • in poissonModel
        • line 1: geneIDs, snpIDs, biClassify = FALSE, pAdjustMethod = "bonferroni",
        • line 2: pAdjustThreshold = 0.05, logfcThreshold = 0.1)
        • line 3:{
        • line 4: if (length(eQTLObject@filterData) == 0) {
        • line 5: stop("Please filter the data first.")
        • line 6: }
        • line 7: expressionMatrix <- round(eQTLObject@filterData$expMat *
        • line 8: 1000)
        • line 9: snpMatrix <- eQTLObject@filterData$snpMat
        • line 10: unique_group <- unique(eQTLObject@groupBy$group)
        • line 11: result_all <- data.frame()
        • line 12: message("Start calling eQTL")
        • line 13: for (k in unique_group) {
        • line 14: result <- data.frame(SNPid = character(), group = character(),
        • line 15: Geneid = character(), pvalue = double(), adjusted_pvalue = double(),
        • line 16: b = double(), abs_b = double(), Remark = character(),
        • line 17: stringsAsFactors = FALSE)
        • line 18: split_cells <- rownames(eQTLObject@groupBy)[eQTLObject@groupBy$group ==
        • line 19: k]
        • line 20: expressionMatrix_split <- expressionMatrix[, split_cells]
        • line 21: snpMatrix_split <- snpMatrix[, split_cells]
        • line 22: if (biClassify == FALSE) {
        • line 23: message(k, ":")
        • line 24: message("0% 10 20 30 40 50 60 70 80 90 100%")
        • line 25: message("[----|----|----|----|----|----|----|----|----|----|")
        • line 26: pb <- progress_bar$new(total = length(snpIDs), format = "[:bar]",
        • line 27: clear = FALSE, width = 51)
        • line 28: for (i in seq_len(length(snpIDs))) {
        • line 29: snpid <- snpIDs[i]
        • line 30: snp_mat <- snpMatrix_split[snpid, ]
        • line 31: snp_mat <- as.data.frame(snp_mat)
        • line 32: snp_mat$cells <- rownames(snp_mat)
        • line 33: replace_2_and_3 <- function(x) {
        • line 34: ifelse(x == 2, 3, ifelse(x == 3, 2, x))
        • line 35: }
        • line 36: snp_mat_new <- snp_mat %>% mutate_all(list(~replace_2_and_3(.)))
        • line 37: for (j in seq_len(length(geneIDs))) {
        • line 38: gene_id <- geneIDs[j]
        • line 39: gene_mat <- expressionMatrix_split[gene_id,
        • line 40: ]
        • line 41: gene_mat <- as.data.frame(gene_mat)
        • line 42: gene_mat$cells <- rownames(gene_mat)
        • line 43: combined_df <- merge(snp_mat_new, gene_mat,
        • line 44: by = "cells")
        • line 45: combined_df <- subset(combined_df, snp_mat !=
        • line 49: if (length(summary(lmodel)$coefficients[, "Pr(>|z|)"]) >=
        • line 50: 2) {
        • line 51: lmout_pvalue <- summary(lmodel)$coefficients[2,
        • line 52: "Pr(>|z|)"]
        • line 53: lmout_b <- summary(lmodel)$coefficients[2,
        • line 54: "Estimate"]
        • line 55: new_row <- data.frame(SNPid = snpid, group = k,
        • line 56: Geneid = geneIDs[j], pvalue = lmout_pvalue,
        • line 57: b = lmout_b)
        • line 58: result <- rbind(result, new_row)
        • line 59: }
        • line 60: }
        • line 61: pb$tick()
        • line 62: }
        • line 63: message("finished!")
        • line 64: }
        • line 65: else if (biClassify == TRUE) {
        • line 66: snpMatrix_split[snpMatrix_split == 3] <- 2
        • line 67: message(k, ":")
        • line 68: message("0% 10 20 30 40 50 60 70 80 90 100%")
        • line 69: message("[----|----|----|----|----|----|----|----|----|----|")
        • line 70: pb <- progress_bar$new(total = length(snpIDs), format = "[:bar]",
        • line 71: clear = FALSE, width = 51)
        • line 72: for (i in seq_len(length(snpIDs))) {
        • line 73: snpid <- snpIDs[i]
        • line 74: snp_mat <- snpMatrix_split[snpid, ]
        • line 75: snp_mat <- as.data.frame(snp_mat)
        • line 76: snp_mat$cells <- rownames(snp_mat)
        • line 77: for (j in seq_len(length(geneIDs))) {
        • line 78: gene_id <- geneIDs[j]
        • line 79: gene_mat <- expressionMatrix_split[gene_id,
        • line 80: ]
        • line 81: gene_mat <- as.data.frame(gene_mat)
        • line 82: gene_mat$cells <- rownames(gene_mat)
        • line 83: combined_df <- merge(snp_mat, gene_mat, by = "cells")
        • line 84: combined_df <- subset(combined_df, snp_mat !=
        • line 85: 0)
        • line 88: if (length(summary(lmodel)$coefficients[, "Pr(>|z|)"]) >=
        • line 89: 2) {
        • line 90: lmout_pvalue <- summary(lmodel)$coefficients[2,
        • line 91: "Pr(>|z|)"]
        • line 92: lmout_b <- summary(lmodel)$coefficients[2,
        • line 93: "Estimate"]
        • line 94: new_row <- data.frame(SNPid = snpid, group = k,
        • line 95: Geneid = geneIDs[j], pvalue = lmout_pvalue,
        • line 96: b = lmout_b)
        • line 97: result <- rbind(result, new_row)
        • line 98: }
        • line 99: }
        • line 100: pb$tick()
        • line 101: }
        • line 102: message("finished!")
        • line 103: }
        • line 104: else {
        • line 105: stop("biClassify can only be selected as 'TRUE' or 'FALSE'")
        • line 106: }
        • line 107: if (!pAdjustMethod %in% c("bonferroni", "holm", "hochberg",
        • line 108: "hommel", "BH")) {
        • line 109: stop("Invalid p-adjusted method. Please choose from 'bonferroni', 'holm',\n'hochberg', 'hommel', or'fdr or BH'.")
        • line 110: }
        • line 111: result[, "adjusted_pvalue"] <- p.adjust(result[, "pvalue"],
        • line 112: method = "BH")
        • line 113: result <- result[order(result[, "adjusted_pvalue"]),
        • line 114: ]
        • line 115: rownames(result) <- NULL
        • line 116: result <- result[result$adjusted_pvalue <= pAdjustThreshold,
        • line 117: ]
        • line 118: result <- result %>% mutate(abs_b = abs(result[, "b"]))
        • line 119: result <- result[result$abs_b >= logfcThreshold, ]
        • line 120: result_all <- rbind(result_all, result)
        • line 121: }
        • line 122: return(result_all)
      • in visualizeQTL
        • line 14: for (i in unique_group) {
        • line 15: split_cells <- rownames(eQTLObject@groupBy)[eQTLObject@groupBy$group ==
        • line 16: i]
        • line 17: split_expressionMatrix <- expressionMatrix[, split_cells]
        • line 18: snpMatrix_split <- snpMatrix[, split_cells]
        • line 26: ref_cells <- colnames(snpMatrix_split)[snpMatrix_split[SNPid,
        • line 27: ] == 1]
        • line 28: alt_cells <- colnames(snpMatrix_split)[snpMatrix_split[SNPid,
        • line 29: ] == 2]
        • line 49: AA_cells <- colnames(snpMatrix_split)[snpMatrix_split[SNPid,
        • line 50: ] == 1]
        • line 51: Aa_cells <- colnames(snpMatrix_split)[snpMatrix_split[SNPid,
        • line 52: ] == 3]
        • line 53: aa_cells <- colnames(snpMatrix_split)[snpMatrix_split[SNPid,
        • line 54: ] == 2]
        • line 73: }
        • line 74: else {
        • line 75: stop("biClassify can only be selected as 'TRUE' or 'FALSE'")
        • line 76: }
        • line 77: }
      • in zinbModel
        • line 1: geneIDs, snpIDs, biClassify = FALSE, pAdjustMethod = "bonferroni",
        • line 2: pAdjustThreshold = 1e-05)
        • line 3:{
        • line 4: if (length(eQTLObject@filterData) == 0) {
        • line 5: stop("Please filter the data first.")
        • line 6: }
        • line 7: expressionMatrix <- round(eQTLObject@filterData$expMat *
        • line 8: 1000)
        • line 9: snpMatrix <- eQTLObject@filterData$snpMat
        • line 10: unique_group <- unique(eQTLObject@groupBy$group)
        • line 11: result_all <- data.frame()
        • line 12: message("Start calling eQTL")
        • line 13: for (j in unique_group) {
        • line 14: split_cells <- rownames(eQTLObject@groupBy)[eQTLObject@groupBy$group ==
        • line 15: j]
        • line 16: expressionMatrix_split <- expressionMatrix[, split_cells]
        • line 17: snpMatrix_split <- snpMatrix[, split_cells]
        • line 18: if (biClassify == TRUE) {
        • line 25: ref_cells <- colnames(snpMatrix_split)[snpMatrix_split[snpid,
        • line 26: ] == 1]
        • line 27: alt_cells <- colnames(snpMatrix_split)[snpMatrix_split[snpid,
        • line 28: ] == 2]
        • line 120: stringsAsFactors = FALSE)
        • line 121: message(j, ":")
        • line 122: message("0% 10 20 30 40 50 60 70 80 90 100%")
        • line 123: message("[----|----|----|----|----|----|----|----|----|----|")
        • line 124: pb <- progress_bar$new(total = length(snpIDs), format = "[:bar]",
        • line 125: clear = FALSE, width = 51)
        • line 126: for (i in seq_len(length(snpIDs))) {
        • line 148: snpid <- snpIDs[i]
        • line 149: AA_cells <- colnames(snpMatrix_split)[snpMatrix_split[snpid,
        • line 150: ] == 1]
        • line 151: Aa_cells <- colnames(snpMatrix_split)[snpMatrix_split[snpid,
        • line 152: ] == 3]
        • line 153: aa_cells <- colnames(snpMatrix_split)[snpMatrix_split[snpid,
        • line 154: ] == 2]
        • line 271: stringsAsFactors = FALSE)
        • line 272: message(j, ":")
        • line 273: message("0% 10 20 30 40 50 60 70 80 90 100%")
        • line 274: message("[----|----|----|----|----|----|----|----|----|----|")
        • line 275: pb <- progress_bar$new(total = length(snpIDs), format = "[:bar]",
        • line 276: clear = FALSE, width = 51)
        • line 277: for (i in seq_len(length(snpIDs))) {
        • line 300: }
        • line 301: else {
        • line 302: stop("biClassify can only be selected as 'TRUE' or 'FALSE'")
        • line 303: }
        • line 304: if (!pAdjustMethod %in% c("bonferroni", "holm", "hochberg",
        • line 305: "hommel", "BH")) {
        • line 306: stop("Invalid p-adjusted method. Please choose from 'bonferroni', 'holm',\n'hochberg', 'hommel', or'fdr or BH'.")
        • line 307: }
        • line 308: result[, "adjusted_pvalue"] <- p.adjust(result[, "pvalue"],
        • line 309: method = pAdjustMethod)
        • line 310: result <- result[order(result[, "adjusted_pvalue"]),
        • line 311: ]
        • line 312: rownames(result) <- NULL
        • line 313: result <- result[result$adjusted_pvalue <= pAdjustThreshold,
        • line 314: ]
    • repetition in draw_boxplot, draw_QTLplot, and draw_violinplot
      • in draw_boxplot
        • line 1: unique_group)
        • line 2:{
        • line 3: snp <- df$snp
        • line 4: ggplot(df, aes(x = factor(snp), y = expression, fill = factor(snp))) +
        • line 6: labs(title = unique_group, x = "", y = "Expression") +
        • line 7: theme(axis.text.x = element_text(size = 15, color = "black"),
        • line 8: axis.text.y = element_text(size = 12, color = "black"),
        • line 9: axis.ticks = element_line(size = 0.2, color = "black"),
        • line 10: axis.ticks.length = unit(0.2, "cm"), plot.title = element_text(hjust = 0.5,
        • line 11: size = 14), legend.position = "none", panel.background = element_blank(),
        • line 12: panel.grid = element_blank(), axis.title = element_text(size = 15),
        • line 13: axis.text = element_text(size = 12))
      • in draw_QTLplot
        • line 1: unique_group)
        • line 2:{
        • line 3: snp <- df$snp
        • line 4: ggplot(data = df, aes(x = snp, y = expression, fill = factor(snp))) +
        • line 5: scale_fill_manual(values = c("#D7AA36", "#D85356", "#94BBAD")) +
        • line 6: geom_violin(alpha = 0.7, position = position_dodge(width = 0.75),
        • line 7: size = 0.8, color = "black") + geom_boxplot(notch = FALSE,
        • line 11: theme_bw() + labs(title = unique_group, y = "Expression",
        • line 12: x = "") + theme(axis.text.x = element_text(size = 15,
        • line 13: color = "black"), axis.text.y = element_text(size = 12,
        • line 14: color = "black"), axis.ticks = element_line(size = 0.2,
        • line 15: color = "black"), axis.ticks.length = unit(0.2, "cm"),
        • line 16: plot.title = element_text(hjust = 0.5, size = 14), legend.position = "none",
        • line 17: panel.background = element_blank(), panel.grid = element_blank(),
        • line 18: axis.title = element_text(size = 15), axis.text = element_text(size = 12))
      • in draw_violinplot
        • line 1: unique_group)
        • line 2:{
        • line 3: snp <- df$snp
        • line 4: ggplot(data = df, aes(x = snp, y = expression, fill = factor(snp))) +
        • line 5: scale_fill_manual(values = c("#D7AA36", "#D85356", "#94BBAD")) +
        • line 6: geom_violin(alpha = 0.7, position = position_dodge(width = 0.75),
        • line 7: size = 0.8, color = "black") + theme_bw() + labs(title = unique_group,
        • line 8: y = "Expression", x = "") + theme(axis.text.x = element_text(size = 15,
        • line 9: color = "black"), axis.text.y = element_text(size = 12,
        • line 10: color = "black"), axis.ticks = element_line(size = 0.2,
        • line 11: color = "black"), axis.ticks.length = unit(0.2, "cm"),
        • line 12: plot.title = element_text(hjust = 0.5, size = 14), legend.position = "none",
        • line 13: panel.background = element_blank(), panel.grid = element_blank(),
        • line 14: axis.title = element_text(size = 15), axis.text = element_text(size = 12))

Documentation\

  • Important: Consider to include a readme file for all extdata.
  • Note: Vignette should use BiocStyle package for formatting.
    • rmd file vignettes/scQTLtools.Rmd

@bioc-issue-bot
Copy link
Collaborator

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

@XFWuCN
Copy link
Author

XFWuCN commented Oct 30, 2024

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

  • 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.

  • 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.

  • 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.

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

DONE.

  • 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.

  • 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.

  • 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_classify function 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\

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

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

  • Note: Vignette should use BiocStyle package for formatting.

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

@bioc-issue-bot
Copy link
Collaborator

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
Copy link
Collaborator

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

@XFWuCN
Copy link
Author

XFWuCN commented Oct 31, 2024

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

@bioc-issue-bot
Copy link
Collaborator

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
Copy link
Author

XFWuCN commented Oct 31, 2024

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

@lshep
Copy link
Contributor

lshep commented Oct 31, 2024

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

@XFWuCN
Copy link
Author

XFWuCN commented Oct 31, 2024

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

@jianhong
Copy link

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

  • Important: expose all the mart as a parameter. There are mis-communications. I mean you may want to consider a parameter like mart which called by users. eg:
createSNPsLoc <- function(snpList,
                        snp_mart,
                        snpDataset,
                        snpBiomart = "ENSEMBL_MART_SNP",
                        ...) {
    if(missing(snp_mart)){
    snp_mart <- useMart(biomart = snpBiomart,
                        dataset = snpDataset,
                        ...)
    }
    stopifnot(is(snp_mart, 'Mart'))
}
...
}
* In file R/createGeneLoc-callQTL.R:
	+ at line 34 found '    gene_mart <- useMart(biomart = geneBiomart,'
* In file R/createSNPsLoc-callQTL.R:
	+ at line 19 found '    snp_mart <- useMart(biomart = snpBiomart,'

Documentation

  • Important: Please remove unused files in extdata.

@bioc-issue-bot
Copy link
Collaborator

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

@XFWuCN
Copy link
Author

XFWuCN commented Dec 2, 2024

We are still working on it.

@bioc-issue-bot
Copy link
Collaborator

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

@jianhong
Copy link

Hi @XFWuCN , See the warning in this build,

Error: Your query has been redirected to http://status.ensembl.org indicating this Ensembl service is currently unavailable.
Look at ?useEnsembl for details on how to try a mirror site.
Execution halted

This is the reason why I suggest you to make mart as a separate parameter. However, a separate parameter will not always work. You may want to handle this kind of error in the examples.

@bioc-issue-bot
Copy link
Collaborator

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

@XFWuCN
Copy link
Author

XFWuCN commented Jan 2, 2025

Hi @jianhong, thank you for the review.

Apologies for the delay in our response. Our modifications and answers are as follows:

R code

  • Important: expose all the mart as a parameter.

To accommodate users who may encounter difficulties in connecting to the main database but need to use mirror sites, we have added two new parameters, gene_mart and snp_mart, to the callQTL() function. We also added the gene_mart parameter to the createGeneLoc() function and the snp_mart parameter to the createSNPsLoc() function. This allows users to specify a mirror site in case of connection issues.

For example:

snp_mart <- useEnsembl(biomart = "snps",
                        dataset = "hsapiens_snp",
                        mirror = 'asia')

Do my understandings and modifications seem correct to you? Please let me know if you have any further suggestions, or if there are any additional changes needed.

Documentation

  • Important: Please remove unused files in extdata.

    Done.

@bioc-issue-bot
Copy link
Collaborator

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

@bioc-issue-bot
Copy link
Collaborator

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

@bioc-issue-bot
Copy link
Collaborator

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

@bioc-issue-bot
Copy link
Collaborator

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

@bioc-issue-bot
Copy link
Collaborator

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

@bioc-issue-bot
Copy link
Collaborator

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

@bioc-issue-bot
Copy link
Collaborator

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: "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 Single Package Builder:
Linux (Ubuntu 24.04.1 LTS): scQTLtools_0.99.7.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
Copy link
Collaborator

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

@bioc-issue-bot
Copy link
Collaborator

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

@bioc-issue-bot
Copy link
Collaborator

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

@bioc-issue-bot
Copy link
Collaborator

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.9.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 bioc-issue-bot added OK and removed ERROR labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. review in progress assign a reviewer and a more thorough review of package code and documentation taking place OK
Projects
None yet
Development

No branches or pull requests

4 participants