Closed phauchamps closed 3 months ago
Hi @phauchamps
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: CytoMDS
Title: Low Dimensions projection of cytometry samples
Version: 0.99.8
Authors@R:
c(person(given = "Philippe",
family = "Hauchamps",
role = c("aut", "cre"),
email = "philippe.hauchamps@uclouvain.be",
comment = c(ORCID = "0000-0003-2865-1852")),
person(given = "Laurent", family = "Gatto",
email = "laurent.gatto@uclouvain.be",
role = "aut",
comment = c(ORCID = "0000-0002-1520-2268")),
person(given = "Dan",
family = "Lin",
role = "ctb",
email = "dan.8.lin@gsk.com"))
Description: This package implements a low dimensional visualization of a set
of cytometry samples, in order to visually assess the 'distances' between them.
This, in turn, can greatly help the user to identify quality issues
like batch effects or outlier samples, and/or check the presence of potential
sample clusters that might align with the exeprimental design.
The CytoMDS algorithm combines, on the one hand, the concept of Earth Mover's
Distance (EMD), a.k.a. Wasserstein metric and, on the other hand,
the Multi Dimensional Scaling (MDS) algorithm for the low dimensional
projection.
Also, the package provides some diagnostic tools for both checking the quality
of the MDS projection, as well as tools to help with the interpretation of
the axes of the projection.
License: GPL-3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
BugReports: https://github.com/UCLouvain-CBIO/CytoMDS/issues
URL: https://uclouvain-cbio.github.io/CytoMDS
biocViews: FlowCytometry, QualityControl, DimensionReduction,
MultidimensionalScaling, Software, Visualization
Collate:
'CytoMDS.R'
'stats.R'
'ggplots.R'
Depends:
R (>= 4.3)
Imports:
stats,
rlang,
pracma,
withr,
methods,
flowCore,
ggplot2,
ggrepel,
ggforce,
patchwork,
transport,
smacof,
BiocParallel,
CytoPipeline
Suggests:
testthat (>= 3.0.0),
vdiffr,
diffviewer,
knitr,
rmarkdown,
BiocStyle
VignetteBuilder: knitr
Config/testthat/edition: 3
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
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 22.04.3 LTS): CytoMDS_0.99.8.tar.gz macOS 12.7.1 Monterey: CytoMDS_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/CytoMDS
to trigger a new build.
A quick tutorial for setting up remotes and pushing to upstream can be found here.
A reviewer has been assigned to your package for an indepth review. Please respond accordingly to any further comments from the reviewer.
Hi @DarioS,
Thank you for accepting to review my package :-) Since I created the current issue, I added 2 minor versions of the package to my repository (CytoMDS 0..99.8 -> 0.99.10). Therefore I can now commit the changes also to the Bioconductor devel repo. However, would you like that I keep it as the 0.99.8 version for the time being, while you are reviewing it? Please let me know :-)
Thank you again,
Philippe.
Received a valid push on git.bioconductor.org; starting a build for commit id: 33f7868a78384576d3e97ff3a7cfedd38fa91c9c
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 22.04.3 LTS): CytoMDS_0.99.10.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/CytoMDS
to trigger a new build.
A quick tutorial for setting up remotes and pushing to upstream can be found here.
Hi @DarioS,
Thank you for accepting to review my package :-) Since I created the current issue, I added 2 minor versions of the package to my repository (CytoMDS 0..99.8 -> 0.99.10). Therefore I can now commit the changes also to the Bioconductor devel repo. However, would you like that I keep it as the 0.99.8 version for the time being, while you are reviewing it? Please let me know :-)
Thank you again,
Philippe.
@DarioS : I finally pushed the new version. Incidentally, this also removed the 'warnings' tag (which was due to MacOS build being to long to generate).
Received a valid push on git.bioconductor.org; starting a build for commit id: 637e20e230ee0fc37812922f9235be2403c7c39c
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 22.04.3 LTS): CytoMDS_0.99.11.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/CytoMDS
to trigger a new build.
A quick tutorial for setting up remotes and pushing to upstream can be found here.
Overall, a good submission. A few issues are noted.
if (useBiocParallel){
distribBlockList <- BiocParallel::bplapply(
blocks1D,
FUN = loadFFAndCalcHistograms,
BPPARAM = BPPARAM,
BPOPTIONS = BPOPTIONS,
loadFlowFrameFUN = loadFlowFrameFUN,
loadFlowFrameFUNArgs = loadFlowFrameFUNArgs,
channels = channels,
breaks = breaks,
verbose = verbose)
} else {
distribBlockList <- lapply(
blocks1D,
FUN = loadFFAndCalcHistograms,
loadFlowFrameFUN = loadFlowFrameFUN,
loadFlowFrameFUNArgs = loadFlowFrameFUNArgs,
channels = channels,
breaks = breaks,
verbose = verbose)
}
For single core mode, please just use BiocParallel
's SerialParam()
and get rid of all instances of code duplication.
for
loop. distrs <- list()
ind <- 0
for (b in seq_along(blocks1D)) {
for(i in seq_along(blocks1D[[b]])) {
ind <- ind+1
distrs[[ind]] <- distribBlockList[[b]][[i]]
}
}
You should use unlist
with recursive = FALSE
instead. I show an example.
example <- list(list(LETTERS[1:5], LETTERS[6:10]), list(LETTERS[11:15], LETTERS[16:20]))
unlist(example, recursive = FALSE)
ffList <- list()
for (i in seq_len(nSample)) {
ffList[[i]] <- CytoPipeline::subsample(
OMIP021Trans[[(i+1)%%2+1]],
nEvents = 1000,
seed = i)
}
We now create two simulated data sets, of 20 samples each, by combining events from the two samples of the OMIP021 original data set.
I don't understand the purpose of this. Why not analyse experimental data?
# References {-}
. The references section is empty. Please add content.
Objects of class mdsRes
flood the user's R console with output. Class needs a show
method to display concisely.
> mdsObj1
$eigen
[1] 8.5817848 0.8525102
$pctvar
[1] 0.9096371 0.0903629
$pwDist
1 2 3 4 5 6 7 8 9 10 11 12
2 1.76925
3 0.55560 1.89565
4 1.62995 0.50810 1.78135
5 0.66230 2.17985 0.67050 1.95135
6 1.67935 0.58270 1.92735 0.60060 2.06245
7 0.50030 1.63315 0.67890 1.55475 0.97330 1.60175
8 1.76675 0.44360 1.83945 0.54720 2.20845 0.73850 1.58885
9 0.41880 1.96395 0.57090 1.75765 0.45950 1.87115 0.69840 1.95965
10 1.85695 0.43910 2.02975 0.59750 2.26375 0.63130 1.72295 0.49720 2.04465
11 0.59835 1.96950 0.53525 1.84570 0.58575 1.81470 0.77395 2.06530 0.54995 2.05880
12 1.84495 0.41810 1.97165 0.47160 2.19265 0.67420 1.73335 0.47140 1.98555 0.45600 2.04800
13 0.37195 1.78410 0.57005 1.66470 0.63315 1.71360 0.53125 1.81840 0.45605 1.88450 0.56030 1.87010
14 1.90415 0.42710 2.00675 0.62920 2.33165 0.77530 1.73185 0.45170 2.10725 0.37020 2.14030 0.48950 1.92140
15 0.53320 2.02115 0.63020 1.91555 0.51650 1.91265 0.72660 2.07105 0.47270 2.11985 0.45555 2.10775 0.50905 2.20185
... ...
Hi Dario,
Thank you for the insightful comments, and the time spent on reviewing the package code in details. I agree with all your code related remarks, and will improve the package code accordingly.
Regarding the lack of biological insight in the vignette and the why of the simulated data, I hope to be able to address both concerns in a common way, i.e. by replacing the simulated data by a more representative public dataset for illustration.
I expect to work on the corrections in the coming days, and be back to you soon.
Best regards,
Philippe
Received a valid push on git.bioconductor.org; starting a build for commit id: d4457cf7574c9a63111e6e25e0a25206091f5e9e
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 22.04.3 LTS): CytoMDS_0.99.12.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/CytoMDS
to trigger a new build.
A quick tutorial for setting up remotes and pushing to upstream can be found here.
Received a valid push on git.bioconductor.org; starting a build for commit id: 7ee9d4820788796d14beb095e82bcebbd4db524b
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 22.04.3 LTS): CytoMDS_0.99.13.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/CytoMDS
to trigger a new build.
A quick tutorial for setting up remotes and pushing to upstream can be found here.
Hi Dario,
I have just pushed a new version (CytoMDS 0.99.13) which addresses the issues you mentioned. Here below is my 'point by point' answer:
Frequent copy and paste for case of single core processing
=> As suggested, I now use BiocParallel::SerialParam()
as a default for the BPPARAM
parameter, avoiding code duplication. I also removed useBiocParallel
parameter from the calculation methods, since it is now redundant :-)
pairwiseEMDDist <- function(
x,
rowRange = c(1, nSamples),
colRange = c(min(rowRange), nSamples),
loadFlowFrameFUN = NULL,
loadFlowFrameFUNArgs = NULL,
channels = NULL,
verbose = FALSE,
BPPARAM = BiocParallel::SerialParam(),
BPOPTIONS = BiocParallel::bpoptions(
packages = c("flowCore")),
binSize = 0.05,
minRange = -10,
maxRange = 10
){ ... }
Inefficient unlisting with for
loop.
=> As suggested, I now use unlist(recursive=FALSE)
:
## reorganize multivariate distributions in a single list
distrs <- unlist(distribBlockList, recursive = FALSE)
Don't incrementally grow lists. Use vapply or sapply. => I refactored the code at several places to implement that suggestion.
Objects of class mdsRes
flood the user's R console with output. Class needs a show
method to display concisely.
=> I have replaced mdsRes
class with a MDS
S4 class, implementing several getters, and also a more concise show
method :
> mdsObj
MDS object containing MDS projection (using Smacof algorithm) data:
Nb of dimensions: 4
Nb of points: 16
Stress: 0.040668
Pseudo RSquare: 0.981489
Goodness of fit: 0.998346
In order to address the lack of biological interpretation in the vignette, I updated it by including a real public mass cytometry dataset (instead of a synthetic dataset based on two samples only). I introduced the dataset by giving a bit of context to the study, and the experimental design. I also added some plot interpretations, seeking biological insight by identifying markers which are diffentially expressed between the two conditions. In order to help with this user task, I also implemented a new method in the package: ggplotMarginalDensities
which displays selected marker univariate distributions for selected samples, possibly coloured by condition. This new method is also demonstrated in the vignette.
# References {-}
. The references section is empty. Please add content.
=> I did not change anything for this. In fact, upon knitting, the References
section is populated automatically, using the references in the main text of the vignette, and the .bib file stored in the vignette directory.
Best,
Philippe
CytoMDS has been substantially improved. There is just one outstanding issue, though.
for
loops that ought to be one of the apply functions remain. For example,distances <- rep(0., length(channels))
... ...
for (ch in seq_along(channels)) {
... ...
distances[ch] <- wasserstein1d(a = locations, wa = wA, b = locations, wb = wB)
}
Some loops might not be able to be converted into apply, but the majority of the ones I manually inspected can and must be.
Received a valid push on git.bioconductor.org; starting a build for commit id: 807fbd187397a77edcab641da47eb28e8de2a882
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 22.04.3 LTS): CytoMDS_0.99.14.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/CytoMDS
to trigger a new build.
A quick tutorial for setting up remotes and pushing to upstream can be found here.
Hi @DarioS,
I have just pushed version 0.99.14 which addresses most of these for(...)
loops.
In this latest version, for(...)
loops are still used at 3 places in the code, where nested loops implement complex relationships between objects of different dimensions (with indices translations) so I think that converting these nested loops into apply()
family of functions would be at best awkward, if not impossible, and in any case, at the expense of deteriorating the readability of the code.
Let me know what you think :-)
Best,
Philippe
Good.
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.
The default branch of your GitHub repository has been added to Bioconductor's git repository as branch devel.
To use the git.bioconductor.org repository, we need an 'ssh' key to associate with your github user name. If your GitHub account already has ssh public keys (https://github.com/phauchamps.keys is not empty), then no further steps are required. Otherwise, do the following:
See further instructions at
https://bioconductor.org/developers/how-to/git/
for working with this repository. See especially
https://bioconductor.org/developers/how-to/git/new-package-workflow/ https://bioconductor.org/developers/how-to/git/sync-existing-repositories/
to keep your GitHub and Bioconductor repositories in sync.
Your package will be included in the next nigthly 'devel' build (check-out from git at about 6 pm Eastern; build completion around 2pm Eastern the next day) at
https://bioconductor.org/checkResults/
(Builds sometimes fail, so ensure that the date stamps on the main landing page are consistent with the addition of your package). Once the package builds successfully, you package will be available for download in the 'Devel' version of Bioconductor using BiocManager::install("CytoMDS")
. The package 'landing page' will be created at
https://bioconductor.org/packages/CytoMDS
If you have any questions, please contact the bioc-devel mailing list (https://stat.ethz.ch/mailman/listinfo/bioc-devel); this issue will not be monitored further.
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:
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.