Skip to main content

Python package to perform MS2 Based Sample Vectorization and visualization

Project description

GitHub Workflow Status GitHub PyPI

MEMO

Ms2 basEd saMple vectOrization (MEMO) package

Description

MEMO is a method allowing a Retention Time (RT) agnostic alignment of metabolomics samples using the fragmentation spectra (MS2) of their consituents. The occurence of MS2 peaks and neutral losses (to the precursor) in each sample is counted and used to generate an MS2 fingerprint of the sample. These fingerprints can in a second stage be aligned to compare different samples. Once obtained, different filtering (remove peaks/losses from blanks for example) and visualization techniques (MDS/PCoA, TMAP, Heatmap, …) can be used. MEMO suits particularly well to compare chemodiverse samples, ie with a poor features overlap, or to compare samples with a strong RT shift, acquired using different LC methods or even different mass spectrometers technology (Maxiis qToF vs Q-Exactive).

MEMO is mainly built on matchms and spec2vec packages for handling the MS2 spectra and convert them into documents. Huge thanks to them for the amazing work done with these packages!

Examples

Different examples of application and comparison to other MS/MS based metrics are avalable here and notebooks are available on GitHub

Publication

To add

To install it:

First make sure to have anaconda installed.

A) Using pip install

A.1. Create a new conda environment to avoid clashes:

conda create --name memo python=3.8
conda activate memo

A.2. Install with pip:

pip install numpy
pip install memo-ms

If you have an error, try insstalling scikit-bio from conda-forge before installing the package with pip:

conda install -c conda-forge scikit-bio
pip install memo-ms

You can clone the repository to get the demo spectra and quant table files!

B) Clone and install locally

B.1. First clone the repository using git clone in command line:

git clone <ssh_key or https>

B.2. Create a new conda environment to avoid clashes:

conda create --name memo python
conda activate memo

B.3. Install the package locally using pip

pip install .

C) Test it using the Tutorial notebook

Documentation for developers

Installation

Create an environment with

git clone https://github.com/mandelbrot-project/memo.git
cd memo
conda create --name memo-dev python=3.8
conda activate memo-dev

Then install dependencies and memo:

python -m pip install --upgrade pip
pip install numpy
pip install --editable .[dev]
# pip install -e .'[dev]' (on mac)

Run tests

Memo tests can be run by:

pytest

And the code linter with

prospector

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memo_ms-0.1.1.tar.gz (23.8 kB view hashes)

Uploaded Source

Built Distribution

memo_ms-0.1.1-py3-none-any.whl (22.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page