Package: msPurity 2.1.0

Ossama Edbali

msPurity: Tools for LC-MSn-Based Metabolomics: Precursor Ion Purity Assessment, Fragmentation Data and Spectral Tree Processing, and Spectral Matching

Provides tools for precursor ion purity assessment, processing fragmentation data and spectral trees, and spectral matching in LC-MSn-based metabolomics. Precursor ion purity estimates the contribution of a selected precursor to the signal within its isolation window, using neighbouring MS1 measurements for MS2 and linked parent fragmentation spectra for higher MSn levels. Fragmentation spectra can be associated with chromatographic features, filtered and averaged using acquisition-aware settings. Mass Spectral Trees link successive fragmentation spectra, while Precursor-Fragment Trees connect individual precursor and product peaks. Spectral matching compares measured or consensus spectra with experimental spectra and reference libraries, accounting for MS level, precursor relationships and acquisition conditions. The optional BLINK method computes approximate cosine similarity as described by Harwood et al. (2023) <doi:10.1038/s41598-023-40496-9>. Integration with 'Spectra' and 'xcms' connects spectrum handling and chromatographic feature information. Parquet datasets link raw measurements, processed spectra and reference libraries, retaining feature associations, processing settings and measurement provenance. Reusable parameter objects and recorded processing history support reproducible analysis and reopening of processed results. Spectrum selection, linked visualisation, library import and export, and reporting of feature information and spectral matches support downstream interpretation and data exchange.

Authors:Thomas N. Lawson [aut], Ossama Edbali [aut, cre], Ralf Weber [aut, ths], Martin Jones [ctb], Julien Saint-Vanne [ctb], Andris Jankevics [ctb], Mark Viant [ths], Warwick Dunn [ths]

msPurity_2.1.0.tar.gz
msPurity_2.1.0.zip(r-4.7-any)msPurity_2.1.0.zip(r-4.6-any)msPurity_2.1.0.zip(r-4.5-any)
msPurity_2.1.0.tgz(r-4.6-any)msPurity_2.1.0.tgz(r-4.5-any)
msPurity_2.1.0.tar.gz(r-4.7-any)msPurity_2.1.0.tar.gz(r-4.6-any)
msPurity_2.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
msPurity/json (API)

# Install 'msPurity' in R:
install.packages('msPurity', repos = c('https://bioc.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/computational-metabolomics/mspurity/issues

On BioConductor:msPurity-1.99.7(bioc 3.24)msPurity-1.38.0(bioc 3.23)

massspectrometrymetabolomicssoftwarebioconductor-packagedimsfragmentationlc-mslc-msmsmass-spectral-librariesmass-spectrometryprecursor-ion-purityspectral-matching

8.51 score 16 stars 52 scripts 518 downloads 2 mentions 68 exports 129 dependencies

Last updated from:7afe5bb369. Checks:1 WARNING, 4 ERROR, 2 OK, 3 NOTE. Indexed: yes.

TargetResultTimeFilesSyslog
bioc-checksWARNING328
linux-develERROR785
source / vignettesOK426
linux-releaseNOTE1092
macos-releaseNOTE916
macos-oldrelERROR615
windows-develERROR717
windows-releaseNOTE890
windows-oldrelERROR4574
wasm-releaseOK177

Exports:allFragSpectraas_igraphas.listassessPuritySingleaverageAllFragSpectraaveragedPeaksaveragedSpectraAverageFragSpectraParamaverageInterFragSpectraaverageIntraFragSpectraaverageMembersaveragePeakMembersaverageProvenanceaverageSpectraaverageSpectraSingleBlinkMatchingParamcombineAnnotationsconvertLibraryToParquetconvertSqliteToParquetcreate_databasecreateDatabasecreateMSPdimsPredictPuritydimsPredictPuritySinglefilterFragSpectraFilterFragSpectraParamfilterpflag_removefrag4featureFrag4FeatureParamfragmentLinksget_additional_mzml_metaGetfilesgetPgroupedSpectragroupPeaksgroupPeaksExiwNormGaussiwNormQE.5iwNormRcosinemassSpectralTreesparquetCapabilitiespcalcprecursorFragmentTreesprocessedSpectrumInfoprocessingHistoryprocessingParameterspurityAPurityAParampurityDpurityTablepurityXPurityXParamreadProcessedProvenancereadProcessedSpectrascoreSpectrumPairshowspectral_matchingspectralMatchingSpectralMatchingParamsubsetTreesubtractsubtractMZupdateObjectvalidatevalidateParquetwriteGraphMLwriteOut

Dependencies:abindAnnotationFilterarrowaskpassassertthatbase64encBHBiobaseBiocBaseUtilsBiocFileCacheBiocGenericsbiocmakeBiocParallelbitbit64blobbslibcachemcliclueclustercodetoolscpp11crayoncrosstalkcurldata.tableDBIdbplyrDelayedArraydigestdir.expirydoSNOWdplyrduckdbevaluatefarverfastclusterfastmapfilelockfontawesomeforeachformatRfsfutile.loggerfutile.optionsgenericsGenomicRangesggplot2gluegtablehighrhmshtmltoolshtmlwidgetshttrhttr2igraphIRangesisobanditeratorsjquerylibjsonliteknitrlabelinglambda.rlaterlatticelazyevallifecyclemagrittrMASSMatrixMatrixGenericsmatrixStatsmemoiseMetaboCoreUtilsmimeMsBackendParquetMsCoreUtilsMsExperimentMultiAssayExperimentmzRncdf4opensslotelpillarpkgconfigplotlyplyrprettyunitsprogresspromisesProtGenericspurrrQFeaturesR6rappdirsRColorBrewerRcppreshape2Rhdf5librlangrmarkdownRSQLiteS4ArraysS4VectorsS7sassscalesSeqinfosnowSparseArraySpectrastringistringrSummarizedExperimentsystibbletidyrtidyselecttinytexutf8vctrsviridisLitewithrxfunXVectoryaml

LC-MSⁿ data exploration, processing and spectral matching: chemical standards L-tryptophan and L-kynurenine
Introduction | Explore the data | Detect features with xcms | Assess purity and link spectra to features | Filter and average by acquisition condition | Processing history | Store and reopen results in Parquet | Explore spectral trees | Compare spectra | Session information | References

Last update: 2026-11-20
Started: 2026-11-20

Using msPurity for Precursor Ion Purity Assessments, Data Processing and Metabolite Annotation of Mass Spectrometry Fragmentation Data
Introduction | purityA | Assessing precursor purity of previously acquired MS/MS spectra | Isolation efficiency | Map fragmentation scans to xcms features | Filter, average and export fragmentation spectra | Reopen and match the processed spectra | purityX | Predict precursor purity from an MS1-only run | References

Last update: 2026-11-20
Started: 2016-05-20

LC-MS/MS data processing and spectral matching workflow using msPurity and XCMS
LC-MS/MS data processing and spectral matching workflow | Read the two DDA runs as a Parquet study | Detect chromatographic features with xcms 4 | Build the query and reference datasets | Rank library hits with the default score | Search the same spectra with BLINK | Read the saved evidence | References

Last update: 2026-11-20
Started: 2019-04-24

Trace scans and search precursor–fragment links
Follow a scan branch | Search measured peaks and candidate neutral losses | Use the parent peak recorded by purityA | Plot or export a hit | Keep passing products after filtering

Last update: 2026-11-20
Started: 2026-11-20

msPurity spectral database schema
Spectral database schema

Last update: 2019-09-13
Started: 2019-04-24

Readme and manuals

Help Manual

Help pageTopics
Convert, plot and export spectral treesas_igraph plot.MassSpectralTrees plot.PrecursorFragmentTrees plot.SpectralTree writeGraphML
Assess the purity of a single LC-MS/MS or DI-MS/MS fileassessPuritySingle
Using a purityA object, average and filter MS/MS spectra for each XCMS feature within and across MS data files (ignoring intra and inter relationships)averageAllFragSpectra averageAllFragSpectra,purityA-method
Complete parameters for fragmentation-spectrum averagingas.list,AverageFragSpectraParam-method AverageFragSpectraParam AverageFragSpectraParam-class
Using a purityA object, average and filter fragmentation spectra for each XCMS feature across multiple MS data filesaverageInterFragSpectra averageInterFragSpectra,purityA-method
Using a purityA object, average and filter fragmentation spectra for each XCMS feature within a MS data fileaverageIntraFragSpectra averageIntraFragSpectra,purityA-method
Trace the immediate or original inputs to an averaged spectrumaverageMembers averagePeakMembers
Extract the spectra and recorded inputs behind selected averagesaverageProvenance
BLINK fragment scoring parametersas.list,BlinkMatchingParam-method BlinkMatchingParam BlinkMatchingParam-class
Combine AnnotationscombineAnnotations
Convert a spectral library to a Parquet library datasetconvertLibraryToParquet
Convert an msPurity SQLite database to a Parquet results datasetconvertSqliteToParquet
Create database deprecatedcreate_database
Create databasecreateDatabase
Using a purityA object, create an MSP file of fragmentation spectracreateMSP createMSP,purityA-method
Filter fragmentation spectra associated with an XCMS featurefilterFragSpectra filterFragSpectra,purityA-method
Complete parameters for fragmentation-spectrum filteringas.list,FilterFragSpectraParam-method FilterFragSpectraParam FilterFragSpectraParam-class
Flag and remove unwanted peaksflag_remove
Using a purityA object, link MS/MS data to XCMS featuresfrag4feature frag4feature,purityA-method
Complete parameters for feature associationFrag4FeatureParam Frag4FeatureParam-class
List the direct precursor-product links of a peak treefragmentLinks
Gaussian normalisation for isolation window efficiencyiwNormGauss
Q-Exactive +/- 0.5 range, normalisation for isolation window efficiencyiwNormQE.5
Raised cosine normalisation for isolation window efficiencyiwNormRcosine
Construct Mass Spectral Trees from measured acquisition metadatamassSpectralTrees
Deprecated interfaces in msPurityaveragedPeaks averagedPeaks,purityD-method averageSpectra averageSpectra,purityD-method averageSpectraSingle dimsPredictPurity dimsPredictPurity,purityD-method dimsPredictPuritySingle filterp filterp,purityD-method Getfiles getP getP,purityD-method get_additional_mzml_meta groupPeaks groupPeaks,purityD-method groupPeaksEx initialize,purityD-method msPurity-deprecated purityD purityD-class show,purityD-method subtract subtract,purityD-method subtractMZ updateObject,purityD-method writeOut writeOut,purityD-method
The capability set of the msPurity Parquet backendparquetCapabilities
Perform purity calculation on a peak matrixpcalc
Construct a precursor-fragment tree from measured spectraprecursorFragmentTrees
Read processed spectra and their provenance from a Parquet results datasetprocessedSpectrumInfo readProcessedProvenance readProcessedSpectra
Processing history and effective settingsprocessingHistory processingHistory,purityA-method processingHistory,purityX-method processingHistory,Spectra-method processingParameters processingParameters,purityA-method processingParameters,purityX-method processingParameters,Spectra-method
Assess the acquired precursor ion purity of MS/MS spectra (constructor)purityA
Results of a purityA objectallFragSpectra allFragSpectra,purityA-method averagedSpectra averagedSpectra,purityA-method groupedSpectra groupedSpectra,purityA-method purityA-accessors purityTable purityTable,purityA-method
Complete parameters for precursor-purity assessmentas.list,PurityAParam-method PurityAParam PurityAParam-class
Assessing anticipated purity of XCMS features from an LC-MS runpurityX
Parameters for chromatographic-feature purity predictionas.list,PurityXParam-method PurityXParam PurityXParam-class
Check compatibility and score a pair of MS2, MS3 or MS4 spectrascoreSpectrumPair
Show method for purityA classshow,purityA-method
Show method for purityXshow,purityX-method
Spectral matching deprecatedspectral_matching
Spectral matching for LC-MS/MS datasetsspectralMatching
Tolerances for scoring one pair of fragmentation spectraas.list,SpectralMatchingParam-method SpectralMatchingParam SpectralMatchingParam-class
Select a component or branch of a scan or peak treesubsetTree
Update a purityA object to the current class definitionupdateObject,purityA-method
Update saved feature-purity predictionsupdateObject,purityX-method
Validate precursor purity predictions using LC-MS and LC-MS/MS datasetvalidate validate,purityA-method
Validate a Parquet dataset written by msPurityvalidateParquet