Closed WT215 closed 6 years ago
Hi @WT215
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: bayNorm
Type: Package
Title: Single-cell RNA sequencing data normalization
Version: 0.99.0
Authors@R: c(person("Wenhao", "Tang", role=c("aut", "cre"),
email="wt215@ic.ac.uk"),
person("Fran<U+00E7>ois", "Bertaux", role=c("aut")),
person("Philipp", "Thomas", role=c("aut")),
person("Claire", "Stefanelli", role=c("aut")),
person("Malika", "Saint", role=c("aut")),
person("Samuel", "Marguerat", role=c("aut")),
person("Vahid", "Shahrezaei", role=c("aut")))
Maintainer: Wenhao Tang <wt215@ic.ac.uk>
Description: bayNorm is used for normalizing single-cell RNA-seq data.
License: GPL (>= 2)
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.0
Depends:
R (>= 3.5),
Imports:
Rcpp (>= 0.12.12),
BB,
foreach,
iterators,
doSNOW,
parallel,
MASS,
locfit,
fitdistrplus,
stats,
methods,
graphics,
grDevices,
SummarizedExperiment,
utils
LinkingTo: Rcpp, RcppArmadillo,RcppProgress
Suggests:
knitr,
rmarkdown,
BiocStyle,
devtools,
testthat
VignetteBuilder: knitr
biocViews: Normalization, RNASeq, SingleCell,Sequencing
URL: https://github.com/WT215/bayNorm
BugReports: https://github.com/WT215/bayNorm/issues
Add SSH keys to your GitHub account. SSH keys will are used to control access to accepted Bioconductor packages. See these instructions to add SSH keys to your GitHub account.
A reviewer has been assigned to your package. Learn what to expect during the review process.
IMPORTANT: Please read the instructions for setting up a push hook on your repository, or further changes to your repository will NOT trigger a new build.
A reviewer has been assigned to your package. Learn what to expect during the review process.
IMPORTANT: Please read the instructions for setting up a push hook on your repository, or further changes to your repository will NOT trigger a new build.
Dear Package contributor,
This is the automated single package builder at bioconductor.org.
Your package has been built on Linux, Mac, and Windows.
On one or more platforms, the build results were: "WARNINGS". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.
Please see the build report for more details.
Received a valid push; starting a build. Commits are:
5cab86e Fix two warnings reported by Bioconductor
Dear Package contributor,
This is the automated single package builder at bioconductor.org.
Your package has been built on Linux, Mac, and Windows.
On one or more platforms, the build results were: "WARNINGS". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.
Please see the build report for more details.
Received a valid push; starting a build. Commits are:
f796fae version bump
Dear Package contributor,
This is the automated single package builder at bioconductor.org.
Your package has been built on Linux, Mac, and Windows.
On one or more platforms, the build results were: "WARNINGS". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.
Please see the build report for more details.
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.
Thank you for your submission to Bioconductor. Please see the following comments:
General: You need to provide a runnable executable example of your functions. It is unacceptable that all of your code is either in eval=FALSE in vignette or dontrun in man pages. Provide a small dummy set of data that will run in the time constraints. I recommend providing an example of using the SummarizedExperiment option for your functions as this is the common Bioconductor infastructure your package supports.
Build Report
README
DESCRIPTION
VIGNETTE
MAN
R Code
general
[ ] It looks like the data in summarizedExperiment has to be a specific name or is expecting/assuming something about the first data assay - any assumptions should be made clearer in the man page
[ ] Some code can be simplified especially if the code is repeated. For example in noisygene_detection.r the function arguments are the same but the function calls are different
if(!mode_version & !mean_version){
bayNorm_C_array<-Main_NB_Bay(
Data=synthetic_out$N_c,
BETA_vec=synthetic_out$beta_c,
size=size_c,mu=mu_c,S=S,
thres=max(synthetic_out$N_c)*2)
}else if(mode_version & !mean_version){
bayNorm_C_array<-Main_mode_NB_Bay(
Data=synthetic_out$N_c,
BETA_vec=synthetic_out$beta_c,size=size_c,
mu=mu_c,S=S,
thres=max(synthetic_out$N_c)*2)
}else if(!mode_version & mean_version){
bayNorm_C_array<-Main_mean_NB_Bay(
Data=synthetic_out$N_c,
BETA_vec=synthetic_out$beta_c,size=size_c,
mu=mu_c,S=1000,
thres=max(synthetic_out$N_c)*2)
}
This could be simplified by assigning a variable the name of the function and then running with arguments which makes the code more readable
if(!mode_version & !mean_version){
myFunc <- Main_NB_Bay
}else if(mode_version & !mean_version){
myFunc <- Main_mode_NB_Bay
}else if(!mode_version & mean_version){
myFunc <- Main_mean_NB_Bay
}
bayNorm_C_array<-myFunc(Data=synthetic_out$N_c,
BETA_vec=synthetic_out$beta_c,size=size_c,
mu=mu_c,S=1000,
thres=max(synthetic_out$N_c)*2)
Also what about the last case where mode_version & mean_version
. This does nothing but doesn't seem correct. If the user is not suppose to specify both, this should be checked in the code and mentioned in the documentation.
This should also be applied to other sections of code like the similar code in bayNorm.R - repeated code and similar code chunks should be avoided and simplified.
if (!mode_version & !mean_version) {
Bay_array <- Main_NB_Bay(
Data = Data_sr,
BETA_vec = BETA_vec,
size = SIZE_input,
mu = MU_input, S = S,
thres = max(Data_sr)*2)
rownames(Bay_array) <- rownames(Data)
colnames(Bay_array) <- colnames(Data)
return(list(
Bay_array = Bay_array,
PRIORS = PRIORS,
input_params=input_params))
} else if(mode_version){
# mode
Bay_mat <- Main_mode_NB_Bay(
Data = Data_sr,
BETA_vec = BETA_vec,
size = SIZE_input,
mu = MU_input, S = S,
thres = max(Data_sr) *2)
rownames(Bay_mat) <- rownames(Data)
colnames(Bay_mat) <- colnames(Data)
return(list(
Bay_mat = Bay_mat,
PRIORS = PRIORS,
input_params=input_params))
} else if(mean_version){
# mean
Bay_mat <- Main_mean_NB_Bay(
Data = Data_sr,
BETA_vec = BETA_vec,
size = SIZE_input,
mu = MU_input, S = 1000,
thres = max(Data_sr) *2)
rownames(Bay_mat) <- rownames(Data)
colnames(Bay_mat) <- colnames(Data)
return(list(
Bay_mat = Bay_mat,
PRIORS = PRIORS,
input_params=input_params))
}
OR another example where things can be simplified is this section in bayNorm where the DataList and BETAList are the same call - pull these output the if statement and only run the call that is needed in the conditional.
if (is.null(UMI_sffl)) {
# UMI
DataList <- lapply(seq_along(Levels), function(x) {
Data[, which(Conditions == Levels[x])]
})
DataList_sr <- lapply(seq_along(Levels), function(x) {
Data[, which(Conditions == Levels[x])]
})
BETAList <- lapply(seq_along(Levels), function(x) {
BETA_vec[which(Conditions == Levels[x])]
})
} else {
# non-UMI
DataList <- lapply(seq_along(Levels), function(x) {
Data[, which(Conditions == Levels[x])]
})
DataList_sr <- lapply(seq_along(Levels), function(x) {
round(Data[, which(Conditions == Levels[x])]/UMI_sffl[x])
})
BETAList <- lapply(seq_along(Levels), function(x) {
BETA_vec[which(Conditions == Levels[x])]
})
}
Please apply the above corrections. Comment back here when the package is ready for a re-review with a summary of what has been changed.
Thank you and I look forward to working with you to get your package accepted to Bioconductor.
Received a valid push; starting a build. Commits are:
c4a5b51 0.99.4
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.
Received a valid push; starting a build. Commits are:
c5eb524 Further simplify code in PRIOR_FUNCTIONS.r
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.
@lshep Hello, thank you for your review, it is very helpful! I have done the following changes:
I use seq_len()
instead of 1:...
.
I added bioconductor installation instructions in both README.md and vignettes:
source("https://bioconductor.org/biocLite.R")
biocLite("bayNorm")
Is this correct?
Removed Maintainer
in DESCRIPTION
.
Removed LazyData: true
.
The formatting of Imports, Suggests fields has been fixed.
I removed not run
and set eval=FALSE
for the examples in bayNorm
function and vignette respectively.
In man page, for the object Data
, I specified that the assays slot contains the expression matrix and is named "Counts".
The code has been simplified in both noisygene_detection.r and bayNorm.r. Furthermore, I further simplified the code in PRIOR_FUNCTIONS.r.
For the examples in vignette, I created a SummarizedExperiment
object and then input it in the main functions.
I added code for checking the basic setting at the very beginning such that when mode_version & mean_version
is TRUE
, bayNorm will stop and report error.
Thank you very much!
Cheers, Wenhao
The installation should use BiocManager and BiocInstaller is being deprecated
library(BiocManager)
BiocManager::install("bayNorm")
Thank you for the other corrections. I will re-review and comment back soon.
Received a valid push; starting a build. Commits are:
73e526b Using BiocManager
Dear Package contributor,
This is the automated single package builder at bioconductor.org.
Your package has been built on Linux, Mac, and Windows.
On one or more platforms, the build results were: "TIMEOUT". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.
Please see the build report for more details.
Received a valid push; starting a build. Commits are:
4d2f343 Rebuild locally then submit again
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.
Hi @lshep, may I ask how is the re-review going? Is it possible for bayNorm to be included in the next release? Thank you very much!
Received a valid push; starting a build. Commits are:
250c10a Fix some errors
I apologize for the delay I will have a review for you tomorrow morning EST.
Hi @lshep No problem! In the meantime I am also fixing some small errors in the code. Thank you for your help!
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.
Please see comments below.
General
[ ] From your description this is for single-cell RNA-seq data. The code should therefore be updated to work with SingleCellExperiment Class as well since that is the Bioconductor class structure for SingleCell. Since your code was adapted for SummarizedExperiment this shouldn't be a large task since SingleCellExperiment extends rangedSummarizedExperiment - in fact it may already (you should test) but then the package should make note of this
[ ] I don't see any indication of what your algorithm is for normalization - please provide more detail in the vignette and man page for package/main function on what/how the normalization is performed. I can assume from the package name it is some sort of Bayesian method but more details need to be provided
[ ] There are a number of packages that analyze/normalized single cell data. You will need to provide a comparison that makes your normalization method different from existing. Doing a search of Bioconductor biocViews for normalization and single cell the following packages are listed AUCell, BASiCS, cellity, scater, SCnorm, scone, scran, slalom. Especially since some of these indicate Bayesian methods for normalization.
vignette:
[ ] For the SummarizedExperiment call, please put SummarizedExperiment::SummarizedExperiment if you choose to hide the library load. Else people blindly running the code will get SummarizedExperiment not found error. You might consider looking at some of the other packages above and seeing if a SingleCellExperiment object can be passed into your functions as this would be the largest audience based on your package DESCRIPTION
[ ] The vignette seems very shallow. It describes very briefly the main function but there is no indication of when or what use would be benefited from running any of the other exported functions, and you export quite a few. If some of these are not meant to be exported and used directly that please make them internal and don't export or document. Some description of the use and functionality of the other functions should be included as well as runnable examples - it is okay to either have them run in the vignette or the man page but export functions need to be executed at least once somewhere. Since this is a normalization package some indication of your normalization algorithm should also be included.
Thank you. I look forward to your comments.
Hi @lshep, thank you for your re-review.
Regard to your General opinions:
The algorithms and comparison between bayNorm
and other normalization methods (like SCnorm
) have been posted in bioRxiv
: Tang et al. (2018). bioRxiv. . We cited the paper in README
. The vignette could be too verbose if we discussed details of algorithms there.
I will updated the vignette
as soon as possible.
Thank you very much!
Best wishes, Wenhao
I would see if it is already accounted for by your support for SummarizedExperiment - since SingleCellExperiment extended SummarizedExperiment there may be nothing to be done on your part but to update the documentation saying that this class is also supported - but if your package is designed specifically for SingleCell Data than yes making sure it works with SingleCellExperiment would be the recommendation (please test this)
If there is no way to briefly summarized the algorithms used - I would at minimum also reference the paper in the vignette and package man page
When ready with updates don't forget to version bump for the new build report and comment back here
Cheers!
Hi @lshep, no problem! I will reference the paper in both vignette and package man page. I just tested the SingleCellExperiment
, it works fine. I will also included that class as you suggested.
I will let you know once it has been ready.
Thank you for your help!
Best wishes, Wenhao
Received a valid push; starting a build. Commits are:
612cf01 Allow more examples to be runnable; Update vignett...
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: "skipped, 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.
Received a valid push; starting a build. Commits are:
ae00b11 Fix error in vignette
Dear Package contributor,
This is the automated single package builder at bioconductor.org.
Your package has been built on Linux, Mac, and Windows.
On one or more platforms, the build results were: "WARNINGS". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.
Please see the build report for more details.
@lshep Hi, may I ask how to fix this warning please?
Warning: replacing previous import 'SingleCellExperiment::weights' by 'stats::weights' when loading 'bayNorm
I do not have SingleCellExperiment::weights
in my code.
Thanks a lot!
You can ignore that warning for now - it has to do with the naming conflict of the function -
Hi @lshep Ok I see. Then do I just leave it for you to have another review?
I have done the following changes:
SingleCellExperiment class
vignette
and man pages of bayNorm.R
, I added the reference to the paper: Tang et al. (2018). bioRxiv. Thanks a lot!
Best wishes, Wenhao
Received a valid push; starting a build. Commits are:
fe0f628 try to fix warning related to SingleCellExperiment
Dear Package contributor,
This is the automated single package builder at bioconductor.org.
Your package has been built on Linux, Mac, and Windows.
On one or more platforms, the build results were: "WARNINGS". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.
Please see the build report for more details.
Received a valid push; starting a build. Commits are:
264640d Fix Conditions option
Dear Package contributor,
This is the automated single package builder at bioconductor.org.
Your package has been built on Linux, Mac, and Windows.
On one or more platforms, the build results were: "WARNINGS". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.
Please see the build report for more details.
Received a valid push; starting a build. Commits are:
4eeef78 Correct error in noisy gene detection
Dear Package contributor,
This is the automated single package builder at bioconductor.org.
Your package has been built on Linux, Mac, and Windows.
On one or more platforms, the build results were: "WARNINGS". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.
Please see the build report for more details.
Received a valid push; starting a build. Commits are:
40f8973 Add Methods in vignettes
Dear Package contributor,
This is the automated single package builder at bioconductor.org.
Your package has been built on Linux, Mac, and Windows.
On one or more platforms, the build results were: "WARNINGS". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.
Please see the build report for more details.
Hi @lshep , I have added Methods of bayNorm at the end of the vignettes. The only warning it reports is:
* checking whether package bayNorm can be installed ... WARNING
Found the following significant warnings:
Warning: replacing previous import SingleCellExperiment::weights by stats::weights when loading bayNorm
See /Users/pkgbuild/packagebuilder/workers/jobs/878/40f8973/bayNorm.Rcheck/00install.out for details.
Please have a check.
Thanks a lot!
Looking good a few more comments:
[ ] That warning comes from importing both SingleCellExperiment and stats packages that have a weights function. You could either selectively import functions from one or we will allow this warning
[ ] The vignette only shows BetaFun, bayNorm, bayNorm_sup yet you export 15 other functions - I would have a package man package or a section in the vignette that briefy describes what your other functions are for. If they are not meant to be used by the user, you can mark the documentation with the @keywords internal and remove @export so they are not included in the NAMESPACE.
[ ] We recommend BiocParallel over parallel.
R Files
PRIOR_FUNCTIONS.R
[ ] You don't need to convert the SingleCellExperiment object into a SummarizedExperiment object. Apply this to all R functions The functions will work the same so for example
library(SingleCellExperiment)
counts <- matrix(rpois(100, lambda = 10), ncol=10, nrow=10)
sce <- SingleCellExperiment(assays = list(counts = counts))
assayNames(sce)
[ ] We generally like to minimize repeat code as much as possible and opt for simplification. Something like the following could be reordered to make only one call to AdjustSIZE_fun setting appropriate variables
if (FIX_MU) {
BB_prior <- cbind(MME_prior$MME_MU, BB_size)
rownames(BB_prior) <- rownames(Data)
colnames(BB_prior) <- c("MME_MU", "BB_SIZE")
MME_SIZE_adjust <- AdjustSIZE_fun(
BB_prior[, 2],
MME_prior$MME_MU,
MME_prior$MME_SIZE)
} else {
BB_prior <- BB_size
rownames(BB_prior) <- rownames(Data)
colnames(BB_prior) <- c("BB_SIZE", "BB_MU")
MME_SIZE_adjust <- AdjustSIZE_fun(
BB_prior[, 1],
MME_prior$MME_MU,
MME_prior$MME_SIZE)
}
So somthing like the following
BB_prior <- BB_size
colnames(BB_prior) <- c("BB_SIZE", "BB_MU")
rownames(BB_prior) <- rownames(Data)
if (FIX_MU){
BB_prior <- cbind(BB_prior, MME_prior$MME_MU)
colnames(BB_prior) <- c("BB_SIZE", "MME_MU")
vec <- BB_prior[,2]
}else{
vec <- BB_prior[,1]
}
MME_SIZE_adjust <- AdjustSIZE_fun(vec,MME_prior$MME_MU,MME_prior$MME_SIZE)
**Apply this concept throughout all R code**
Like there seems to be similar structure in BB_Fun too - when possible mimize
code redundency
- [ ] bayNorm and bayNorm_sup have a lot of repeated code. It would be better to
have all similar code in one function with a wrapper for the two different
scenerios. Again standing behind limiting the amound of repeated code in
packages.
When ready with updates don't forget to version bump for the new build report and comment back here
Cheers!
Received a valid push; starting a build. Commits are:
124f01c Try to fix warning by using @importFrom SingleCell...
Dear Package contributor,
This is the automated single package builder at bioconductor.org.
Your package has been built on Linux, Mac, and Windows.
On one or more platforms, the build results were: "WARNINGS". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.
Please see the build report for more details.
Received a valid push; starting a build. Commits are:
02002fa Simplify code, update vignette
Update the following URL to point to the GitHub repository of the package you wish to submit to Bioconductor
Confirm the following by editing each check box to '[x]'
[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 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.
I am familiar with the essential aspects of Bioconductor software management, including:
For help with submitting your package, please subscribe and post questions to the bioc-devel mailing list.