Skip to main content

MSMetaEnhancer

install with bioconda docs Conda PyPI - Python Version DOI

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, and BridgeDb. 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
from MSMetaEnhancer.libs.converters.compute import RDKit
from MSMetaEnhancer.libs.utils.ConverterBuilder import ConverterBuilder

ConverterBuilder.register([CTS, CIR, IDSM, PubChem, BridgeDb, 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', '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.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for msmetaenhancer 0.5.1
File Size Uploaded
msmetaenhancer-0.5.1.tar.gz 19.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for msmetaenhancer 0.5.1
File Interpreter ABI Platform
msmetaenhancer-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 49.8 kB

Release files / msmetaenhancer-0.5.1.tar.gz

Download URL msmetaenhancer-0.5.1.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6d6bc499395c3a196499605327880ecd9bd6a75ea2fa4cc8afbad6cc75d08d42
BLAKE2b-256 checksum
How to use checksums
cdb2ad5ca5d106c998d1d021a809f1818c3d6725c7867b46b639e3ef5c362891
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.0 CPython/3.11.0 Linux/6.17.0-1010-azure

Release files / msmetaenhancer-0.5.1-py3-none-any.whl

Download URL msmetaenhancer-0.5.1-py3-none-any.whl
Size 30.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
299eb0a3067a94daea11f7fd85e416857c5f4fd72783ea19a7461507731b5488
BLAKE2b-256 checksum
How to use checksums
a34d947b29e75334509aef369d29173fe46cb56cdfadb40ab8361bd1061e120a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.0 CPython/3.11.0 Linux/6.17.0-1010-azure

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page