CentroidR 
Repository to centroid profile spectra.
This repository is experimental. Use it at your own risks. Inspired from the original work at https://github.com/EuracBiomedicalResearch/batch_centroid
Requirements
Here is what you minimally need:
- An mzML file containing profile spectra
Here is a generic command in case:
docker run -it --rm -e WINEDEBUG=-all -v .:/data proteowizard/pwiz-skyline-i-agree-to-the-vendor-licenses wine msconvert "path_to_your/raw/spectra.wiff" --ignoreUnknownInstrumentError
Note: If using Sciex raw format, use the .wiff
and not the .wiff2
for this step!
Installation
As the package is not (yet) available on CRAN, you will need to install with:
install.packages(
"CentroidR",
repos = c(
"https://adafede.r-universe.dev",
"https://bioc.r-universe.dev",
"https://cloud.r-project.org"
) )
Use
Single file
::centroid_one_file(file = "path_to_your/profile/spectra.mzML",
CentroidRpattern = "/profile/",
replacement = "/profile_centroided/")
Rscript inst/scripts/centroiding.R --file "path_to_your/profile/spectra.mzML" --pattern "/profile/" --replacement "/profile_centroided/"
Multiple files
"path_to_your/profiles/" |>
list.files(pattern = ".mzML", full.names = TRUE) |>
::walk(
purrr.f = CentroidR::centroid_one_file,
pattern = "/profiles/",
replacement = "/profiles_centroided/",
.progress = TRUE)
Rscript inst/scripts/centroiding.R --directory "path_to_your/profiles/" --pattern "/profiles/" --replacement "/profiles_centroided/"
Rscript inst/scripts/centroiding.R --help
Docker
docker pull adafede/centroidr
# docker build . -t adafede/centroidr
docker run --rm \
-v path_to_your:/home \
\
adafede/centroidr --file "home/profile/spectra.mzML" --pattern "/profile/" --replacement "/profile_centroided/" Rscript centroiding.R
docker run --rm \
-v path_to_your:/home \
\
adafede/centroidr --directory "home/profiles/" --pattern "/profiles/" --replacement "/profiles_centroided/" Rscript centroiding.R
To see all parameters
docker run --rm \
-v path_to_your:/home \
\
adafede/centroidr --help Rscript centroiding.R
Main Citations
TODO
Others
- The RforMassSpectrometry packages suite: https://doi.org/10.3390/metabo12020173