Contributions icon indicating copy to clipboard operation
Contributions copied to clipboard

consICA

Open biomod-lih opened this issue 3 years ago • 28 comments

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

  • Repository: https://github.com/biomod-lih/consICA

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

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

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

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

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

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

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

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

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

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

For questions/help about the submission process, including questions about the output of the automatic reports generated by the SPB (Single Package Builder), please use the #package-submission channel of our Community Slack. Follow the link on the home page of the Bioconductor website to sign up.

biomod-lih avatar Apr 01 '22 10:04 biomod-lih

Hi @biomod-lih

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: consICA
Type: Package
biocViews: Technology, StatisticalMethod, Sequencing, RNASeq, Transcriptomics, 
  Classification, FeatureExtraction
Title: consensus Indenpendent Component Analysis
Version: 0.99.0
Authors@R: 
    c(person(given = "Petr V.",
   family = "Nazarov",
   role = c("aut", "cre"),
   email = "[email protected]",
   comment = c(ORCID = "0000-0003-3443-0298")),
        person(given = "Tony",
     family = "Kaoma",
     role="aut",
     email="[email protected]",
     comment = c(ORCID = "0000-0002-1269-4826")),
        person(given = "Maryna",
   family = "Chepeleva",
   role = c("aut"),
   email = "[email protected]",
   comment = c(ORCID = "0000-0003-3036-4916"))       
    )
Description: consICA implements a data-driven deconvolution method – consensus 
  independent component analysis (ICA) to decompose heterogeneous omics data and 
  extract features suitable for patient diagnostics and prognostics. 
  The method separates biologically relevant transcriptional signals from 
  technical effects and provides information about cellular composition and biological processes.
  The implementation of parallel computing in the package ensures the efficient 
  analysis on the modern multicore systems.
BugReports: https://github.com/biomod-lih/consICA/issues
License: Artistic-2.0
Encoding: UTF-8
LazyData: false
Imports: fastICA (>= 1.2.1), parallel (>= 3.5.2), doSNOW (>= 1.0.16), 
    sm, org.Hs.eg.db,GO.db, stats, 
    pheatmap,doMC,gplots,survival, topGO, graphics, grDevices
Depends: R (>= 4.1.0)
Suggests: knitr, BiocStyle, rmarkdown
VignetteBuilder: knitr
RoxygenNote: 7.1.2

bioc-issue-bot avatar Apr 01 '22 10:04 bioc-issue-bot

## To save time for this example load result of getGO(cica, alpha = 0.05, db = c("BP", "MF", "CC"))
GOs <- readRDS(url("http://edu.modas.lu/data/consICA/GOs_40_s2022.rds", "r"))
## Search GO (biological process)
# GOs <- getGO(cica, alpha = 0.05, db = "BP")
## Search GO (biological process, molecular function, cellular component)
# GOs <- getGO(cica, alpha = 0.05, db = c("BP", "MF", "CC"))

This readRDS cannot be done in a Bioconductor package. You have to use a durable data distribution source or create an ExperimentHub or AnnotationHub contribution. See the contributor guidelines.

Additionally, your input data should be in a SummarizedExperiment instance.

vjcitn avatar Apr 03 '22 16:04 vjcitn

Hi @vjcitn

Thank you for the remarks. We have switched to using SummarizedExperiment objects.

Regarding loading the file in vignette, we use it only to speed up the demonstration of real analysis. For a non-trivial example of detecting components that correspond to biological processes in our dataset, 40 components are needed and GO searching for them are timeeating. If possible, we would like to use point 6.6 of the package guidelines since this file is intermediate and cannot be published as a dataset in ExperimentHub (if we correctly understand the purpose of ExperimentHub and AnnotationHub). Due to the size, we cannot place it inside the package in inst/extdata/. We have added the analogue of caching to reduce the number of downloads.

biomod-lih avatar Apr 05 '22 14:04 biomod-lih

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 avatar Apr 18 '22 14:04 bioc-issue-bot

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, skipped". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.

Please see the build report for more details. 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 [email protected]:packages/consICA to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot avatar Apr 18 '22 15:04 bioc-issue-bot

Package 'consICA' Review

The package passed check and build. However there are several things need to be fixed.

The DESCRIPTION file

  • [ ] NOTE: R version should be no less than 4.2

The NAMESPACE file

  • [ ] NOTE: Selective imports using importFrom instead of import all with import.
    • in line 14 import(doMC)
    • in line 15 import(doSNOW)
    • in line 16 import(fastICA)
    • in line 17 import(gplots)
    • in line 19 import(parallel)
    • in line 20 import(pheatmap)
    • in line 21 import(survival)
    • in line 22 import(topGO)

General package development

  • [ ] Important: Consider clarifying how 4 object(s) are initialized. Import propar functions for %dopar% foreach and new

  • [ ] NOTE: Consider adding a NEWS file, so your package news will be included in Bioconductor release announcements.

  • [ ] Required: Consider adding unit tests. We strongly encourage them. See http://bioconductor.org/developers/how-to/unitTesting-guidelines/.

R code

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

    • In file R/functionsEnrichment.R:
      • at line 85 found ' topNodes = length(resFisher@score))'
      • at line 96 found ' g2g = matrix("",nrow = length(names(GOdata@graph@nodeData@data)),ncol=4)'
      • at line 97 found ' rownames(g2g) = names(GOdata@graph@nodeData@data)'
      • at line 100 found ' x = ls(GOdata@graph@nodeData@data[[i]][[1]])'
      • at line 176 found ' topNodes = length(resFisher@score))'
      • at line 187 found ' g2g = matrix("",nrow = length(names(GOdata@graph@nodeData@data)),ncol=2)'
      • at line 188 found ' rownames(g2g) = names(GOdata@graph@nodeData@data)'
      • at line 191 found ' x = ls(GOdata@graph@nodeData@data[[i]][[1]])'
  • [ ] Important: is() or inherits() instead of class().

    • In file R/utils.R:
      • at line 105 found ' if (class(data[[i]])%in%c("numeric","double")){'
      • at line 119 found ' if (class(data[[i]])%in%c("numeric","double"))'
      • at line 278 found ' if (!class(x) %in% c("numeric","double","integer")) return(factor(x))'
  • [ ] Important: No paste in message(), message, stop

    • In file R/saveReport.R:
      • at line 236 found ' message(paste("Report saved to", file))'
  • [ ] Important: message(), message, stop instead of cat.

    • In file R/consICA.R:
      • at line 116 found ' cat("*** Starting",ifelse(ncores>1,"parallel",""),"calculation on",'
      • at line 118 found ' cat("*** System:",.Platform$OS.type,"\n")'
      • at line 119 found ' cat("***",ncomp,"components,",ntry,"runs,",nrow(X),"features,",'
      • at line 121 found ' cat("*** Start time:",as.character(Sys.time()),"\n")'
      • at line 145 found ' cat(paste("Execute one-core analysis", '
      • at line 168 found ' if(verbose) cat("try #",itry,"of",ntry,"\n")'
      • at line 177 found ' cat("*** Done!", "\n")'
      • at line 178 found ' cat("*** End time:",as.character(Sys.time()),"\n")'
      • at line 179 found ' cat(Sys.time()-t0, "\n")'
      • at line 192 found ' if(verbose) cat("Calculate ||X-SxM|| and r2 between component weights\n")'
      • at line 214 found ' if(verbose) cat("Correlate rows of S between tries\n")'
      • at line 226 found ' if(verbose) cat("Build consensus ICA\n")'
      • at line 242 found ' if(verbose) cat("Analyse stability\n")'
      • at line 258 found ' if(verbose) cat("consensus ICA done\n")'
    • In file R/functionsEnrichment.R:
      • at line 30 found ' if (is.na(ntop)) cat("ntop is NA => using FDR (FC) as limits\n")'
      • at line 127 found ' if (is.na(ntop)) cat("ntop is NA => using FDR (FC) as limits\n")'
      • at line 146 found ' cat("Significant:",sum(score>0),"\n")'
      • at line 159 found ' cat("Checking DB. The best overlap with [",id,"] gene IDs:",max(common),"\n")'
    • In file R/getGO.R:
      • at line 45 found ' cat("Check db parameter!\n")'
      • at line 72 found ' cat("----\nComponent",icomp,"----\n\n")'
  • [ ] NOTE: :: is not suggested in source code unless you can make sure all the packages are imported. Please note that you need to manully double check the import items when you make any change in the DESCRIPTION file during development.

    • In file R/consICA.R:
      • at line 130 found ' ic <- fastICA::fastICA(X,n.comp=ncomp,alg.typ=alg.typ,fun=fun)'
      • at line 135 found ' ic <- fastICA::fastICA(x,n.comp=ncomp,alg.typ=alg.typ,fun=fun)'
    • In file R/functionsEnrichment.R:
      • at line 67 found ' myGO2genes <- topGO::annFUN.org(whichOnto=db, mapping = genome, ID="ensembl")'
      • at line 154 found ' myGO2genes <- topGO::annFUN.org(whichOnto=db,mapping = genome,ID = id[i])'
      • at line 161 found ' myGO2genes <- topGO::annFUN.org(whichOnto=db, mapping = genome, ID = id)'
  • [ ] Important: 1:n is not suggested in source code. Use seq_along or seq.int instead.

    • In file R/consICA.R:
      • at line 81 found ' colnames(S[[1]]) <- sprintf("ic.%d",1:ncomp)'
      • at line 86 found ' rownames(M[[1]]) <- sprintf("ic.%d",1:ncomp)'
      • at line 95 found ' idx.excludeSamples <- sample(1:ncol(X),ntry, replace = (ntry > ncol(X)))'
      • at line 126 found ' MRICA <- foreach(itry=1:ntry) %dopar% {'
      • at line 152 found ' for(itry in 1:ntry){'
      • at line 193 found ' for (itry in 1:ntry){'
      • at line 216 found ' s.cor[Res$i.best,] <- 1:ncomp'
      • at line 218 found ' for (itry in (1:ntry)[-Res$i.best]) {'
      • at line 221 found ' for (ic in 1:ncomp)'
      • at line 231 found ' for (ic in 1:ncomp) {'
      • at line 244 found ' for (itry in (1:ntry)) {'
      • at line 307 found ' colnames(Res$S) <- sprintf("ic.%d",1:ncomp)'
      • at line 312 found ' rownames(Res$M) <- sprintf("ic.%d",1:ncomp)'
    • In file R/functionsEnrichment.R:
      • at line 38 found ' score[sort(score,index.return=TRUE,decreasing=TRUE)$ix[-(1:ntop)]]=0'
      • at line 45 found ' score[sort(score,index.return=TRUE,decreasing=TRUE)$ix[-(1:ntop)]]=0'
      • at line 62 found ' score[sample(1:length(genes),n,prob=prob2)]=1+rexp(n,1/mean(score[score>0]))'
      • at line 63 found ' score[sample(1:length(genes),n,prob=prob1)]=0'
      • at line 99 found ' for (i in 1:nrow(g2g)) {'
      • at line 134 found ' score[sort(score,index.return=TRUE,decreasing=TRUE)$ix[-(1:ntop)]]=0'
      • at line 141 found ' score[sort(score,index.return=TRUE,decreasing=TRUE)$ix[-(1:ntop)]]=0'
      • at line 153 found ' for ( i in 1:length(id)){'
      • at line 190 found ' for (i in 1:nrow(g2g)) {'
    • In file R/getGO.R:
      • at line 50 found ' for (icomp in 1:ncol(IC$S)){'
    • In file R/saveReport.R:
      • at line 35 found ' show.components = 1:ncol(IC$S)){'
      • at line 46 found ' for (icomp in 1:ncomp){'
      • at line 73 found ' for (i in 1:nrow(Genes[[icomp]]$neg)) text(0,0.99-i/80,txt[i],'
      • at line 85 found ' for (i in 1:nrow(Genes[[icomp]]$pos)) text(0.5,0.99-i/80,txt[i],'
      • at line 100 found ' if (nrow(tab)>0) drawTable(tab[1:min(20,nrow(tab)),],x0=0,y0=0.98,'
      • at line 109 found ' if (nrow(tab)>0) drawTable(tab[1:min(20,nrow(tab)),],x0=0,y0=0.98,'
      • at line 120 found ' if (nrow(tab)>0) drawTable(tab[1:min(10,nrow(tab)),],x0=0,y0=0.98,'
      • at line 129 found ' if (nrow(tab)>0) drawTable(tab[1:min(10,nrow(tab)),],x0=0,y0=0.98,'
      • at line 140 found ' if (nrow(tab)>0) drawTable(tab[1:min(10,nrow(tab)),],x0=0,y0=0.98,'
      • at line 149 found ' if (nrow(tab)>0) drawTable(tab[1:min(10,nrow(tab)),],x0=0,y0=0.98,'
      • at line 180 found ' for (ifact in 1:ncol(Var)){'
      • at line 196 found ' for (ifact in 1:min(8,length(pv))){'
      • at line 209 found ' for (i in 1:nlevels(fact)) xf[[i]] = x[fact == levels(fact)[i]]'
    • In file R/survivalAnalysis.R:
      • at line 47 found ' for (icomp in 1:nrow(IC$M)){'
      • at line 68 found ' for (i in 1:length(score)){'
    • In file R/utils.R:
      • at line 54 found ' if (all(rn %in% 1:nrow(x))) rn <- as.numeric(rn)'
      • at line 74 found ' for (icomp in 1:ncomp){'
      • at line 84 found ' return(order(x,na.last=TRUE,decreasing=TRUE)[1:n])'
      • at line 92 found ' for (i in 1:ncol(data))'
      • at line 104 found ' for (i in 1:ncol(data)){'
      • at line 118 found ' for (i in 1:ncol(data))'
      • at line 130 found ' x = c(0,dx[1:(length(x)-1)])'
      • at line 137 found ' y[-1] = dy[1: length(y[-1])]'
      • at line 152 found ' for (iy in 1:nrow(Tab)){'
      • at line 157 found ' for (ix in 1:ncol(Tab)){'
      • at line 181 found ' at <- 1:n'
      • at line 193 found ' for (i in 1:n) {'
      • at line 238 found ' for (i in 1:n) {'
      • at line 258 found ' for (i in 1:n) {'
    • In file R/varianceExplained.R:
      • at line 38 found ' 1:ncol(S),'
  • [ ] NOTE: Vectorize: no unnecessary for loops present.

    • In file R/consICA.R:
      • at line 152 found ' for(itry in 1:ntry){'
      • at line 193 found ' for (itry in 1:ntry){'
      • at line 218 found ' for (itry in (1:ntry)[-Res$i.best]) {'
      • at line 221 found ' for (ic in 1:ncomp)'
      • at line 230 found ' for (itry in 2:ntry){ ## itry=2, because 1 is already there'
      • at line 231 found ' for (ic in 1:ncomp) {'
      • at line 244 found ' for (itry in (1:ntry)) {'
    • In file R/featureSelection.R:
      • at line 28 found ' for (icomp in colnames(cica$S)){'
    • In file R/functionsEnrichment.R:
      • at line 99 found ' for (i in 1:nrow(g2g)) {'
      • at line 153 found ' for ( i in 1:length(id)){'
      • at line 190 found ' for (i in 1:nrow(g2g)) {'
    • In file R/getGO.R:
      • at line 50 found ' for (icomp in 1:ncol(IC$S)){'
    • In file R/saveReport.R:
      • at line 46 found ' for (icomp in 1:ncomp){'
      • at line 47 found ' for (direct in c("neg","pos"))'
      • at line 52 found ' for (icomp in show.components){'
      • at line 73 found ' for (i in 1:nrow(Genes[[icomp]]$neg)) text(0,0.99-i/80,txt[i],'
      • at line 81 found ' #for (i in 1:nrow(Genes[[icomp]]$pos)) text(0.5,1-i/60,'
      • at line 85 found ' for (i in 1:nrow(Genes[[icomp]]$pos)) text(0.5,0.99-i/80,txt[i],'
      • at line 180 found ' for (ifact in 1:ncol(Var)){'
      • at line 196 found ' for (ifact in 1:min(8,length(pv))){'
      • at line 209 found ' for (i in 1:nlevels(fact)) xf[[i]] = x[fact == levels(fact)[i]]'
    • In file R/survivalAnalysis.R:
      • at line 47 found ' for (icomp in 1:nrow(IC$M)){'
      • at line 68 found ' for (i in 1:length(score)){'
      • at line 72 found ' for (comp in names(d[[i]])) {'
    • In file R/utils.R:
      • at line 74 found ' for (icomp in 1:ncomp){'
      • at line 75 found ' for (direct in c("neg","pos"))'
      • at line 92 found ' for (i in 1:ncol(data))'
      • at line 104 found ' for (i in 1:ncol(data)){'
      • at line 118 found ' for (i in 1:ncol(data))'
      • at line 152 found ' for (iy in 1:nrow(Tab)){'
      • at line 157 found ' for (ix in 1:ncol(Tab)){'
      • at line 193 found ' for (i in 1:n) {'
      • at line 238 found ' for (i in 1:n) {'
      • at line 258 found ' for (i in 1:n) {'
      • at line 281 found ' for (ilev in 2:nlev)'
  • [ ] Important: Remove unused code.

    • In file R/consICA.R:
      • at line 71 found ' # if(nrow(X) == 0) {cat(X is epmpty);return NULL}'
      • at line 91 found ' #Res$mse <- NA ## mean square error bw X and S*M'
      • at line 93 found ' #Res$n3 <- NA ## mean number of elements in |S| over 3'
      • at line 103 found ' # require(foreach)'
      • at line 105 found ' #require(doMC)'
      • at line 109 found ' #require(doSNOW)'
      • at line 169 found ' #flush.console()'
      • at line 190 found ' #if (!is.null(savecomp)) save(list=ls(),file=savecomp) # not for user/mc'
      • at line 194 found ' #Res$mse[itry] <-sum(X -mean(X)-S[[itry]]%*%M[[itry]])^2/ncol(X)/nrow(X)'
      • at line 198 found ' #Res$n3[itry] <- sum(apply(abs(S[[itry]])>3,2,sum))/ncomp'
      • at line 251 found ' #Res$mse = NULL'
    • In file R/functionsEnrichment.R:
      • at line 77 found ' #annot = annFUN.org,'
      • at line 78 found ' #mapping = genome) '
      • at line 79 found ' #ID = "ensembl")'
      • at line 125 found ' #requireNamespace("topGO")'
    • In file R/getGO.R:
      • at line 88 found ' # cat("\n\nBP:",sum(GOBP[[icomp]]$pos$FDR<alpha),"enriched\n");'
      • at line 89 found ' # cat("\n\nCC:",sum(GOCC[[icomp]]$pos$FDR<alpha),"enriched\n");'
      • at line 90 found ' # cat("\n\nMF:",sum(GOMF[[icomp]]$pos$FDR<alpha),"enriched\n");'
      • at line 106 found ' # cat("\n\nBP:",sum(GOBP[[icomp]]$neg$FDR<alpha),"enriched\n");'
      • at line 107 found ' # cat("\n\nCC:",sum(GOCC[[icomp]]$neg$FDR<alpha),"enriched\n");'
      • at line 108 found ' # cat("\n\nMF:",sum(GOMF[[icomp]]$neg$FDR<alpha),"enriched\n");'
    • In file R/saveReport.R:
      • at line 53 found ' #cat("Working with component #",icomp,"\n")'
      • at line 57 found ' #title(bquote("Component #" ~ .(icomp) ~ "( mean"~ R^2 ~ "="~ .'
      • at line 58 found ' #(sprintf("%.3f",mean(IC$stab[,icomp])))~")" ),cex.main=0.8)'
      • at line 81 found ' #for (i in 1:nrow(Genes[[icomp]]$pos)) text(0.5,1-i/60,'
      • at line 82 found ' #Genes[[icomp]]$pos$genes[i],col="#880000",adj=c(0,0),cex=0.5)'
      • at line 157 found ' #cat("Survival\n")'
      • at line 158 found ' #require("survival")'
      • at line 177 found ' #cat("ANOVA\n")'
    • In file R/survivalAnalysis.R:
      • at line 76 found ' #score[[i]] <- score[[i]] / length(d[[i]])'
    • In file R/utils.R:
      • at line 150 found ' #if (0) library(grDevices)'
  • [ ] NOTE: Functional programming: code repetition.

    • repetition in consICA and oneICA
      • in consICA
        • line 7: if (!is.null(filter.thr))
        • line 8: X = X[apply(X, 1, max) > filter.thr, ]
        • line 9: Res <- list()
        • line 10: Res$X <- Xse
        • line 13: S[[1]] <- matrix(nrow = nrow(X), ncol = ncomp)
        • line 14: rownames(S[[1]]) <- rownames(X)
        • line 15: colnames(S[[1]]) <- sprintf("ic.%d", 1:ncomp)
        • line 16: M[[1]] <- matrix(nrow = ncomp, ncol = ncol(X))
        • line 17: colnames(M[[1]]) <- colnames(X)
        • line 18: rownames(M[[1]]) <- sprintf("ic.%d", 1:ncomp)
        • line 161: Res$ncomp <- ncomp
        • line 162: Res$nsples <- ncol(X)
        • line 163: Res$nfeatures <- nrow(X)
        • line 164: if (verbose)
      • in oneICA
        • line 7: if (!is.null(filter.thr))
        • line 8: X <- X[apply(X, 1, max) > filter.thr, ]
        • line 9: if (!reduced)
        • line 10: Res$X <- Xse
        • line 11: Res$S <- matrix(nrow = nrow(X), ncol = ncomp)
        • line 12: rownames(Res$S) <- rownames(X)
        • line 13: colnames(Res$S) <- sprintf("ic.%d", 1:ncomp)
        • line 14: Res$M <- matrix(nrow = ncomp, ncol = ncol(X))
        • line 15: colnames(Res$M) <- colnames(Res$X)
        • line 16: rownames(Res$M) <- sprintf("ic.%d", 1:ncomp)
        • line 21: Res$ncomp <- ncomp
        • line 22: Res$nsples <- ncol(X)
        • line 23: Res$nfeatures <- nrow(X)
        • line 24: return(Res)
    • repetition in enrichGO and enrichGOens
      • in enrichGO
        • line 6: groupGOTerms()
        • line 7: if (is.na(ntop))
        • line 8: cat("ntop is NA => using FDR (FC) as limits\n")
        • line 9: if (is.null(fc) | is.na(thr.fc)) {
        • line 10: score = (-log10(fdr))
        • line 11: if (is.na(ntop)) {
        • line 12: score[fdr >= thr.fdr] = 0
        • line 13: }
        • line 14: else {
        • line 15: score[sort(score, index.return = TRUE, decreasing = TRUE)$ix[-(1:ntop)]] = 0
        • line 16: }
        • line 17: }
        • line 18: else {
        • line 19: score = (-log10(fdr) * abs(fc))
        • line 20: if (is.na(ntop)) {
        • line 21: score[fdr >= thr.fdr | abs(fc) <= thr.fc] = 0
        • line 22: }
        • line 23: else {
        • line 24: score[sort(score, index.return = TRUE, decreasing = TRUE)$ix[-(1:ntop)]] = 0
        • line 25: }
        • line 26: }
        • line 27: names(score) = genes
        • line 41: }
        • line 42: myGO2genes <- topGO::annFUN.org(whichOnto = db, mapping = genome,
        • line 43: ID = id)
        • line 44: SelectScore = function(sc) {
        • line 45: return(sc > 0)
        • line 46: }
        • line 47: GOdata = new("topGOdata", ontology = db, allGenes = score,
        • line 48: geneSelectionFun = SelectScore, annot = annFUN.GO2genes,
        • line 49: GO2genes = myGO2genes)
        • line 50: resFisher = runTest(GOdata, algorithm = algorithm, statistic = "fisher")
        • line 51: enrichRes = GenTable(GOdata, classicFisher = resFisher, ranksOf = "classicFisher",
        • line 52: topNodes = length(resFisher@score))
        • line 53: enrichRes$classicFisher[grep("<", enrichRes$classicFisher)] = "1e-31"
        • line 54: enrichRes$classicFisher = as.double(enrichRes$classicFisher)
        • line 55: enrichRes$FDR = p.adjust(enrichRes$classicFisher, "fdr")
        • line 56: enrichRes$Score = -log10(enrichRes$FDR)
        • line 57: if (!do.sort)
        • line 58: enrichRes = sortDataFrame(enrichRes, "GO.ID")
        • line 59: rownames(enrichRes) = enrichRes$GO.ID
        • line 60: if (return.genes) {
        • line 61: sig.genes = genes[score > 0]
        • line 62: g2g = matrix("", nrow = length(names(GOdata@graph@nodeData@data)),
        • line 63: ncol = 2)
        • line 64: rownames(g2g) = names(GOdata@graph@nodeData@data)
        • line 65: colnames(g2g) = c("genes.all", "genes.sig")
        • line 66: for (i in 1:nrow(g2g)) {
        • line 67: x = ls(GOdata@graph@nodeData@data[[i]][[1]])
        • line 68: x.sig = x[x %in% sig.genes]
        • line 69: g2g[i, "genes.all"] = paste(x, collapse = ",")
        • line 70: g2g[i, "genes.sig"] = paste(x.sig, collapse = ",")
        • line 71: if (i%%1000 == 0)
        • line 73: }
        • line 74: enrichRes$genes.sig = g2g[enrichRes$GO.ID, "genes.sig"]
        • line 75: enrichRes$genes.all = g2g[enrichRes$GO.ID, "genes.all"]
        • line 76: }
        • line 77: return(enrichRes)
      • in enrichGOens
        • line 4:{
        • line 5: if (is.na(ntop))
        • line 6: cat("ntop is NA => using FDR (FC) as limits\n")
        • line 7: if (is.null(fc) | is.na(thr.fc)) {
        • line 8: score = (-log10(fdr))
        • line 9: if (is.na(ntop)) {
        • line 10: score[fdr >= thr.fdr] = 0
        • line 11: }
        • line 12: else {
        • line 13: score[sort(score, index.return = TRUE, decreasing = TRUE)$ix[-(1:ntop)]] = 0
        • line 14: }
        • line 15: }
        • line 16: else {
        • line 17: score = (-log10(fdr) * abs(fc))
        • line 18: if (is.na(ntop)) {
        • line 19: score[fdr >= thr.fdr | abs(fc) <= thr.fc] = 0
        • line 20: }
        • line 21: else {
        • line 22: score[sort(score, index.return = TRUE, decreasing = TRUE)$ix[-(1:ntop)]] = 0
        • line 23: }
        • line 24: }
        • line 25: names(score) = genes
        • line 37: }
        • line 38: myGO2genes <- topGO::annFUN.org(whichOnto = db, mapping = genome,
        • line 39: ID = "ensembl")
        • line 40: SelectScore = function(sc) {
        • line 41: return(sc > 0)
        • line 42: }
        • line 43: GOdata = new("topGOdata", ontology = db, allGenes = score,
        • line 44: geneSelectionFun = SelectScore, annot = annFUN.GO2genes,
        • line 45: GO2genes = myGO2genes)
        • line 46: resFisher = runTest(GOdata, algorithm = "classic", statistic = "fisher")
        • line 47: enrichRes = GenTable(GOdata, classicFisher = resFisher, ranksOf = "classicFisher",
        • line 48: topNodes = length(resFisher@score))
        • line 49: enrichRes$classicFisher[grep("<", enrichRes$classicFisher)] = "1e-31"
        • line 50: enrichRes$classicFisher = as.double(enrichRes$classicFisher)
        • line 51: enrichRes$FDR = p.adjust(enrichRes$classicFisher, "fdr")
        • line 52: enrichRes$Score = -log10(enrichRes$FDR)
        • line 53: if (!do.sort)
        • line 54: enrichRes = sortDataFrame(enrichRes, "GO.ID")
        • line 55: rownames(enrichRes) = enrichRes$GO.ID
        • line 56: if (return.genes) {
        • line 57: sig.genes = genes[score > 0]
        • line 58: g2g = matrix("", nrow = length(names(GOdata@graph@nodeData@data)),
        • line 59: ncol = 4)
        • line 60: rownames(g2g) = names(GOdata@graph@nodeData@data)
        • line 61: colnames(g2g) = c("n.sig", "n.all", "genes.sig", "genes.all")
        • line 62: for (i in 1:nrow(g2g)) {
        • line 63: x = ls(GOdata@graph@nodeData@data[[i]][[1]])
        • line 64: x.sig = x[x %in% sig.genes]
        • line 65: g2g[i, "genes.all"] = paste(x, collapse = ",")
        • line 66: g2g[i, "genes.sig"] = paste(x.sig, collapse = ",")
        • line 67: g2g[i, "n.all"] = length(x)
        • line 74: enrichRes$genes.sig = g2g[enrichRes$GO.ID, "genes.sig"]
        • line 75: enrichRes$genes.all = g2g[enrichRes$GO.ID, "genes.all"]
        • line 76: }
        • line 77: return(enrichRes)
    • repetition in getFeatures and getGO
      • in getFeatures
        • line 12: pv[pv > 0.5] <- 1 - pv[pv > 0.5]
        • line 13: fdr <- p.adjust(pv, method = "BH")
        • line 14: fdr.pos <- fdr
        • line 15: fdr.neg <- fdr
      • in getGO
        • line 22: pv[pv > 0.5] = 1 - pv[pv > 0.5]
        • line 23: fdr = p.adjust(pv, method = "BH")
        • line 24: fdr.pos = fdr
        • line 25: fdr.neg = fdr
    • repetition in saveReport and sortFeatures
      • in saveReport
        • line 15: icomp <- 1
        • line 16: for (icomp in 1:ncomp) {
        • line 17: for (direct in c("neg", "pos")) if (nrow(Genes[[icomp]][[direct]]) >
        • line 18: 1)
        • line 19: Genes[[icomp]][[direct]] <- sortDataFrame(Genes[[icomp]][[direct]],
        • line 20: "fdr")
        • line 21: }
      • in sortFeatures
        • line 1:{
        • line 2: ncomp = length(Genes)
        • line 3: for (icomp in 1:ncomp) {
        • line 4: for (direct in c("neg", "pos")) if (nrow(Genes[[icomp]][[direct]]) >
        • line 5: 1)
        • line 6: Genes[[icomp]][[direct]] = sortDataFrame(Genes[[icomp]][[direct]],
        • line 7: "fdr")
        • line 8: }
      • repetition in getGO, saveReport, for ontology categories:
  • [ ] NOTE: use BiocParallel for parallel evaluation.

  • [ ] Important: export parameter for parallel register other than do it within function.

  • [ ] Important: Validate the inputs at beginning of the function.

  • [ ] NOTE: ifelse("BP" %in% db, TRUE, FALSE) can be simplified as "BP" %in% db

  • [ ] NOTE: Avoid using '=' for assignment and use '<-' instead.

Documentation

  • [ ] Required: Vignette should have an Introduction section..
    • rmd file vignettes/ConsICA.Rmd

jianhong avatar Apr 19 '22 21:04 jianhong

@biomod-lih could you please respond and make corrections based on reviewers comments? we like to see progress in 3-4 weeks time to keep the review process moving forward.

lshep avatar Jun 03 '22 13:06 lshep

This issue is being closed because there has been no progress for an extended period of time. You may reopen the issue when you have the time to actively participate in the review / submission process. Please also keep in mind that a package accepted to Bioconductor requires a commitment on your part to ongoing maintenance.

Thank you for your interest in Bioconductor.

bioc-issue-bot avatar Jun 15 '22 11:06 bioc-issue-bot

Dear @lshep, we a sorry for the long answer. After careful revision, we wish to resubmit our R-package to be published at the Bioconductor. Is it possible to reopen #2609 or we should open a new issue?

biomod-lih avatar Jul 13 '22 14:07 biomod-lih

Dear @biomod-lih ,

We have reopened the issue to continue the review process. Please remember to push a version bump to git.bioconductor.org to trigger a new build.

bioc-issue-bot avatar Jul 13 '22 14:07 bioc-issue-bot

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

bioc-issue-bot avatar Jul 14 '22 12:07 bioc-issue-bot

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

bioc-issue-bot avatar Jul 14 '22 12:07 bioc-issue-bot

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

bioc-issue-bot avatar Jul 14 '22 20:07 bioc-issue-bot

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, skipped". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.

Please see the build report for more details. 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 [email protected]:packages/consICA to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot avatar Jul 14 '22 20:07 bioc-issue-bot

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

bioc-issue-bot avatar Jul 14 '22 20:07 bioc-issue-bot

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

bioc-issue-bot avatar Jul 14 '22 21:07 bioc-issue-bot

Dear @biomod-lih ,

We have reopened the issue to continue the review process. Please remember to push a version bump to git.bioconductor.org to trigger a new build.

bioc-issue-bot avatar Jul 15 '22 07:07 bioc-issue-bot

Dear @jianhong, we would ask to continue the review process. Below is a line-by-line response to your remarks.

The DESCRIPTION file

  • [x] NOTE: R version should be no less than 4.2

The NAMESPACE file

  • [x] NOTE: Selective imports using importFrom instead of import all with import.

General package development

  • [x] Important: Consider clarifying how 4 object(s) are initialized. Import propar functions for %dopar% foreach and new Only new is used after updates.
  • [x] NOTE: Consider adding a NEWS file, so your package news will be included in Bioconductor release announcements.
  • [x] Required: Consider adding unit tests. We strongly encourage them. See http://bioconductor.org/developers/how-to/unitTesting-guidelines/.

R code

  • [x] NOTE: no direct slot access with @ or slot() - accessors implemented and used.
  • [x] Important: is() or inherits() instead of class().
  • [x] Important: No paste in message(), message, stop
  • [x] Important: message(), message, stop instead of cat.
  • [x] NOTE: :: is not suggested in source code unless you can make sure all the packages are imported. Please note that you need to manully double check the import items when you make any change in the DESCRIPTION file during development.
  • [x] Important: 1:n is not suggested in source code. Use seq_along or seq.int instead.
  • [x] NOTE: Vectorize: no unnecessary for loops present. (fixed partially where justified)
  • [x] Important: Remove unused code.
  • [x] NOTE: Functional programming: code repetition. (fixed partially where justified)
  • [x] NOTE: use BiocParallel for parallel evaluation.
  • [x] Important: export parameter for parallel register other than do it within function.
  • [x] Important: Validate the inputs at beginning of the function. (added partially)
  • [x] NOTE: ifelse("BP" %in% db, TRUE, FALSE) can be simplified as "BP" %in% db
  • [x] NOTE: Avoid using '=' for assignment and use '<-' instead.

Documentation

  • [x] Required: Vignette should have an Introduction section..

biomod-lih avatar Jul 15 '22 07:07 biomod-lih

Package 'consICA' Review

It is almost there. However there are several things need to be fixed. Please try to answer the comments line by line when you are ready for a review.

The NAMESPACE file

  • [ ] Selective imports using importFrom instead of import all with import.
    • in line 13 import(BiocParallel)

R code

  • [ ] Important: Remove unused code.
    • In file R/functionsEnrichment.R:
      • at line 54 found ' #?docker:myGO2genes <- topGO::annFUN.org(whichOnto=db, mapping=genome,ID=id)'
  • [ ] NOTE: Avoid using '=' for assignment and use '<-' instead
    • In file R/functionsEnrichment.R:
      • at line 111 found ' score[fdr>=thr.fdr]=0'
    • In file R/getFeatures.R:
      • at line 35 found ' fdr.pos[fdr > alpha | z<0]=1'
      • at line 36 found ' fdr.neg[fdr > alpha | z>0]=1'
    • In file R/saveReport.R:
      • at line 151-216 found ' ix = 1; iy = 1 ...'
  • [ ] NOTE: Please consider to add drop=FALSE to avoid the reduction of dimension for matrices and arrays.
    • In file R/consICA.R:
      • at line 80 found ' if (!is.null(filter.thr)) X <- X[apply(X,1,max)>filter.thr,]'
      • at line 315 found ' if (!is.null(filter.thr)) X <- X[apply(X,1,max)>filter.thr,]'

Documentation

  • [ ] Important: Package unavailable to check Rd xrefs: ‘MOFA2’ in estimateVarianceExplained.Rd
  • [ ] Important: Faild in building vignettes in MAC m1 chip. crashed at line:101. If I download the file to local, there is no issue. I don't know this is because my laptop or not.
Quitting from lines 99-110 (ConsICA.Rmd) 
Error in readRDS(url("http://edu.modas.lu/data/consICA/GOs_40_s2022.rds",  : 
  cannot read from connection
  • [ ] Important: Vignette includes motivation for submitting to Bioconductor as part of the abstract/intro of the main vignette.

jianhong avatar Aug 12 '22 15:08 jianhong

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

bioc-issue-bot avatar Aug 24 '22 15:08 bioc-issue-bot

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

bioc-issue-bot avatar Aug 24 '22 15:08 bioc-issue-bot

Dear @jianhong,

Thank you for the comments. Please find our line-by-line answer below.

The NAMESPACE file

  • [x] Selective imports using importFrom instead of import all with import.
    • in line 13 import(BiocParallel)

Done.

R code

  • [x] Important: Remove unused code.
    • In file R/functionsEnrichment.R:
      • at line 54 found ' #?docker:myGO2genes <- topGO::annFUN.org(whichOnto=db, mapping=genome,ID=id)'

Done.

  • [x] NOTE: Avoid using '=' for assignment and use '<-' instead
    • In file R/functionsEnrichment.R:
      • at line 111 found ' score[fdr>=thr.fdr]=0'
    • In file R/getFeatures.R:
      • at line 35 found ' fdr.pos[fdr > alpha | z<0]=1'
      • at line 36 found ' fdr.neg[fdr > alpha | z>0]=1'
    • In file R/saveReport.R:
      • at line 151-216 found ' ix = 1; iy = 1 ...'

Fixed.

  • [x] NOTE: Please consider to add drop=FALSE to avoid the reduction of dimension for matrices and arrays.
    • In file R/consICA.R:
      • at line 80 found ' if (!is.null(filter.thr)) X <- X[apply(X,1,max)>filter.thr,]'
      • at line 315 found ' if (!is.null(filter.thr)) X <- X[apply(X,1,max)>filter.thr,]'

Done.

Documentation

  • [x] Important: Package unavailable to check Rd xrefs: ‘MOFA2’ in estimateVarianceExplained.Rd

Fixed.

  • [x] Important: Faild in building vignettes in MAC m1 chip. crashed at line:101. If I download the file to local, there is no issue. I don't know this is because my laptop or not.
Quitting from lines 99-110 (ConsICA.Rmd) 
Error in readRDS(url("http://edu.modas.lu/data/consICA/GOs_40_s2022.rds",  : 
  cannot read from connection

We checked the ability to download, it's works. Possibly, it was a one-time connection failure.

  • [x] Important: Vignette includes motivation for submitting to Bioconductor as part of the abstract/intro of the main vignette.

We added it to the abstract of the vignette.

biomod-lih avatar Aug 24 '22 15:08 biomod-lih

Package 'consICA' Review

One minor change need to be addressed.

R code

  • [ ] NOTE: Avoid using '=' for assignment and use '<-' instead
    • In file R/consICA.R:
      • at line 147 found ' bp_param$progressbar = TRUE'

jianhong avatar Sep 01 '22 17:09 jianhong

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

bioc-issue-bot avatar Sep 02 '22 14:09 bioc-issue-bot

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

bioc-issue-bot avatar Sep 02 '22 15:09 bioc-issue-bot

@jianhong, we fixed it, thank you.

R code

  • [x] NOTE: Avoid using '=' for assignment and use '<-' instead
    • In file R/consICA.R:
      • at line 147 found ' bp_param$progressbar = TRUE'

biomod-lih avatar Sep 02 '22 15:09 biomod-lih

Your package has been accepted. It will be added to the Bioconductor nightly builds.

Thank you for contributing to Bioconductor!

Reviewers for Bioconductor packages are volunteers from the Bioconductor community. If you are interested in becoming a Bioconductor package reviewer, please see Reviewers Expectations.

bioc-issue-bot avatar Sep 02 '22 15:09 bioc-issue-bot

@jianhong Thank you very much for reviewing the consICA package!

biomod-lih avatar Sep 02 '22 15:09 biomod-lih

Dear @lshep

Just a kind reminder to make sure you didn't miss the completion of the review, as we've seen, usually a package is included in a build very quickly.

biomod-lih avatar Sep 08 '22 15:09 biomod-lih

I normally process packages on Fridays. I'll try to get to this later today if possible.

lshep avatar Sep 08 '22 15:09 lshep