Bioconductor / Contributions

Contribute Packages to Bioconductor
135 stars 33 forks source link

adverSCarial #2983

Closed GhislainFievet closed 1 year ago

GhislainFievet commented 1 year ago

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]'

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

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

bioc-issue-bot commented 1 year ago

Hi @GhislainFievet

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: adverSCarial
Title: What the Package Does (One Line, Title Case)
Version: 0.99.0
Authors@R: 
    person("Ghislain", "FIEVET", , "ghislain.fievet@gmail.com", role = c("aut", "cre"),
 comment = c(ORCID = "0000-0002-0337-7327"))
Description:
    adverSCarial is an R Package designed for generating and analyzing the vulnerability of scRNA-seq
    classifiers to adversarial attacks. The package is versatile and provides a format for integrating
    any type of classifier. It offers functions for studying and generating two types of attacks,
    min change attack and max change attack. The min change attack involves making a small modification
    to the input to alter the classification. The max change attack involves making a large modification
    to the input without changing its classification.
    The package provides a comprehensive solution for evaluating the robustness of scRNA-seq classifiers
    against adversarial attacks.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
biocViews: Software, SingleCell, Transcriptomics, Classification
Suggests: knitr, RUnit, BiocGenerics, TENxPBMCData
Imports: gtools, stringr, randomForest
VignetteBuilder: knitr
Author: Ghislain FIEVET <ghislain.fievet@gmail.com>
Maintainer: Ghislain FIEVET <ghislain.fievet@gmail.com>
vjcitn commented 1 year ago

Please look at the Title field in your DESCRIPTION. Revise and bump the version and push to your repo.

vjcitn commented 1 year ago

Your vignette is called "doc.Rmd"; please use a meaningful filename for your vignette -- eventually there may be multiple such. It includes shorttitle: "Short title for headers" ... do not use the template without reading through. Please run R CMD check on your package before bumping again and verify that there are no ERRORs.

GhislainFievet commented 1 year ago

Hi, thank you for your messages.

I modified what was asked and I ran the R CMD check command with 0 error and 0 warning.

GhislainFievet commented 1 year ago

The tool I submit is a parameter search, and building the vignette can take up to an hour. In my case I had to run the "ulimit -s unlimited" before the check to increase the available memory.

vjcitn commented 1 year ago

Thanks for this comment. We have to be able to check the package in a modest amount of time. THere is a longtests protocol. You should sharply constrain the search in your vignette, or precompute and use a saved run. RIght now I am seeing

--- re-building ‘adverSCarial.Rmd’ using knitr
Error: processing vignette 'adverSCarial.Rmd' failed with diagnostics:
C stack usage  7969824 is too close to the limit
--- failed re-building ‘adverSCarial.Rmd’

SUMMARY: processing the following file failed:
  ‘adverSCarial.Rmd’

Error: Vignette re-building failed.
Execution halted

on a machine that can build all submissions. Please check carefully and follow the contributor guidelines. Thanks

GhislainFievet commented 1 year ago

Thank you for the advices :-) I did constraint the search for a vignette, and precomputed the others. There is no memory limit issue anymore, and the r cmd check command runs in 4 minutes. I did update my github repo.

What is the next step? Do I have too handle the push to git@git.bioconductor.org:packages/.git yet, to trigger the "10 tasks"?

Best regards.

Ghislain

lshep commented 1 year ago

Until you pass precheck, the package is not on git.bioconductor.org yet. Once a reviewer is assigned then yes you would need to push there to trigger new builds. For now just pushing to your github and commenting back here for us to look at it again is sufficient

GhislainFievet commented 1 year ago

Ok, thank you!

bioc-issue-bot commented 1 year ago

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 commented 1 year ago

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, 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. 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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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. 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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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. 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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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. 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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

DarioS commented 1 year ago

The package is for perturbation analysis of classification by single cell RNA data.

modifications <- list()
modifications[[1]] <- list("perc1")
modifications[[2]] <- list("perc99")

This should be done efficiently as modifications <- c("perc1", "perc99"). Please read Pre-allocate and Fill It also shouldn't be a list because all of the elements have the same data type. A character vector is sufficient.

> class(genes)
[1] "character"

Please don't use list and character vector interchangeably. They are different types in R language.

GhislainFievet commented 1 year ago

Thank you for the review :-) A lot of useful advices, I'm on it.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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. 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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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. 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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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. 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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

GhislainFievet commented 1 year ago

Hi,

I modified the package according to the review.

A few points:

Best regards.

Ghislain

DarioS commented 1 year ago

A classifier function has to be formated as follow to be used with adverSCarial:

classifier = function(expr, clusters, target){

   c("cell type", trust_value)
 }

What is trust_value? Please define the output vector clearly.

GhislainFievet commented 1 year ago

Ok, thank you, I'll correct these points.

Regards.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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. 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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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. 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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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. 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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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. 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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 1 year ago

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

bioc-issue-bot commented 1 year ago

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 git@git.bioconductor.org:packages/adverSCarial to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

GhislainFievet commented 1 year ago

Hi, here are my corrections.

GhislainFievet commented 1 year ago

About the SingleCellExperiment and the matrixFromSCE: I would like my tool to be versatile. Users should be able to easily adapt any classifier in the appropriate format.

The CHETAH wants as input a SCE, easily created from raw data, eventhough they use normalized data to avoid batch effects. It is easy to adapt the CHETAH classifier to make it take as input a raw data matrix.

input <- SingleCellExperiment(assays = list(counts = input_counts),
                              reducedDims = SimpleList(TSNE = input_tsne))

## Run CHETAH
input <- CHETAHclassifier(input = input, ref_cells = reference)

The scType classifier takes as input a scaled matrix.

es.max = sctype_score(scRNAseqData = pbmc[["RNA"]]@scale.data, scaled = TRUE, 
                      gs = gs_list$gs_positive, gs2 = gs_list$gs_negative) 

In every cases it is easy to provide a data matrix, and make the classification from it.

It is also more convenient for my other functions. Let's say I accept SCE as input for advMinChange:

It seems a lot easier to handle matrix of data.

I made the matrixFromSCE function for one specific situation, to show as an example in the vignette. But users should make their own functions to get the right matrix from the objects they use, SCE, Seurat, or raw data from the sequencing.