From f92252a43a18ed0fc2091ed5b6d6210395501df5 Mon Sep 17 00:00:00 2001 From: Thomas N Lawson Date: Wed, 30 Aug 2023 14:18:01 +0100 Subject: [PATCH] v1.27.1 - createMSP fix to use he median precursor MZ and precursor RT in the MSP file (#101) --- .github/workflows/check-bioc.yml | 161 +- DESCRIPTION | 6 +- NEWS | 219 +- R/purityA-create-msp.R | 6 +- .../tests/db/metab_compound_subset.sqlite | Bin .../tests/external_annotations/probmetab.tsv | 0 inst/extdata/tests/msp/all.msp | 29 +- inst/extdata/tests/msp/all_OLD.msp | 168 +- inst/extdata/tests/msp/av_all.msp | 16 +- inst/extdata/tests/msp/av_all_OLD.msp | 24 +- inst/extdata/tests/msp/av_all_dupmeta.msp | 31 +- inst/extdata/tests/msp/av_all_dupmeta_OLD.msp | 48 +- inst/extdata/tests/msp/av_inter.msp | 16 +- inst/extdata/tests/msp/av_inter_OLD.msp | 72 +- inst/extdata/tests/msp/av_intra.msp | 29 +- inst/extdata/tests/msp/av_intra_OLD.msp | 96 +- inst/extdata/tests/msp/max.msp | 19 +- inst/extdata/tests/msp/max_OLD.msp | 76 +- inst/extdata/tests/msp/recrdt.msp | 27 +- inst/extdata/tests/msp/recrdt_OLD.msp | 154 +- tests/testthat/test.2_purityA_OLD.R | 1 - ...cessing-and-spectral-matching-vignette.Rmd | 2 +- ...essing-and-spectral-matching-vignette.html | 1842 +++++++++++++++-- 23 files changed, 2411 insertions(+), 631 deletions(-) mode change 100755 => 100644 inst/extdata/tests/db/metab_compound_subset.sqlite mode change 100755 => 100644 inst/extdata/tests/external_annotations/probmetab.tsv diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index 3186216..37475e7 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -39,6 +39,7 @@ env: run_pkgdown: 'false' has_RUnit: 'false' cache-version: 'cache-v1' + run_docker: 'false' jobs: build-check: @@ -48,12 +49,14 @@ jobs: ## Environment variables unique to this job. strategy: - fail-fast: false + fail-fast: false matrix: config: - - { os: ubuntu-latest, r: '4.1.3', bioc: '3.14', cont: "bioconductor/bioconductor_docker:RELEASE_3_14", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" } - - { os: macOS-latest, r: '4.1.3', bioc: '3.14'} - - { os: windows-latest, r: '4.1.3', bioc: '3.14'} + - { os: ubuntu-latest, r: 'latest', bioc: '3.17', cont: "bioconductor/bioconductor_docker:latest", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" } + - { os: macOS-latest, r: 'latest', bioc: '3.17'} + - { os: windows-latest, r: 'latest', bioc: '3.17'} + ## Check https://github.com/r-lib/actions/tree/master/examples + ## for examples using the http-user-agent env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true RSPM: ${{ matrix.config.rspm }} @@ -76,19 +79,20 @@ jobs: ## https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml ## If they update their steps, we will also need to update ours. - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 ## R is already included in the Bioconductor docker images - name: Setup R from r-lib if: runner.os != 'Linux' - uses: r-lib/actions/setup-r@master + uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} ## pandoc is already included in the Bioconductor docker images - name: Setup pandoc from r-lib if: runner.os != 'Linux' - uses: r-lib/actions/setup-pandoc@master + uses: r-lib/actions/setup-pandoc@v2 - name: Query dependencies run: | @@ -96,31 +100,29 @@ jobs: saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) shell: Rscript {0} - - - name: Cache R packages + - name: Restore R package cache if: "!contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'" - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ env.R_LIBS_USER }} - key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-r-4.1.3-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-r-4.1.3- + key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel- - name: Cache R packages on Linux if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' " - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /home/runner/work/_temp/Library - key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-r-4.1.3-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-r-4.1.3 + key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel- + ## Note some specifics here for ncdf4 - depends updated from XCMS github workflow - name: Install Linux system dependencies if: runner.os == 'Linux' - ## sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu", "20.04")), collapse = " "))') run: | - sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y libicu-dev pandoc libpq-dev" )') + sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu", "20.04")), collapse = " "))') echo $sysreqs sudo -s eval "$sysreqs" - - name: Install macOS system dependencies if: matrix.config.os == 'macOS-latest' @@ -136,8 +138,21 @@ jobs: ## For textshaping, required by ragg, and required by pkgdown brew install harfbuzz fribidi - ## See if this helps get RCurl installed - ## brew uninstall curl + ## For installing usethis's dependency gert + brew install libgit2 + + ## required for ncdf4 + ## brew install netcdf ## Does not work as it is compiled with gcc + ## Use pre-compiled libraries from https://mac.r-project.org/libs-4/ + curl -O https://mac.r-project.org/libs-4/netcdf-4.7.4-darwin.17-x86_64.tar.gz + tar fvxzm netcdf-4.7.4-darwin.17-x86_64.tar.gz -C / + rm netcdf-4.7.4-darwin.17-x86_64.tar.gz + curl -O https://mac.r-project.org/libs-4/hdf5-1.12.0-darwin.17-x86_64.tar.gz + tar fvxzm hdf5-1.12.0-darwin.17-x86_64.tar.gz -C / + rm hdf5-1.12.0-darwin.17-x86_64.tar.gz + curl -O https://mac.r-project.org/libs-4/szip-2.1.1-darwin.17-x86_64.tar.gz + tar fvxzm szip-2.1.1-darwin.17-x86_64.tar.gz -C / + rm szip-2.1.1-darwin.17-x86_64.tar.gz - name: Install Windows system dependencies if: runner.os == 'Windows' @@ -153,10 +168,11 @@ jobs: - name: Set BiocVersion run: | - BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE) + BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE, force = TRUE) shell: Rscript {0} - - name: Install dependencies + + - name: Install dependencies pass 1 run: | ## Try installing the package dependencies in steps. First the local ## dependencies, then any remaining dependencies to avoid the @@ -165,26 +181,43 @@ jobs: ## https://github.com/r-lib/remotes/issues/296 ## Ideally, all dependencies should get installed in the first pass. - ## Temporary for now due to https://github.com/ropensci/RefManageR/issues/79 - remotes::install_github("ropensci/bibtex") - remotes::install_github("ropensci/RefManageR") - remotes::install_github("cboettig/knitcitations") - - - ## Pass #1 at installing dependencies - message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****')) - remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE) - - ## Pass #2 at installing dependencies - message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****')) - remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE) + ## Set the repos source depending on the OS + ## Alternatively use https://storage.googleapis.com/bioconductor_docker/packages/ + ## though based on https://bit.ly/bioc2021-package-binaries + ## the Azure link will be the main one going forward. + gha_repos <- if( + .Platform$OS.type == "unix" && Sys.info()["sysname"] != "Darwin" + ) c( + "AnVIL" = "https://bioconductordocker.blob.core.windows.net/packages/3.17/bioc", + BiocManager::repositories() + ) else BiocManager::repositories() + + # install suggested packages + BiocManager::install(c("MSnbase", "xcms", "BiocStyle", "msPurityData", "CAMERA")) + install.packages(c("rmarkdown", "RPostgres", "RMySQL")) ## For running the checks message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****')) - remotes::install_cran("rcmdcheck") - BiocManager::install("BiocCheck") + install.packages(c("rcmdcheck", "BiocCheck"), repos = gha_repos) + + ## Pass #1 at installing dependencies + ## This pass uses AnVIL-powered fast binaries + ## details at https://github.com/nturaga/bioc2021-bioconductor-binaries + ## The speed gains only apply to the docker builds. + message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****')) + remotes::install_local(dependencies = TRUE, repos = gha_repos, build_vignettes = FALSE, upgrade = TRUE) + continue-on-error: true shell: Rscript {0} + # - name: Install dependencies pass 2 + # run: | + # ## Pass #2 at installing dependencies + # ## This pass does not use AnVIL and will thus update any packages + # ## that have seen been updated in Bioconductor + # message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****')) + # remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE, force = TRUE) + # shell: Rscript {0} + - name: Install BiocGenerics if: env.has_RUnit == 'true' run: | @@ -201,9 +234,11 @@ jobs: - name: Install pkgdown if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' run: | - remotes::install_cran("pkgdown") + remotes::install_github("r-lib/pkgdown") shell: Rscript {0} + + - name: Session info run: | options(width = 100) @@ -214,10 +249,12 @@ jobs: - name: Run CMD check env: _R_CHECK_CRAN_INCOMING_: false + DISPLAY: 99.0 run: | + options(crayon.enabled = TRUE) rcmdcheck::rcmdcheck( - args = c("--no-build-vignettes", "--no-manual", "--timings"), - build_args = c("--no-manual", "--no-resave-data"), + args = c("--no-manual", "--no-vignettes", "--timings"), + build_args = c("--no-manual", "--keep-empty-dirs", "--no-resave-data"), error_on = "warning", check_dir = "check" ) @@ -235,6 +272,8 @@ jobs: shell: Rscript {0} - name: Run BiocCheck + env: + DISPLAY: 99.0 run: | BiocCheck::BiocCheck( dir('check', 'tar.gz$', full.names = TRUE), @@ -246,7 +285,7 @@ jobs: `no-check-R-ver` = TRUE, `no-check-bioc-help` = TRUE, `no-check-dependencies` = TRUE - + ) shell: Rscript {0} @@ -260,21 +299,47 @@ jobs: if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' run: R CMD INSTALL . - - name: Deploy package + - name: Build pkgdown site if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' - run: | - git config --local user.email "actions@github.com" - git config --local user.name "GitHub Actions" - Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)" - shell: bash {0} + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} ## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE) ## at least one locally before this will work. This creates the gh-pages ## branch (erasing anything you haven't version controlled!) and ## makes the git history recognizable by pkgdown. + - name: Install deploy dependencies + if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' + run: | + apt-get update && apt-get -y install rsync + + - name: Deploy pkgdown site to GitHub pages 🚀 + if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' + uses: JamesIves/github-pages-deploy-action@releases/v4 + with: + clean: false + branch: gh-pages + folder: docs + - name: Upload check results if: failure() uses: actions/upload-artifact@master with: - name: ${{ runner.os }}-biocversion-r-4.1.3-results + name: ${{ runner.os }}-biocversion-devel-r-devel-results path: check + + ## Note that DOCKER_PASSWORD is really a token for your dockerhub + ## account, not your actual dockerhub account password. + ## This comes from + ## https://seandavi.github.io/BuildABiocWorkshop/articles/HOWTO_BUILD_WORKSHOP.html#6-add-secrets-to-github-repo + ## Check https://github.com/docker/build-push-action/tree/releases/v1 + ## for more details. + - uses: docker/build-push-action@v1 + if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && runner.os == 'Linux' " + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: computational-metabolomics/structtoolbox + tag_with_ref: true + tag_with_sha: true + tags: latest diff --git a/DESCRIPTION b/DESCRIPTION index e05871d..e8541da 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Package: msPurity Type: Package Title: Automated Evaluation of Precursor Ion Purity for Mass Spectrometry Based Fragmentation in Metabolomics -Version: 1.21.2 -Date: 2022-04-12 +Version: 1.27.1 +Date: 2023-08-30 Authors@R: c( person(given = "Thomas N.", family = "Lawson", email = "thomas.nigel.lawson@gmail.com", role = c("aut", "cre"), @@ -61,7 +61,7 @@ Suggests: RPostgres, RMySQL VignetteBuilder: knitr -RoxygenNote: 7.1.2 +RoxygenNote: 7.2.3 Roxygen: list(markdown = TRUE) biocViews: MassSpectrometry, Metabolomics, Software Collate: diff --git a/NEWS b/NEWS index aba3ca7..9725584 100644 --- a/NEWS +++ b/NEWS @@ -1,219 +1,180 @@ +CHANGES IN VERSION 1.27.1 ++ createMSP fix - now uses outputs the median precursor MZ and precursor RT in the MSP file + CHANGES IN VERSION 1.21.2 -========================= -* Fixes due to mz and intensity being named in columns for mzR and XCMS -* Fixes for connection{base} file() opening changes (no longer accept w+a in function in R v4.2) -* Update tests for the above -* Update a reference of grpid in averageXFragSpectra functions more explicit (no change in functionality) -* Typo fix in vignette ++ Fixes due to mz and intensity being named in columns for mzR and XCMS ++ Fixes for connection{base} file() opening changes (no longer accept w+a in function in R v4.2) ++ Update tests for the above ++ Update a reference of grpid in averageXFragSpectra functions more explicit (no change in functionality) ++ Typo fix in vignette CHANGES IN VERSION 1.21.1 -========================= -* Bugfix for frag4feature for XCMS 3 compatability https://github.com/computational-metabolomics/msPurity/pull/93 -* Remove imports that are no longer used ++ Bugfix for frag4feature for XCMS 3 compatability https://github.com/computational-metabolomics/msPurity/pull/93 ++ Remove imports that are no longer used CHANGES IN VERSION 1.19.2 -========================= -* XCMS 3 compatability update (M-R-JONES) https://github.com/computational-metabolomics/msPurity/pull/91 ++ XCMS 3 compatability update (M-R-JONES) https://github.com/computational-metabolomics/msPurity/pull/91 CHANGES IN VERSION 1.19.1 -========================= -* Bug fix for flagRemove (full width was not calculated as expected) ++ Bug fix for flagRemove (full width was not calculated as expected) CHANGES IN VERSION 1.17.2 -========================= -* Update dev to match bug fixes in master ++ Update dev to match bug fixes in master CHANGES IN VERSION 1.16.2 -========================= -* Author list updated ++ Author list updated CHANGES IN VERSION 1.17.1 -========================= -* Update dev to match bug fixes in master ++ Update dev to match bug fixes in master CHANGES IN VERSION 1.16.1 -========================= -* Update of createDatabase to record all intra average spectra in database -* Add license and copyright info to code -* Add github workflow CI (and subsequent formatting updates to pass tests) ++ Update of createDatabase to record all intra average spectra in database ++ Add license and copyright info to code ++ Add github workflow CI (and subsequent formatting updates to pass tests) CHANGES IN VERSION 1.15.1 -========================= -* Update dev to match bug fixes in master ++ Update dev to match bug fixes in master CHANGES IN VERSION 1.14.1 -========================= -* Update of rdpc algorithm (see https://github.com/computational-metabolomics/msPurity/issues/78) -* Update of align algorithm (see https://github.com/computational-metabolomics/msPurity/issues/79) -* Fix for spectralMatching of type 'scan' previously incorrectly outputing no matches ++ Update of rdpc algorithm (see https://github.com/computational-metabolomics/msPurity/issues/78) ++ Update of align algorithm (see https://github.com/computational-metabolomics/msPurity/issues/79) ++ Fix for spectralMatching of type 'scan' previously incorrectly outputing no matches CHANGES IN VERSION 1.13.2 -========================= -* Update dev to match bug fixes in master ++ Update dev to match bug fixes in master CHANGES IN VERSION 1.12.2 -========================= -* Fix to allow large files to be processed with combineAnnotation (in some cases the summary report should be excluded) ++ Fix to allow large files to be processed with combineAnnotation (in some cases the summary report should be excluded) CHANGES IN VERSION 1.13.1 -========================= -* Update dev to match bug fixes in master ++ Update dev to match bug fixes in master CHANGES IN VERSION 1.12.1 -========================= -* Bug fix for combineAnnotations - MS1 lookup not handling CAMERA adducts correctly -* Fillpeaks bug fix see github #68 -* Documentation fixes ++ Bug fix for combineAnnotations - MS1 lookup not handling CAMERA adducts correctly ++ Fillpeaks bug fix see github #68 ++ Documentation fixes CHANGES IN VERSION 1.13.0 -========================= -* Bioconductor dev (automatic version bump) ++ Bioconductor dev (automatic version bump) CHANGES IN VERSION 1.12.0 -========================= -* Bioconductor release (automatic version bump) ++ Bioconductor release (automatic version bump) CHANGES IN VERSION 1.11.5 -========================= -* frag4feature fileid fix for conversion from factor to character -* Add missing plyr:: reference (thanks jsaintvanne) ++ frag4feature fileid fix for conversion from factor to character ++ Add missing plyr:: reference (thanks jsaintvanne) CHANGES IN VERSION 1.11.3/4 -========================= -* Overhaul of combineAnnotation function. Uses local database now as previously ++ Overhaul of combineAnnotation function. Uses local database now as previously API calls would take too much time to finish and was not usable -* Various updates of createMSP to make compatible with Galaxy workflows -* Parameter added to purityA to allow user to change the PPM tolerance for MZ ++ Various updates of createMSP to make compatible with Galaxy workflows ++ Parameter added to purityA to allow user to change the PPM tolerance for MZ values between scans when calculated the interpolated precursor ion purity -* Update of spectralMatching results columns to include additional details ++ Update of spectralMatching results columns to include additional details (e.g. retention time) -* Update of spectralMatching so that either PostgreSQL or MySQL database can be ++ Update of spectralMatching so that either PostgreSQL or MySQL database can be used as input to either query or library CHANGES IN VERSION 1.11.2 -========================= -* Bug fix for EIC with MSMS data ++ Bug fix for EIC with MSMS data CHANGES IN VERSION 1.11.1 -========================= -* Bug fix for duplicate MSP spectra when not using metadata table -* Added xcms3 to xcmsSet conversion for "create database" code -* Fix for sirius combine annotations (incorrect column format) ++ Bug fix for duplicate MSP spectra when not using metadata table ++ Added xcms3 to xcmsSet conversion for "create database" code ++ Fix for sirius combine annotations (incorrect column format) CHANGES IN VERSION 1.11.0 -========================= -* Bioconductor dev (automatic version bump) ++ Bioconductor dev (automatic version bump) CHANGES IN VERSION 1.10.0 -========================= -* Bioconductor release (automatic version bump) ++ Bioconductor release (automatic version bump) CHANGES IN VERSION 1.9.12 -========================= -* Troublshoot mac "[MSData::Spectrum::getMZIntensityPairs()] Sizes do not match" error ++ Troublshoot mac "[MSData::Spectrum::getMZIntensityPairs()] Sizes do not match" error CHANGES IN VERSION 1.9.11 -========================= -* Bug fix for createMSP - now handles metadata with duplicate grpids ++ Bug fix for createMSP - now handles metadata with duplicate grpids CHANGES IN VERSION 1.9.10 -========================= -* Documentation updates ++ Documentation updates CHANGES IN VERSION 1.9.9 -========================= -* NEW FUNCTION: createDatabase - + Updated version of create_database that uses an updated schema -* NEW FUNCTION: spectralMatching - + Updated version spectral_matching that allows for more flexibility -* Vignettes and documentation update ++ NEW FUNCTION: createDatabase + o Updated version of create_database that uses an updated schema ++ NEW FUNCTION: spectralMatching + o Updated version spectral_matching that allows for more flexibility ++ Vignettes and documentation update CHANGES IN VERSION 1.9.8 -========================= -* NEW FUNCTION: filterFragSpectra (for purityA objects) - + LC-MS/MS filtering of spectra (prior to averaging) -* NEW FUNCTIONS: averageIntraFragSpectra, averageInterFragSpectra, averageAllFragSpectra (for purityA objects) - + LC-MS/MS averaging and filtering functionality -* NEW FUNCTION: createMSP - + Create msp files from purityA objects where XCMS features have been linked to fragmentation spectra -* Updated create_database and spectral matching to have the option to use averaged fragmentation spectra ++ NEW FUNCTION: filterFragSpectra (for purityA objects) + o LC-MS/MS filtering of spectra (prior to averaging) ++ NEW FUNCTIONS: averageIntraFragSpectra, averageInterFragSpectra, averageAllFragSpectra (for purityA objects) + o LC-MS/MS averaging and filtering functionality ++ NEW FUNCTION: createMSP + o Create msp files from purityA objects where XCMS features have been linked to fragmentation spectra ++ Updated create_database and spectral matching to have the option to use averaged fragmentation spectra CHANGES IN VERSION 1.9.2 -========================= -* Bug fix for groupPeaks and groupPeaksEx (the ppm argument was not working and there was inconsistent behaviour with larger datasets). Thanks to Elliot for spotting (https://github.com/litepalmer) -* Updated documentation for spectral matching ++ Bug fix for groupPeaks and groupPeaksEx (the ppm argument was not working and there was inconsistent behaviour with larger datasets). Thanks to Elliot for spotting (https://github.com/litepalmer) ++ Updated documentation for spectral matching CHANGES IN VERSION 1.7.6 -========================= -* create_sql bug fix for msms spectra table. Was crashing due to incorrect ordering. -* Add peak processing (flag remove peaks) for LC-MS XCMS data -* Add option to for frag4feature to just link to the grouped peak rtmin and rtmax (e.g. do not need to link to individual files) ++ create_sql bug fix for msms spectra table. Was crashing due to incorrect ordering. ++ Add peak processing (flag remove peaks) for LC-MS XCMS data ++ Add option to for frag4feature to just link to the grouped peak rtmin and rtmax (e.g. do not need to link to individual files) CHANGES IN VERSION 1.6.1 -========================= -* Bug fix. For pos/neg switching acquisition two files are can be generated when converting from RAW to mzML (1 for pos, 1 for neg). The resulting files retention time scans were not being tracked properly in msPurity in these cases. This is now fixed. Thanks ++ Bug fix. For pos/neg switching acquisition two files are can be generated when converting from RAW to mzML (1 for pos, 1 for neg). The resulting files retention time scans were not being tracked properly in msPurity in these cases. This is now fixed. Thanks to Julien (https://github.com/jsaintvanne) for spotting the bug. CHANGES IN VERSION 1.5.1 -========================= -* Updates for database creation (can use CAMERA objects now) -* averageSpectra parameter 'MSFileReader' deprecated MSFileReader. Should use csvFile instead, MSFileReader option will still work but a warning will be given ++ Updates for database creation (can use CAMERA objects now) ++ averageSpectra parameter 'MSFileReader' deprecated MSFileReader. Should use csvFile instead, MSFileReader option will still work but a warning will be given CHANGES IN VERSION 1.4.1/2/3 -========================= -* Updates for Galaxy for Spectral Matching -* Spectral matching ra_thres_t bugfix -* Separation of sqlite database creation. Now can be called on it's own or with frag4feature ++ Updates for Galaxy for Spectral Matching ++ Spectral matching ra_thres_t bugfix ++ Separation of sqlite database creation. Now can be called on it's own or with frag4feature (allows the Galaxy tool to be simplified) CHANGES IN VERSION 1.3.9 -========================= -* Added very basic SIMS stitch compatibility -* pcalc can handle NAs -* Update of purityX to handle obiwarp RT correction (requires recording the RT RAW at an earlier step) -* bug fix for when library spectra is bigger than target spectra (thanks Martin) ++ Added very basic SIMS stitch compatibility ++ pcalc can handle NAs ++ Update of purityX to handle obiwarp RT correction (requires recording the RT RAW at an earlier step) ++ bug fix for when library spectra is bigger than target spectra (thanks Martin) CHANGES IN VERSION 1.3.1 -========================= -* Add spectral matching functionality for LC-MS/MS ++ Add spectral matching functionality for LC-MS/MS CHANGES IN VERSION 1.1.1 -========================= -* Added pcalc functions to be used by user -* Added option to remove isotopes from calculation ++ Added pcalc functions to be used by user ++ Added option to remove isotopes from calculation CHANGES IN VERSION 0.99.10/11/12 -========================= -* Troubleshooting windows build failure ++ Troubleshooting windows build failure CHANGES IN VERSION 0.99.9 -========================= -* Offset bug fixed (previous only using extracting lower offset from mzML file) -* Updated handling of RT corrected xcmsSet objects for frag4feature function -* Additional column added for tracking ms/ms spectra ++ Offset bug fixed (previous only using extracting lower offset from mzML file) ++ Updated handling of RT corrected xcmsSet objects for frag4feature function ++ Additional column added for tracking ms/ms spectra CHANGES IN VERSION 0.99.8 -========================= -* User option to change the mzR backend library ++ User option to change the mzR backend library CHANGES IN VERSION 0.99.4/5/6/7 -========================= -* Troubleshooting mac build failure ++ Troubleshooting mac build failure CHANGES IN VERSION 0.99.3 -========================= -* Grouping multiple peaklist into one wide dataframe -** Peaklists can now be averaged across each class using the function groupPeaks() for the class purityD -** A list of dataframes can also be grouped together using the function groupPeakEx() ++ Grouping multiple peaklist into one wide dataframe ++ Peaklists can now be averaged across each class using the function groupPeaks() for the class purityD ++ A list of dataframes can also be grouped together using the function groupPeakEx() CHANGES IN VERSION 0.99.2 -========================= -* Updated class names purityPD to purityD -* Updated class names purityLC to purityX -* Updated vignette to reflect slightly different terminology -* Added normalised TIC option for purityD ++ Updated class names purityPD to purityD ++ Updated class names purityLC to purityX ++ Updated vignette to reflect slightly different terminology ++ Added normalised TIC option for purityD msPurity v0.99.0 (Release date: 2016-04-08) -========================= -Initial release! ++ Initial release! diff --git a/R/purityA-create-msp.R b/R/purityA-create-msp.R index cac65a2..e8bf006 100644 --- a/R/purityA-create-msp.R +++ b/R/purityA-create-msp.R @@ -206,7 +206,7 @@ mspurity_to_msp <- function (pa, msp_file_pth=NULL, metadata=NULL, metadata_cols if (!is.null(av_inter) && nrow(av_inter)>0){ - write.msp(grpd$mz[1], grpd$rt[1], grpid, NA, av_inter, metadata, metadata_cols, of, method, + write.msp(median(grpd$mz), median(grpd$rt), grpid, NA, av_inter, metadata, metadata_cols, of, method, adduct_split, msp_schema, intensity_ra, include_adducts) } @@ -230,7 +230,7 @@ mspurity_to_msp <- function (pa, msp_file_pth=NULL, metadata=NULL, metadata_cols if (!is.null(av_intra_j) && nrow(av_intra_j)>0){ - write.msp(grpd$mz[1], grpd$rt[1], grpid, fileid, av_intra_j, metadata, metadata_cols, + write.msp(median(grpd$mz), median(grpd$rt), grpid, fileid, av_intra_j, metadata, metadata_cols, of, method, adduct_split, msp_schema, intensity_ra, include_adducts) } @@ -248,7 +248,7 @@ mspurity_to_msp <- function (pa, msp_file_pth=NULL, metadata=NULL, metadata_cols if (!is.null(av_all) && nrow(av_all)>0){ - write.msp(grpd$mz[1], grpd$rt[1], grpid, NA, av_all, metadata, metadata_cols, of, + write.msp(median(grpd$mz), median(grpd$rt), grpid, NA, av_all, metadata, metadata_cols, of, method, adduct_split, msp_schema, intensity_ra, include_adducts) } diff --git a/inst/extdata/tests/db/metab_compound_subset.sqlite b/inst/extdata/tests/db/metab_compound_subset.sqlite old mode 100755 new mode 100644 diff --git a/inst/extdata/tests/external_annotations/probmetab.tsv b/inst/extdata/tests/external_annotations/probmetab.tsv old mode 100755 new mode 100644 diff --git a/inst/extdata/tests/msp/all.msp b/inst/extdata/tests/msp/all.msp index 6608cfd..2854303 100644 --- a/inst/extdata/tests/msp/all.msp +++ b/inst/extdata/tests/msp/all.msp @@ -1 +1,28 @@ -RECORD_TITLE: MZ:150.0581 | RT:63.1 | grpid:187 | file:1 | adduct:[M+H]+ MS$FOCUSED_ION: PRECURSOR_M/Z 150.058135986328 AC$CHROMATOGRAPHY: RETENTION_TIME 63.078168 MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ AC$MASS_SPECTROMETRY: ION_MODE POSITIVE CH$NAME: Methionine XCMS groupid (grpid): 187 COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.19.2 PK$NUM_PEAK: 2 PK$PEAK: m/z int. rel.int. 104.053237915039 16147574 100 133.031829833984 10814390 66.97 RECORD_TITLE: MZ:150.0582 | RT:62.3 | grpid:187 | file:2 | adduct:[M+H]+ MS$FOCUSED_ION: PRECURSOR_M/Z 150.058166503906 AC$CHROMATOGRAPHY: RETENTION_TIME 62.3220443725586 MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ AC$MASS_SPECTROMETRY: ION_MODE POSITIVE CH$NAME: Methionine XCMS groupid (grpid): 187 COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.19.2 PK$NUM_PEAK: 4 PK$PEAK: m/z int. rel.int. 102.055404663086 4154222.25 29.71 104.053276062012 13982832 100 133.031875610352 9440187 67.51 150.058349609375 1694299.125 12.12 \ No newline at end of file +RECORD_TITLE: MZ:150.0581 | RT:63.1 | grpid:187 | file:1 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 150.058135986328 +AC$CHROMATOGRAPHY: RETENTION_TIME 63.078168 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Methionine +XCMS groupid (grpid): 187 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 2 +PK$PEAK: m/z int. rel.int. +104.053237915039 16147574 100 +133.031829833984 10814390 66.97 + +RECORD_TITLE: MZ:150.0582 | RT:62.3 | grpid:187 | file:2 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 150.058166503906 +AC$CHROMATOGRAPHY: RETENTION_TIME 62.3220443725586 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Methionine +XCMS groupid (grpid): 187 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 4 +PK$PEAK: m/z int. rel.int. +102.055404663086 4154222.25 29.71 +104.053276062012 13982832 100 +133.031875610352 9440187 67.51 +150.058349609375 1694299.125 12.12 + diff --git a/inst/extdata/tests/msp/all_OLD.msp b/inst/extdata/tests/msp/all_OLD.msp index 7b9dfd6..3b949df 100644 --- a/inst/extdata/tests/msp/all_OLD.msp +++ b/inst/extdata/tests/msp/all_OLD.msp @@ -1,84 +1,84 @@ -RECORD_TITLE: MZ:116.0708 | RT:47.8 | grpid:12 | file:1 | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070816040039 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Sulfamethizole -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070892333984 100876.1328125 100 - -RECORD_TITLE: MZ:116.0708 | RT:47.8 | grpid:12 | file:1 | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070785522461 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Sulfamethizole -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070899963379 165623.640625 100 - -RECORD_TITLE: MZ:116.0708 | RT:47.7 | grpid:12 | file:2 | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070838928223 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.662548 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Sulfamethizole -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070854187012 97631.5859375 100 - -RECORD_TITLE: MZ:116.0708 | RT:47.7 | grpid:12 | file:2 | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070831298828 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.662548 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Sulfamethizole -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070899963379 1782171 100 - -RECORD_TITLE: MZ:116.0708 | RT:47.7 | grpid:12 | file:2 | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070770263672 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.662548 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Sulfamethizole -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070922851562 149471.265625 100 - -RECORD_TITLE: MZ:132.1019 | RT:73.7 | grpid:27 | file:1 | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 132.101852416992 -AC$CHROMATOGRAPHY: RETENTION_TIME 73.692786 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Unknown -XCMS groupid (grpid): 27 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -132.101989746094 402822.6875 100 - -RECORD_TITLE: MZ:132.1019 | RT:73.7 | grpid:27 | file:1 | adduct:[M+H+NH3]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 132.101852416992 -AC$CHROMATOGRAPHY: RETENTION_TIME 73.692786 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H+NH3]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Unknown -XCMS groupid (grpid): 27 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -132.101989746094 402822.6875 100 - +RECORD_TITLE: MZ:116.0708 | RT:47.8 | grpid:12 | file:1 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070816040039 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Sulfamethizole +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070892333984 100876.1328125 100 + +RECORD_TITLE: MZ:116.0708 | RT:47.8 | grpid:12 | file:1 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070785522461 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Sulfamethizole +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070899963379 165623.640625 100 + +RECORD_TITLE: MZ:116.0708 | RT:47.7 | grpid:12 | file:2 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070838928223 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.662548 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Sulfamethizole +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070854187012 97631.5859375 100 + +RECORD_TITLE: MZ:116.0708 | RT:47.7 | grpid:12 | file:2 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070831298828 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.662548 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Sulfamethizole +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070899963379 1782171 100 + +RECORD_TITLE: MZ:116.0708 | RT:47.7 | grpid:12 | file:2 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070770263672 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.662548 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Sulfamethizole +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070922851562 149471.265625 100 + +RECORD_TITLE: MZ:132.1019 | RT:73.7 | grpid:27 | file:1 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 132.101852416992 +AC$CHROMATOGRAPHY: RETENTION_TIME 73.692786 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Unknown +XCMS groupid (grpid): 27 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +132.101989746094 402822.6875 100 + +RECORD_TITLE: MZ:132.1019 | RT:73.7 | grpid:27 | file:1 | adduct:[M+H+NH3]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 132.101852416992 +AC$CHROMATOGRAPHY: RETENTION_TIME 73.692786 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H+NH3]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Unknown +XCMS groupid (grpid): 27 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +132.101989746094 402822.6875 100 + diff --git a/inst/extdata/tests/msp/av_all.msp b/inst/extdata/tests/msp/av_all.msp index 670acd7..ead3c4a 100644 --- a/inst/extdata/tests/msp/av_all.msp +++ b/inst/extdata/tests/msp/av_all.msp @@ -1 +1,15 @@ -RECORD_TITLE: MZ:150.0582 | RT:63.1 | grpid:187 | file:NA | adduct:[M+H]+ MS$FOCUSED_ION: PRECURSOR_M/Z 150.058155403723 AC$CHROMATOGRAPHY: RETENTION_TIME 63.078168 MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ AC$MASS_SPECTROMETRY: ION_MODE POSITIVE CH$NAME: Methionine XCMS groupid (grpid): 187 COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_all' msPurity version:1.19.2 PK$NUM_PEAK: 4 PK$PEAK: m/z int. rel.int. 102.055404663086 4154222.25 13.79 104.053256988525 30130406 100 133.031852722168 20254577 67.22 150.058349609375 1694299.125 5.62 \ No newline at end of file +RECORD_TITLE: MZ:150.0582 | RT:62.7 | grpid:187 | file:NA | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 150.058150670717 +AC$CHROMATOGRAPHY: RETENTION_TIME 62.7001061862793 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Methionine +XCMS groupid (grpid): 187 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_all' msPurity version:1.21.2 +PK$NUM_PEAK: 4 +PK$PEAK: m/z int. rel.int. +102.055404663086 4154222.25 13.79 +104.053256988525 30130406 100 +133.031852722168 20254577 67.22 +150.058349609375 1694299.125 5.62 + diff --git a/inst/extdata/tests/msp/av_all_OLD.msp b/inst/extdata/tests/msp/av_all_OLD.msp index ac04d17..6022e08 100644 --- a/inst/extdata/tests/msp/av_all_OLD.msp +++ b/inst/extdata/tests/msp/av_all_OLD.msp @@ -1,12 +1,12 @@ -RECORD_TITLE: MZ:116.0706 | RT:47.8 | grpid:12 | file:NA | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070557825043 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Sulfamethizole -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070899963379 2295773.625 100 - +RECORD_TITLE: MZ:116.0706 | RT:47.7 | grpid:12 | file:NA | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070597631071 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.7384795 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Sulfamethizole +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070899963379 2295773.625 100 + diff --git a/inst/extdata/tests/msp/av_all_dupmeta.msp b/inst/extdata/tests/msp/av_all_dupmeta.msp index 53dbac2..379cfa5 100644 --- a/inst/extdata/tests/msp/av_all_dupmeta.msp +++ b/inst/extdata/tests/msp/av_all_dupmeta.msp @@ -1 +1,30 @@ -RECORD_TITLE: MZ:150.0582 | RT:63.1 | grpid:187 | file:NA | adduct:[M+H]+ MS$FOCUSED_ION: PRECURSOR_M/Z 150.058155403723 AC$CHROMATOGRAPHY: RETENTION_TIME 63.078168 MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ AC$MASS_SPECTROMETRY: ION_MODE POSITIVE CH$NAME: Methionine XCMS groupid (grpid): 187 COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_all' msPurity version:1.19.2 PK$NUM_PEAK: 4 PK$PEAK: m/z int. rel.int. 102.055404663086 4154222.25 13.79 104.053256988525 30130406 100 133.031852722168 20254577 67.22 150.058349609375 1694299.125 5.62 RECORD_TITLE: MZ:150.0582 | RT:63.1 | grpid:187 | file:NA | adduct:[M+H]+ MS$FOCUSED_ION: PRECURSOR_M/Z 150.058155403723 AC$CHROMATOGRAPHY: RETENTION_TIME 63.078168 MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ AC$MASS_SPECTROMETRY: ION_MODE POSITIVE CH$NAME: possible other compound XCMS groupid (grpid): 187 COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_all' msPurity version:1.19.2 PK$NUM_PEAK: 4 PK$PEAK: m/z int. rel.int. 102.055404663086 4154222.25 13.79 104.053256988525 30130406 100 133.031852722168 20254577 67.22 150.058349609375 1694299.125 5.62 \ No newline at end of file +RECORD_TITLE: MZ:150.0582 | RT:62.7 | grpid:187 | file:NA | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 150.058150670717 +AC$CHROMATOGRAPHY: RETENTION_TIME 62.7001061862793 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Methionine +XCMS groupid (grpid): 187 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_all' msPurity version:1.21.2 +PK$NUM_PEAK: 4 +PK$PEAK: m/z int. rel.int. +102.055404663086 4154222.25 13.79 +104.053256988525 30130406 100 +133.031852722168 20254577 67.22 +150.058349609375 1694299.125 5.62 + +RECORD_TITLE: MZ:150.0582 | RT:62.7 | grpid:187 | file:NA | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 150.058150670717 +AC$CHROMATOGRAPHY: RETENTION_TIME 62.7001061862793 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: possible other compound +XCMS groupid (grpid): 187 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_all' msPurity version:1.21.2 +PK$NUM_PEAK: 4 +PK$PEAK: m/z int. rel.int. +102.055404663086 4154222.25 13.79 +104.053256988525 30130406 100 +133.031852722168 20254577 67.22 +150.058349609375 1694299.125 5.62 + diff --git a/inst/extdata/tests/msp/av_all_dupmeta_OLD.msp b/inst/extdata/tests/msp/av_all_dupmeta_OLD.msp index e894671..7816723 100644 --- a/inst/extdata/tests/msp/av_all_dupmeta_OLD.msp +++ b/inst/extdata/tests/msp/av_all_dupmeta_OLD.msp @@ -1,24 +1,24 @@ -RECORD_TITLE: MZ:116.0706 | RT:47.8 | grpid:12 | file:NA | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070557825043 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Sulfamethizole -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070899963379 2295773.625 100 - -RECORD_TITLE: MZ:116.0706 | RT:47.8 | grpid:12 | file:NA | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070557825043 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: possible other compound -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070899963379 2295773.625 100 - +RECORD_TITLE: MZ:116.0706 | RT:47.7 | grpid:12 | file:NA | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070597631071 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.7384795 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Sulfamethizole +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070899963379 2295773.625 100 + +RECORD_TITLE: MZ:116.0706 | RT:47.7 | grpid:12 | file:NA | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070597631071 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.7384795 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: possible other compound +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070899963379 2295773.625 100 + diff --git a/inst/extdata/tests/msp/av_inter.msp b/inst/extdata/tests/msp/av_inter.msp index 9c5953a..7a78f86 100644 --- a/inst/extdata/tests/msp/av_inter.msp +++ b/inst/extdata/tests/msp/av_inter.msp @@ -1 +1,15 @@ -RECORD_TITLE: MZ:150.0582 | RT:63.1 | grpid:187 | file:NA | adduct:[M+H]+ MS$FOCUSED_ION: PRECURSOR_M/Z 150.058155403723 AC$CHROMATOGRAPHY: RETENTION_TIME 63.078168 MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ AC$MASS_SPECTROMETRY: ION_MODE POSITIVE CH$NAME: Methionine XCMS groupid (grpid): 187 COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_inter' msPurity version:1.19.2 PK$NUM_PEAK: 4 PK$PEAK: m/z int. rel.int. 102.055404663086 4154222.25 13.79 104.053256988525 30130406 100 133.031852722168 20254577 67.22 150.058349609375 1694299.125 5.62 \ No newline at end of file +RECORD_TITLE: MZ:150.0582 | RT:62.7 | grpid:187 | file:NA | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 150.058150670717 +AC$CHROMATOGRAPHY: RETENTION_TIME 62.7001061862793 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Methionine +XCMS groupid (grpid): 187 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_inter' msPurity version:1.21.2 +PK$NUM_PEAK: 4 +PK$PEAK: m/z int. rel.int. +102.055404663086 4154222.25 13.79 +104.053256988525 30130406 100 +133.031852722168 20254577 67.22 +150.058349609375 1694299.125 5.62 + diff --git a/inst/extdata/tests/msp/av_inter_OLD.msp b/inst/extdata/tests/msp/av_inter_OLD.msp index a0683d7..eed684b 100644 --- a/inst/extdata/tests/msp/av_inter_OLD.msp +++ b/inst/extdata/tests/msp/av_inter_OLD.msp @@ -1,36 +1,36 @@ -RECORD_TITLE: MZ:116.0706 | RT:47.8 | grpid:12 | file:NA | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070557825043 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Sulfamethizole -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_inter' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.07089805603 2295773.625 100 - -RECORD_TITLE: MZ:132.1018 | RT:73.7 | grpid:27 | file:NA | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 132.101827230045 -AC$CHROMATOGRAPHY: RETENTION_TIME 73.692786 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Unknown -XCMS groupid (grpid): 27 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_inter' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -132.101989746094 402822.6875 100 - -RECORD_TITLE: MZ:132.1018 | RT:73.7 | grpid:27 | file:NA | adduct:[M+H+NH3]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 132.101827230045 -AC$CHROMATOGRAPHY: RETENTION_TIME 73.692786 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H+NH3]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Unknown -XCMS groupid (grpid): 27 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_inter' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -132.101989746094 402822.6875 100 - +RECORD_TITLE: MZ:116.0706 | RT:47.7 | grpid:12 | file:NA | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070597631071 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.7384795 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Sulfamethizole +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_inter' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.07089805603 2295773.625 100 + +RECORD_TITLE: MZ:132.1018 | RT:73.6 | grpid:27 | file:NA | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 132.101827517612 +AC$CHROMATOGRAPHY: RETENTION_TIME 73.610979 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Unknown +XCMS groupid (grpid): 27 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_inter' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +132.101989746094 402822.6875 100 + +RECORD_TITLE: MZ:132.1018 | RT:73.6 | grpid:27 | file:NA | adduct:[M+H+NH3]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 132.101827517612 +AC$CHROMATOGRAPHY: RETENTION_TIME 73.610979 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H+NH3]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Unknown +XCMS groupid (grpid): 27 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_inter' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +132.101989746094 402822.6875 100 + diff --git a/inst/extdata/tests/msp/av_intra.msp b/inst/extdata/tests/msp/av_intra.msp index 7ef3301..9d7cd6a 100644 --- a/inst/extdata/tests/msp/av_intra.msp +++ b/inst/extdata/tests/msp/av_intra.msp @@ -1 +1,28 @@ -RECORD_TITLE: MZ:150.0582 | RT:63.1 | grpid:187 | file:1 | adduct:[M+H]+ MS$FOCUSED_ION: PRECURSOR_M/Z 150.058155403723 AC$CHROMATOGRAPHY: RETENTION_TIME 63.078168 MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ AC$MASS_SPECTROMETRY: ION_MODE POSITIVE CH$NAME: Methionine XCMS groupid (grpid): 187 COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_intra' msPurity version:1.19.2 PK$NUM_PEAK: 2 PK$PEAK: m/z int. rel.int. 104.053237915039 16147574 100 133.031829833984 10814390 66.97 RECORD_TITLE: MZ:150.0582 | RT:63.1 | grpid:187 | file:2 | adduct:[M+H]+ MS$FOCUSED_ION: PRECURSOR_M/Z 150.058155403723 AC$CHROMATOGRAPHY: RETENTION_TIME 63.078168 MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ AC$MASS_SPECTROMETRY: ION_MODE POSITIVE CH$NAME: Methionine XCMS groupid (grpid): 187 COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_intra' msPurity version:1.19.2 PK$NUM_PEAK: 4 PK$PEAK: m/z int. rel.int. 102.055404663086 4154222.25 29.71 104.053276062012 13982832 100 133.031875610352 9440187 67.51 150.058349609375 1694299.125 12.12 \ No newline at end of file +RECORD_TITLE: MZ:150.0582 | RT:62.7 | grpid:187 | file:1 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 150.058150670717 +AC$CHROMATOGRAPHY: RETENTION_TIME 62.7001061862793 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Methionine +XCMS groupid (grpid): 187 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_intra' msPurity version:1.21.2 +PK$NUM_PEAK: 2 +PK$PEAK: m/z int. rel.int. +104.053237915039 16147574 100 +133.031829833984 10814390 66.97 + +RECORD_TITLE: MZ:150.0582 | RT:62.7 | grpid:187 | file:2 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 150.058150670717 +AC$CHROMATOGRAPHY: RETENTION_TIME 62.7001061862793 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Methionine +XCMS groupid (grpid): 187 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_intra' msPurity version:1.21.2 +PK$NUM_PEAK: 4 +PK$PEAK: m/z int. rel.int. +102.055404663086 4154222.25 29.71 +104.053276062012 13982832 100 +133.031875610352 9440187 67.51 +150.058349609375 1694299.125 12.12 + diff --git a/inst/extdata/tests/msp/av_intra_OLD.msp b/inst/extdata/tests/msp/av_intra_OLD.msp index ac137be..2489cdb 100644 --- a/inst/extdata/tests/msp/av_intra_OLD.msp +++ b/inst/extdata/tests/msp/av_intra_OLD.msp @@ -1,48 +1,48 @@ -RECORD_TITLE: MZ:116.0706 | RT:47.8 | grpid:12 | file:1 | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070557825043 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Sulfamethizole -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_intra' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070896148682 266499.7734375 100 - -RECORD_TITLE: MZ:116.0706 | RT:47.8 | grpid:12 | file:2 | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070557825043 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Sulfamethizole -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_intra' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070899963379 2029273.8515625 100 - -RECORD_TITLE: MZ:132.1018 | RT:73.7 | grpid:27 | file:1 | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 132.101827230045 -AC$CHROMATOGRAPHY: RETENTION_TIME 73.692786 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Unknown -XCMS groupid (grpid): 27 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_intra' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -132.101989746094 402822.6875 100 - -RECORD_TITLE: MZ:132.1018 | RT:73.7 | grpid:27 | file:1 | adduct:[M+H+NH3]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 132.101827230045 -AC$CHROMATOGRAPHY: RETENTION_TIME 73.692786 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H+NH3]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Unknown -XCMS groupid (grpid): 27 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_intra' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -132.101989746094 402822.6875 100 - +RECORD_TITLE: MZ:116.0706 | RT:47.7 | grpid:12 | file:1 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070597631071 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.7384795 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Sulfamethizole +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_intra' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070896148682 266499.7734375 100 + +RECORD_TITLE: MZ:116.0706 | RT:47.7 | grpid:12 | file:2 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070597631071 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.7384795 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Sulfamethizole +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_intra' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070899963379 2029273.8515625 100 + +RECORD_TITLE: MZ:132.1018 | RT:73.6 | grpid:27 | file:1 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 132.101827517612 +AC$CHROMATOGRAPHY: RETENTION_TIME 73.610979 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Unknown +XCMS groupid (grpid): 27 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_intra' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +132.101989746094 402822.6875 100 + +RECORD_TITLE: MZ:132.1018 | RT:73.6 | grpid:27 | file:1 | adduct:[M+H+NH3]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 132.101827517612 +AC$CHROMATOGRAPHY: RETENTION_TIME 73.610979 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H+NH3]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Unknown +XCMS groupid (grpid): 27 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'av_intra' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +132.101989746094 402822.6875 100 + diff --git a/inst/extdata/tests/msp/max.msp b/inst/extdata/tests/msp/max.msp index 2da19fb..12d83d2 100644 --- a/inst/extdata/tests/msp/max.msp +++ b/inst/extdata/tests/msp/max.msp @@ -1 +1,18 @@ -RECORD_TITLE: MZ:150.0581 | RT:63.1 | grpid:187 | file:1 | adduct:[M+H]+ MS$FOCUSED_ION: PRECURSOR_M/Z 150.058135986328 AC$CHROMATOGRAPHY: RETENTION_TIME 63.078168 MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ AC$MASS_SPECTROMETRY: ION_MODE POSITIVE CH$NAME: Methionine XCMS groupid (grpid): 187 COMMENT: Exported from msPurity purityA object using function createMSP, using method 'max' msPurity version:1.19.2 PK$NUM_PEAK: 7 PK$PEAK: m/z int. rel.int. 102.055381774902 4631614.5 28.68 104.053237915039 16147574 100 105.000915527344 196574.15625 1.22 105.03719329834 273244.0625 1.69 133.031829833984 10814390 66.97 137.41633605957 30549.828125 0.19 150.058288574219 1973325.5 12.22 \ No newline at end of file +RECORD_TITLE: MZ:150.0581 | RT:63.1 | grpid:187 | file:1 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 150.058135986328 +AC$CHROMATOGRAPHY: RETENTION_TIME 63.078168 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Methionine +XCMS groupid (grpid): 187 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'max' msPurity version:1.21.2 +PK$NUM_PEAK: 7 +PK$PEAK: m/z int. rel.int. +102.055381774902 4631614.5 28.68 +104.053237915039 16147574 100 +105.000915527344 196574.15625 1.22 +105.03719329834 273244.0625 1.69 +133.031829833984 10814390 66.97 +137.41633605957 30549.828125 0.19 +150.058288574219 1973325.5 12.22 + diff --git a/inst/extdata/tests/msp/max_OLD.msp b/inst/extdata/tests/msp/max_OLD.msp index 978f5f9..22422f9 100644 --- a/inst/extdata/tests/msp/max_OLD.msp +++ b/inst/extdata/tests/msp/max_OLD.msp @@ -1,38 +1,38 @@ -RECORD_TITLE: MZ:116.0708 | RT:47.8 | grpid:12 | file:1 | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070823669434 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Sulfamethizole -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'max' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070892333984 1847702.625 100 - -RECORD_TITLE: MZ:132.1019 | RT:73.5 | grpid:27 | file:2 | adduct:[M+H]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 132.101867675781 -AC$CHROMATOGRAPHY: RETENTION_TIME 73.529172 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Unknown -XCMS groupid (grpid): 27 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'max' msPurity version:1.11.4 -PK$NUM_PEAK: 2 -PK$PEAK: m/z int. rel.int. -130.186950683594 121726.4453125 3.06 -132.102035522461 3973065.5 100 - -RECORD_TITLE: MZ:132.1019 | RT:73.5 | grpid:27 | file:2 | adduct:[M+H+NH3]+ -MS$FOCUSED_ION: PRECURSOR_M/Z 132.101867675781 -AC$CHROMATOGRAPHY: RETENTION_TIME 73.529172 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H+NH3]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -CH$NAME: Unknown -XCMS groupid (grpid): 27 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'max' msPurity version:1.11.4 -PK$NUM_PEAK: 2 -PK$PEAK: m/z int. rel.int. -130.186950683594 121726.4453125 3.06 -132.102035522461 3973065.5 100 - +RECORD_TITLE: MZ:116.0708 | RT:47.8 | grpid:12 | file:1 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070823669434 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Sulfamethizole +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'max' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070892333984 1847702.625 100 + +RECORD_TITLE: MZ:132.1019 | RT:73.5 | grpid:27 | file:2 | adduct:[M+H]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 132.101867675781 +AC$CHROMATOGRAPHY: RETENTION_TIME 73.529172 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Unknown +XCMS groupid (grpid): 27 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'max' msPurity version:1.21.2 +PK$NUM_PEAK: 2 +PK$PEAK: m/z int. rel.int. +130.186950683594 121726.4453125 3.06 +132.102035522461 3973065.5 100 + +RECORD_TITLE: MZ:132.1019 | RT:73.5 | grpid:27 | file:2 | adduct:[M+H+NH3]+ +MS$FOCUSED_ION: PRECURSOR_M/Z 132.101867675781 +AC$CHROMATOGRAPHY: RETENTION_TIME 73.529172 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H+NH3]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +CH$NAME: Unknown +XCMS groupid (grpid): 27 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'max' msPurity version:1.21.2 +PK$NUM_PEAK: 2 +PK$PEAK: m/z int. rel.int. +130.186950683594 121726.4453125 3.06 +132.102035522461 3973065.5 100 + diff --git a/inst/extdata/tests/msp/recrdt.msp b/inst/extdata/tests/msp/recrdt.msp index dc9e566..b91e764 100644 --- a/inst/extdata/tests/msp/recrdt.msp +++ b/inst/extdata/tests/msp/recrdt.msp @@ -1 +1,26 @@ -RECORD_TITLE: Methionine MS$FOCUSED_ION: PRECURSOR_M/Z 150.058135986328 AC$CHROMATOGRAPHY: RETENTION_TIME 63.078168 MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ AC$MASS_SPECTROMETRY: ION_MODE POSITIVE XCMS groupid (grpid): 187 COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.19.2 PK$NUM_PEAK: 2 PK$PEAK: m/z int. rel.int. 104.053237915039 16147574 100 133.031829833984 10814390 66.97 RECORD_TITLE: Methionine MS$FOCUSED_ION: PRECURSOR_M/Z 150.058166503906 AC$CHROMATOGRAPHY: RETENTION_TIME 62.3220443725586 MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ AC$MASS_SPECTROMETRY: ION_MODE POSITIVE XCMS groupid (grpid): 187 COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.19.2 PK$NUM_PEAK: 4 PK$PEAK: m/z int. rel.int. 102.055404663086 4154222.25 29.71 104.053276062012 13982832 100 133.031875610352 9440187 67.51 150.058349609375 1694299.125 12.12 \ No newline at end of file +RECORD_TITLE: Methionine +MS$FOCUSED_ION: PRECURSOR_M/Z 150.058135986328 +AC$CHROMATOGRAPHY: RETENTION_TIME 63.078168 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +XCMS groupid (grpid): 187 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 2 +PK$PEAK: m/z int. rel.int. +104.053237915039 16147574 100 +133.031829833984 10814390 66.97 + +RECORD_TITLE: Methionine +MS$FOCUSED_ION: PRECURSOR_M/Z 150.058166503906 +AC$CHROMATOGRAPHY: RETENTION_TIME 62.3220443725586 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +XCMS groupid (grpid): 187 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 4 +PK$PEAK: m/z int. rel.int. +102.055404663086 4154222.25 29.71 +104.053276062012 13982832 100 +133.031875610352 9440187 67.51 +150.058349609375 1694299.125 12.12 + diff --git a/inst/extdata/tests/msp/recrdt_OLD.msp b/inst/extdata/tests/msp/recrdt_OLD.msp index b725ecc..4bb4dfd 100644 --- a/inst/extdata/tests/msp/recrdt_OLD.msp +++ b/inst/extdata/tests/msp/recrdt_OLD.msp @@ -1,77 +1,77 @@ -RECORD_TITLE: Sulfamethizole -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070816040039 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070892333984 100876.1328125 100 - -RECORD_TITLE: Sulfamethizole -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070785522461 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070899963379 165623.640625 100 - -RECORD_TITLE: Sulfamethizole -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070838928223 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.662548 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070854187012 97631.5859375 100 - -RECORD_TITLE: Sulfamethizole -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070831298828 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.662548 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070899963379 1782171 100 - -RECORD_TITLE: Sulfamethizole -MS$FOCUSED_ION: PRECURSOR_M/Z 116.070770263672 -AC$CHROMATOGRAPHY: RETENTION_TIME 47.662548 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -XCMS groupid (grpid): 12 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -116.070922851562 149471.265625 100 - -RECORD_TITLE: Unknown -MS$FOCUSED_ION: PRECURSOR_M/Z 132.101852416992 -AC$CHROMATOGRAPHY: RETENTION_TIME 73.692786 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -XCMS groupid (grpid): 27 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -132.101989746094 402822.6875 100 - -RECORD_TITLE: Unknown -MS$FOCUSED_ION: PRECURSOR_M/Z 132.101852416992 -AC$CHROMATOGRAPHY: RETENTION_TIME 73.692786 -MS$FOCUSED_ION: PRECURSOR_TYPE [M+H+NH3]+ -AC$MASS_SPECTROMETRY: ION_MODE POSITIVE -XCMS groupid (grpid): 27 -COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.11.4 -PK$NUM_PEAK: 1 -PK$PEAK: m/z int. rel.int. -132.101989746094 402822.6875 100 - +RECORD_TITLE: Sulfamethizole +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070816040039 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070892333984 100876.1328125 100 + +RECORD_TITLE: Sulfamethizole +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070785522461 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.814411 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070899963379 165623.640625 100 + +RECORD_TITLE: Sulfamethizole +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070838928223 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.662548 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070854187012 97631.5859375 100 + +RECORD_TITLE: Sulfamethizole +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070831298828 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.662548 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070899963379 1782171 100 + +RECORD_TITLE: Sulfamethizole +MS$FOCUSED_ION: PRECURSOR_M/Z 116.070770263672 +AC$CHROMATOGRAPHY: RETENTION_TIME 47.662548 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +XCMS groupid (grpid): 12 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +116.070922851562 149471.265625 100 + +RECORD_TITLE: Unknown +MS$FOCUSED_ION: PRECURSOR_M/Z 132.101852416992 +AC$CHROMATOGRAPHY: RETENTION_TIME 73.692786 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +XCMS groupid (grpid): 27 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +132.101989746094 402822.6875 100 + +RECORD_TITLE: Unknown +MS$FOCUSED_ION: PRECURSOR_M/Z 132.101852416992 +AC$CHROMATOGRAPHY: RETENTION_TIME 73.692786 +MS$FOCUSED_ION: PRECURSOR_TYPE [M+H+NH3]+ +AC$MASS_SPECTROMETRY: ION_MODE POSITIVE +XCMS groupid (grpid): 27 +COMMENT: Exported from msPurity purityA object using function createMSP, using method 'all' msPurity version:1.21.2 +PK$NUM_PEAK: 1 +PK$PEAK: m/z int. rel.int. +132.101989746094 402822.6875 100 + diff --git a/tests/testthat/test.2_purityA_OLD.R b/tests/testthat/test.2_purityA_OLD.R index aa85bc7..83d1c31 100644 --- a/tests/testthat/test.2_purityA_OLD.R +++ b/tests/testthat/test.2_purityA_OLD.R @@ -305,7 +305,6 @@ test_that("checking createMSP based functions (xcms v2 functions)", { tmp_dir <- tempdir() - ################################ # Check all method ################################ diff --git a/vignettes/msPurity-lcmsms-data-processing-and-spectral-matching-vignette.Rmd b/vignettes/msPurity-lcmsms-data-processing-and-spectral-matching-vignette.Rmd index c8489fe..8fa5069 100644 --- a/vignettes/msPurity-lcmsms-data-processing-and-spectral-matching-vignette.Rmd +++ b/vignettes/msPurity-lcmsms-data-processing-and-spectral-matching-vignette.Rmd @@ -152,7 +152,7 @@ $$ F_{dpc} = \frac{\sum \vec{w_{Q} }\cdot \vec{w_{L}}}{\sqrt{\sum \vec{w_{Q}^{2} The reverse dot product cosine (rpdc) uses the same algorithm as dpc but all peaks that do not match in the query spectra (based on the alignment) are omitted from the calculation. This will improve scores when the query spectra is noisy but should be used with caution as it might lead to more false positives. -The composite dot product cosine (cdpc) approach is also calculated - this approach is used in the NIST MS search tool and incorporates relative intensity of neighbouring peaks (see function $M_{rel}$ ), where $N$=number of peaks, $Q$=query, $L$=library, $L\&Q$= matching library and query peaks, $w$ is the weighted value and $n$ is either 1 (if the abundance ratio of the library, i.e. $\frac{w_{L,i}}{w_{L,i-1}}$, is $<$ than the abundance ratio of the query i.e. $\frac{w_{Q,i}}{w_{Q,i-1}}$) or -1 (if the abundance ratio of the library is $>$ than the abundance ratio of the query). The approach was first described in [@stein1994optimization]. +The composite dot product cosine (cdpc) approach is also calculated - this approach is used in the NIST MS search tool and incorporates relative intensity of neighbouring peaks (see function $F_{rel}$ ), where $N$=number of peaks, $Q$=query, $L$=library, $L\&Q$= matching library and query peaks, $w$ is the weighted value and $n$ is either 1 (if the abundance ratio of the library, i.e. $\frac{w_{L,i}}{w_{L,i-1}}$, is $<$ than the abundance ratio of the query i.e. $\frac{w_{Q,i}}{w_{Q,i-1}}$) or -1 (if the abundance ratio of the library is $>$ than the abundance ratio of the query). The approach was first described in [@stein1994optimization]. $$ F_{rel} = \Bigg( \frac{1}{N_{L\&Q}-1} \Bigg) \cdot \sum_{i=2}^{N_{L\&Q}} \Bigg( \frac{w_{L,i}}{w_{L,i-1}} \Bigg)_{}{^n} \cdot \Bigg( \frac{w_{Q,i}}{w_{Q,i-1}} \Bigg)_{}{^{-n}}$$ diff --git a/vignettes/msPurity-lcmsms-data-processing-and-spectral-matching-vignette.html b/vignettes/msPurity-lcmsms-data-processing-and-spectral-matching-vignette.html index ec6d9d4..12261f6 100644 --- a/vignettes/msPurity-lcmsms-data-processing-and-spectral-matching-vignette.html +++ b/vignettes/msPurity-lcmsms-data-processing-and-spectral-matching-vignette.html @@ -11,41 +11,1287 @@ - + LC-MS/MS data processing and spectral matching workflow using msPurity and XCMS - - + - - - - + + + + - - - - - +h1.title {font-size: 38px;} +h2 {font-size: 30px;} +h3 {font-size: 24px;} +h4 {font-size: 18px;} +h5 {font-size: 16px;} +h6 {font-size: 12px;} +code {color: inherit; background-color: rgba(0, 0, 0, 0.04);} +pre:not([class]) { background-color: white } + + + + + +code{white-space: pre-wrap;} +span.smallcaps{font-variant: small-caps;} +span.underline{text-decoration: underline;} +div.column{display: inline-block; vertical-align: top; width: 50%;} +div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} +ul.task-list{list-style: none;} + + +