MSMetaEnhancer
MSMetaEnhancer is a tool used for .msp files annotation.
It adds metadata like SMILES, InChI, and CAS number fetched from the following services: CIR, CTS, PubChem, IDSM, BridgeDb, and Wikidata.
The app uses asynchronous implementation of annotation process allowing for optimal fetching speed.
If you use MSMetaEnhancer in your work, please cite the following publication:
Troják et al., (2022). MSMetaEnhancer: A Python package for mass spectra metadata annotation. Journal of Open Source Software, 7(79), 4494, https://doi.org/10.21105/joss.04494
Usage
import asyncio
from MSMetaEnhancer import Application
from MSMetaEnhancer.libs.converters.web import (
CTS,
CIR,
IDSM,
PubChem,
BridgeDb,
Wikidata,
)
from MSMetaEnhancer.libs.converters.compute import RDKit
from MSMetaEnhancer.libs.utils.ConverterBuilder import ConverterBuilder
ConverterBuilder.register([CTS, CIR, IDSM, PubChem, BridgeDb, Wikidata, RDKit])
app = Application()
# import your .msp file
app.load_data('sample.msp', file_format='msp')
# curate given metadata (e.g. fix CAS numbers)
app.curate_metadata()
# specify requested services (these are supported)
services = ['CTS', 'CIR', 'IDSM', 'PubChem', 'BridgeDb', 'Wikidata', 'RDKit']
# specify requested jobs
jobs = [('name', 'inchi', 'IDSM'), ('inchi', 'formula', 'IDSM'), ('inchi', 'inchikey', 'IDSM'),
('inchi', 'iupac_name', 'IDSM'), ('inchi', 'canonical_smiles', 'IDSM')]
# run asynchronous annotations of spectra data
asyncio.run(app.annotate_spectra(services, jobs))
# export .msp file
app.save_data('sample_out.msp', file_format='msp')
Installation
Prerequisites:
- Python 3.9+
- Anaconda
Install MSMetaEnhancer from Bioconda with:
# install MSMetaEnhancer in a new virtual environment to avoid dependency clashes
conda create --name MSMetaEnhancer python=3.9
conda activate MSMetaEnhancer
conda install --channel bioconda --channel conda-forge MSMetaEnhancer
Developer Documentation
Setup
Create your development environment using the provided script via conda to install all required dependencies.
Contributing
We appreciate contributions - feel free to open an issue on our repository, create your own fork, work on the problem and post a PR. Please add your contributions to the changelog and to adhere to the versioning. For more information see here.
Testing
All functionality is tested with the pytest framework.
Metadata
Release files for msmetaenhancer 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| msmetaenhancer-0.6.1.tar.gz | 21.2 kB | Without provenance | Details for msmetaenhancer-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| msmetaenhancer-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for msmetaenhancer-0.6.1-py3-none-any.whl |
Total release size: 54.5 kB
Release files / msmetaenhancer-0.6.1.tar.gz
| Download URL | msmetaenhancer-0.6.1.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ecbea06a50095b6c22f50bcd8c3f67bf924b5c1782d2bf7c624bb96d252a35ac
|
|
BLAKE2b-256 checksum How to use checksums |
e776d43ea5c4c63117d1bc1efd18f7bf20c90dda357b622d38a83fb1129c0a88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.13.1 Linux/7.0.0-1017-azure
|
Release files / msmetaenhancer-0.6.1-py3-none-any.whl
| Download URL | msmetaenhancer-0.6.1-py3-none-any.whl |
|---|---|
| Size | 33.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f09c69f0e0905b6e2eff7b95eb53fd434e53454df384d281816ed2b81067734
|
|
BLAKE2b-256 checksum How to use checksums |
7541d89ef81b14e14b560e3bccceddc0f03de8101755d0be8024ec3252f47d04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.13.1 Linux/7.0.0-1017-azure
|
Security for msmetaenhancer 0.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.