GithubHelp home page GithubHelp logo

clavellab / maldipickr Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 7.6 MB

Dereplicate And Cherry-pick Mass Spectrometry Spectra

Home Page: https://clavellab.github.io/maldipickr/

License: GNU General Public License v3.0

R 98.55% Dockerfile 0.78% CSS 0.58% SCSS 0.09%
dereplication maldi-tof-ms cherry-pick r r-packages rstats

maldipickr's Issues

use a standardised format to store the raw spectra and the processed spectra

Currently, the spectra and peaks are stored as RDS files containing MassSpectrum or MassPeaks R objects. These objects are metadata-rich which is fundamental.

There is indeed a couple of standard file format (e.g., mzML) to which these objects can be exported using MALDIquantForeign, but the metadata are loss in the process..

Release maldipickr 1.3.0

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Check if any deprecation processes should be advanced, as described in Gradual deprecation
  • Polish NEWS
  • urlchecker::url_check()
  • devtools::build_readme()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • revdepcheck::revdep_check(num_workers = 4) no rev deps
  • Update cran-comments.md
  • git push
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • Add preemptive link to blog post in pkgdown news menu
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)
  • Finish blog post
  • Tweet

codecov coverage not updated despite GitHub Actions CI/CD success

[2023-10-24T15:35:03.710Z] ['error'] There was an error running the uploader:
Error uploading to https://codecov.io
Error: There was an error fetching the storage URL during POST:
404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API.
Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}

https://github.com/ClavelLab/maldipickr/actions/runs/6629129466/job/18007735293#step:8:39

`to_pick` column is masked in the vignette

The example tables in the vignette are limited in width and some relevant columns are masked.

Could be solved by adding a dplyr::relocate() to some of the examples

example_df %>% dplyr::relocate(name, to_pick)

Refactor vignettes using diataxis principles

A possible option to reduce the length of the vignettes is to split into 3 vignettes:

  • Import data
  • Process data
  • Cherry-pick

While examples are part of the vignettes, additional examples could be added that would not make it to the examples section of the function but "just" in the vignettes.

Make sure to distinguish tutorials from how-to using https://diataxis.fr/

bump Node.js version to 20 for Github Actions

Describe the bug
Current Github Actions uses Node.js 16 which is deprecated in favor of 20.

To Reproduce
Look up the Actions tab for warnings

Expected behavior
No warnings.

Solutions

Update:

Screenshots
image

improve handling of empty spectra

Consider adding a remove_empty() function to clean up the spectra, the peaks and the metadata files from the object returned by process_spectra().

Could be coupled with check_spectra() to flag the elements of the list.

add function to gather spectra checks stats

Is your feature request related to a problem? Please describe.
I'm always frustrated when I need to compute how many raw spectra were analyzed, how many valid, and why they were rejected.

Describe the solution you'd like
This function below is an untested, undocumented attempt:

gather_spectra_stats <- function(check_vectors){
  # check_vectors from maldipickr::check_spectra
  # src: https://stackoverflow.com/a/51140480/21085566
  aggregated_checks <- Reduce(`|`, check_vectors)
  check_stats <- vapply(check_vectors, sum, FUN.VALUE = integer(1)) %>%
    tibble::as_tibble_row()
  tibble::tibble(
    "n_spectra" = length(aggregated_checks),
    "n_valid_spectra" = n_spectra - sum(aggregated_checks)
  ) %>%
    dplyr::bind_cols(check_stats) %>% 
    return()
}

`reframe()` instead of `summarise()` when dplyr > 1.1.0

In the example of pick_spectra(), reproduced below:

# 4.2 Pick the spectra from clusters without spectra
#   labelled as `picked_before` (hard masking).
pick_spectra(clusters, metadata, "OD600",
  hard_mask_column = "picked_before"
)

A warning advocating for the replacement of summarise() by reframe() :

#> Warning: Returning more (or less) than 1 row per `summarise()` group was deprecated in
#> dplyr 1.1.0.
#> ℹ Please use `reframe()` instead.
#> ℹ When switching from `summarise()` to `reframe()`, remember that `reframe()`
#>   always returns an ungrouped data frame and adjust accordingly.
#> ℹ The deprecated feature was likely used in the maldipickr package.
#>   Please report the issue at <https://github.com/ClavelLab/maldipickr/issues>.

but current dplyr version used is 1.0.10

Release maldipickr 1.1.1

First release:

Prepare for release:

  • git pull
  • urlchecker::url_check()
  • devtools::build_readme()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • git push
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('major')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • Add preemptive link to blog post in pkgdown news menu
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)
  • Finish blog post
  • Tweet

deprecate `rds_prefix` option in `process_spectra()` because of `{targets}`

Find connected components without `{igraph}` or `{tidygraph}`

The packages {igraph} and {tidygraph} are conveniently imported for the dereplication but are only used to detect connected components.

There should be an easy way to recode an equivalent of the connected components algorithm, seeing as we only use limited options there.

This would certainly drastically reduce the number of dependencies!

Release maldipickr 1.2.0

Prepare for release:

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • Add preemptive link to blog post in pkgdown news menu
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)
  • Finish blog post
  • Tweet

warning in `pick_spectra` example with summarise/reframe when using the dry-run

pick_spectra

pick_spectra(clusters, discard_regex = "E11", only_show_discarded = TRUE)
#> Warning: Returning more (or less) than 1 row per `summarise()` group was deprecated in
#> dplyr 1.1.0.
#> ℹ Please use `reframe()` instead.
#> ℹ When switching from `summarise()` to `reframe()`, remember that `reframe()`
#>   always returns an ungrouped data frame and adjust accordingly.
#> ℹ The deprecated feature was likely used in the maldipickr package.
#>   Please report the issue at <https://github.com/ClavelLab/maldipickr/issues>.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.