spec2vec


Namespec2vec JSON
Version 0.8.0 PyPI version JSON
download
home_pagehttps://github.com/iomega/spec2vec
SummaryWord2Vec based similarity measure of mass spectrometry data.
upload_time2023-01-19 09:19:03
maintainer
docs_urlNone
authorNetherlands eScience Center
requires_python>=3.7
licenseApache Software License 2.0
keywords word2vec mass spectrometry fuzzy matching fuzzy search
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            `fair-software.nl <https://fair-software.nl/>`_ recommendations:

|GitHub Badge|
|License Badge|
|Conda Badge| |Pypi Badge| |Research Software Directory Badge|
|Zenodo Badge|
|CII Best Practices Badge| |Howfairis Badge|

Code quality checks:

|GitHub Workflow Status|
|ReadTheDocs Badge|
|Sonarcloud Quality Gate Badge| |Sonarcloud Coverage Badge|

################################################################################
spec2vec
################################################################################
**Spec2vec** is a novel spectral similarity score inspired by a natural language processing
algorithm -- Word2Vec. Where Word2Vec learns relationships between words in sentences,
**spec2vec** does so for mass fragments and neutral losses in MS/MS spectra.
The spectral similarity score is based on spectral embeddings learnt
from the fragmental relationships within a large set of spectral data. 

If you use **spec2vec** for your research, please cite the following references:

Huber F, Ridder L, Verhoeven S, Spaaks JH, Diblen F, Rogers S, van der Hooft JJJ, (2021) "Spec2Vec: Improved mass spectral similarity scoring through learning of structural relationships". PLoS Comput Biol 17(2): e1008724. `doi:10.1371/journal.pcbi.1008724 <https://doi.org/10.1371/journal.pcbi.1008724>`_

(and if you use **matchms** as well:
F. Huber, S. Verhoeven, C. Meijer, H. Spreeuw, E. M. Villanueva Castilla, C. Geng, J.J.J. van der Hooft, S. Rogers, A. Belloum, F. Diblen, J.H. Spaaks, (2020). "matchms - processing and similarity evaluation of mass spectrometry data". Journal of Open Source Software, 5(52), 2411, https://doi.org/10.21105/joss.02411 )

Thanks!



.. |GitHub Badge| image:: https://img.shields.io/badge/github-repo-000.svg?logo=github&labelColor=gray&color=blue
   :target: https://github.com/iomega/spec2vec
   :alt: GitHub Badge

.. |License Badge| image:: https://img.shields.io/github/license/iomega/spec2vec
   :target: https://github.com/iomega/spec2vec
   :alt: License Badge

.. |Conda Badge| image:: https://img.shields.io/conda/v/bioconda/spec2vec?color=blue
   :target: https://bioconda.github.io/recipes/spec2vec/README.html
   :alt: Conda Badge (Bioconda)

.. |Pypi Badge| image:: https://img.shields.io/pypi/v/spec2vec?color=blue
   :target: https://pypi.org/project/spec2vec/
   :alt: spec2vec on PyPI

.. |Research Software Directory Badge| image:: https://img.shields.io/badge/rsd-spec2vec-00a3e3.svg
   :target: https://www.research-software.nl/software/spec2vec
   :alt: Research Software Directory Badge

.. |Zenodo Badge| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3873169.svg
   :target: https://doi.org/10.5281/zenodo.3873169
   :alt: Zenodo Badge

.. |CII Best Practices Badge| image:: https://bestpractices.coreinfrastructure.org/projects/3967/badge
   :target: https://bestpractices.coreinfrastructure.org/projects/3967
   :alt: CII Best Practices Badge

.. |Howfairis Badge| image:: https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F-green
   :target: https://fair-software.eu
   :alt: Howfairis Badge

.. |ReadTheDocs Badge| image:: https://readthedocs.org/projects/spec2vec/badge/?version=latest
    :alt: Documentation Status
    :scale: 100%
    :target: https://spec2vec.readthedocs.io/en/latest/?badge=latest

.. |Sonarcloud Quality Gate Badge| image:: https://sonarcloud.io/api/project_badges/measure?project=iomega_spec2vec&metric=alert_status
   :target: https://sonarcloud.io/dashboard?id=iomega_spec2vec
   :alt: Sonarcloud Quality Gate

.. |Sonarcloud Coverage Badge| image:: https://sonarcloud.io/api/project_badges/measure?project=iomega_spec2vec&metric=coverage
   :target: https://sonarcloud.io/component_measures?id=iomega_spec2vec&metric=Coverage&view=list
   :alt: Sonarcloud Coverage

.. |GitHub Workflow Status| image:: https://img.shields.io/github/actions/workflow/status/matchms/spec2vec/CI_build.yml?branch=master
   :target: https://img.shields.io/github/workflow/status/iomega/spec2vec/CI%20Build
   :alt: GitHub Workflow Status


***********************
Documentation for users
***********************
For more extensive documentation `see our readthedocs <https://spec2vec.readthedocs.io/en/latest/>`_ or get started with our `spec2vec introduction tutorial <https://blog.esciencecenter.nl/build-a-mass-spectrometry-analysis-pipeline-in-python-using-matchms-part-ii-spec2vec-8aa639571018>`_.

Versions
========
Since version `0.5.0` Spec2Vec uses `gensim >= 4.0.0` which should make it faster and more future proof. Model trained with older versions should still be importable without any issues. If you had scripts that used additional gensim code, however, those might occationally need some adaptation, see also the `gensim documentation on how to migrate your code <https://github.com/RaRe-Technologies/gensim/wiki/Migrating-from-Gensim-3.x-to-4>`_.


Installation
============


Prerequisites:  

- Python 3.7, 3.8, or 3.9  
- Recommended: Anaconda

We recommend installing spec2vec from Anaconda Cloud with

.. code-block:: console

  conda create --name spec2vec python=3.8
  conda activate spec2vec
  conda install --channel bioconda --channel conda-forge spec2vec

Alternatively, spec2vec can also be installed using ``pip``. When using spec2vec together with ``matchms`` it is important to note that only the Anaconda install will make sure that also ``rdkit`` is installed properly, which is requried for a few matchms filter functions (it is not required for any spec2vec related functionalities though).

.. code-block:: console

  pip install spec2vec

Examples
========
Below a code example of how to process a large data set of reference spectra to
train a word2vec model from scratch. Spectra are converted to documents using ``SpectrumDocument`` which converts spectrum peaks into "words" according to their m/z ratio (for instance "peak@100.39"). A new word2vec model can then trained using ``train_new_word2vec_model`` which will set the training parameters to spec2vec defaults unless specified otherwise. Word2Vec models learn from co-occurences of peaks ("words") across many different spectra.
To get a model that can give a meaningful representation of a set of
given spectra it is desirable to train the model on a large and representative
dataset.

.. code-block:: python

    import os
    import matchms.filtering as msfilters
    from matchms.importing import load_from_mgf
    from spec2vec import SpectrumDocument
    from spec2vec.model_building import train_new_word2vec_model

    def spectrum_processing(s):
        """This is how one would typically design a desired pre- and post-
        processing pipeline."""
        s = msfilters.default_filters(s)
        s = msfilters.add_parent_mass(s)
        s = msfilters.normalize_intensities(s)
        s = msfilters.reduce_to_number_of_peaks(s, n_required=10, ratio_desired=0.5, n_max=500)
        s = msfilters.select_by_mz(s, mz_from=0, mz_to=1000)
        s = msfilters.add_losses(s, loss_mz_from=10.0, loss_mz_to=200.0)
        s = msfilters.require_minimum_number_of_peaks(s, n_required=10)
        return s

    # Load data from MGF file and apply filters
    spectrums = [spectrum_processing(s) for s in load_from_mgf("reference_spectrums.mgf")]

    # Omit spectrums that didn't qualify for analysis
    spectrums = [s for s in spectrums if s is not None]

    # Create spectrum documents
    reference_documents = [SpectrumDocument(s, n_decimals=2) for s in spectrums]

    model_file = "references.model"
    model = train_new_word2vec_model(reference_documents, iterations=[10, 20, 30], filename=model_file,
                                     workers=2, progress_logger=True)

Once a word2vec model has been trained, spec2vec allows to calculate the similarities
between mass spectrums based on this model. In cases where the word2vec model was
trained on data different than the data it is applied for, a number of peaks ("words")
might be unknown to the model (if they weren't part of the training dataset). To
account for those cases it is important to specify the ``allowed_missing_percentage``,
as in the example below.

.. code-block:: python

    import gensim
    from matchms import calculate_scores
    from spec2vec import Spec2Vec

    # query_spectrums loaded from files using https://matchms.readthedocs.io/en/latest/api/matchms.importing.load_from_mgf.html
    query_spectrums = [spectrum_processing(s) for s in load_from_mgf("query_spectrums.mgf")]

    # Omit spectrums that didn't qualify for analysis
    query_spectrums = [s for s in query_spectrums if s is not None]

    # Import pre-trained word2vec model (see code example above)
    model_file = "references.model"
    model = gensim.models.Word2Vec.load(model_file)

    # Define similarity_function
    spec2vec_similarity = Spec2Vec(model=model, intensity_weighting_power=0.5,
                                   allowed_missing_percentage=5.0)

    # Calculate scores on all combinations of reference spectrums and queries
    scores = calculate_scores(reference_documents, query_spectrums, spec2vec_similarity)

    # Find the highest scores for a query spectrum of interest
    best_matches = scores.scores_by_query(query_documents[0], sort=True)[:10]

    # Return highest scores
    print([x[1] for x in best_matches])


Glossary of terms
=================

.. list-table::
   :header-rows: 1

   * - Term
     - Description
   * - adduct / addition product
     - During ionization in a mass spectrometer, the molecules of the injected compound break apart
       into fragments. When fragments combine into a new compound, this is known as an addition
       product, or adduct.  `Wikipedia <https://en.wikipedia.org/wiki/Adduct>`__
   * - GNPS
     - Knowledge base for sharing of mass spectrometry data (`link <https://gnps.ucsd.edu/ProteoSAFe/static/gnps-splash.jsp>`__).
   * - InChI / :code:`INCHI`
     - InChI is short for International Chemical Identifier. InChIs are useful
       in retrieving information associated with a certain molecule from a
       database.
   * - InChIKey / InChI key / :code:`INCHIKEY`
     - An indentifier for molecules. For example, the InChI key for carbon
       dioxide is :code:`InChIKey=CURLTUGMZLYLDI-UHFFFAOYSA-N` (yes, it
       includes the substring :code:`InChIKey=`).
   * - MGF File / Mascot Generic Format
     - A plan ASCII file format to store peak list data from a mass spectrometry experiment. Links: `matrixscience.com <http://www.matrixscience.com/help/data_file_help.html#GEN>`__,
       `fiehnlab.ucdavis.edu <https://fiehnlab.ucdavis.edu/projects/lipidblast/mgf-files>`__.
   * - parent mass / :code:`parent_mass`
     - Actual mass (in Dalton) of the original compound prior to fragmentation.
       It can be recalculated from the precursor m/z by taking
       into account the charge state and proton/electron masses.
   * - precursor m/z / :code:`precursor_mz`
     - Mass-to-charge ratio of the compound targeted for fragmentation.
   * - SMILES
     - A line notation for describing the structure of chemical species using
       short ASCII strings. For example, water is encoded as :code:`O[H]O`,
       carbon dioxide is encoded as :code:`O=C=O`, etc. SMILES-encoded species may be converted to InChIKey `using a resolver like this one <https://cactus.nci.nih.gov/chemical/structure>`__. The Wikipedia entry for SMILES is `here <https://en.wikipedia.org/wiki/Simplified_molecular-input_line-entry_system>`__.


****************************
Documentation for developers
****************************

Installation
============

To install spec2vec, do:

.. code-block:: console

  git clone https://github.com/iomega/spec2vec.git
  cd spec2vec
  conda env create --file conda/environment-dev.yml
  conda activate spec2vec-dev
  pip install --editable .

Run the linter with:

.. code-block:: console

  prospector

Run tests (including coverage) with:

.. code-block:: console

  pytest


Conda package
=============

The conda packaging is handled by a `recipe at Bioconda <https://github.com/bioconda/bioconda-recipes/blob/master/recipes/spec2vec/meta.yaml>`_.

Publishing to PyPI will trigger the creation of a `pull request on the bioconda recipes repository <https://github.com/bioconda/bioconda-recipes/pulls?q=is%3Apr+is%3Aopen+spec2vec>`_
Once the PR is merged the new version of matchms will appear on `https://anaconda.org/bioconda/spec2vec <https://anaconda.org/bioconda/spec2vec>`_ 


To remove spec2vec package from the active environment:

.. code-block:: console

  conda remove spec2vec


To remove spec2vec environment:

.. code-block:: console

  conda env remove --name spec2vec

Contributing
============

If you want to contribute to the development of spec2vec,
have a look at the `contribution guidelines <CONTRIBUTING.md>`_.

*******
License
*******

Copyright (c) 2020, Netherlands eScience Center

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*******
Credits
*******

This package was created with `Cookiecutter
<https://github.com/audreyr/cookiecutter>`_ and the `NLeSC/python-template
<https://github.com/NLeSC/python-template>`_.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/iomega/spec2vec",
    "name": "spec2vec",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "word2vec,mass spectrometry,fuzzy matching,fuzzy search",
    "author": "Netherlands eScience Center",
    "author_email": "generalization@esciencecenter.nl",
    "download_url": "https://files.pythonhosted.org/packages/8c/bd/5d2a9cf3a65271b2b3aedfe88d3017fd7f414fe6fadb4401c7ac1c6ce0f7/spec2vec-0.8.0.tar.gz",
    "platform": null,
    "description": "`fair-software.nl <https://fair-software.nl/>`_ recommendations:\n\n|GitHub Badge|\n|License Badge|\n|Conda Badge| |Pypi Badge| |Research Software Directory Badge|\n|Zenodo Badge|\n|CII Best Practices Badge| |Howfairis Badge|\n\nCode quality checks:\n\n|GitHub Workflow Status|\n|ReadTheDocs Badge|\n|Sonarcloud Quality Gate Badge| |Sonarcloud Coverage Badge|\n\n################################################################################\nspec2vec\n################################################################################\n**Spec2vec** is a novel spectral similarity score inspired by a natural language processing\nalgorithm -- Word2Vec. Where Word2Vec learns relationships between words in sentences,\n**spec2vec** does so for mass fragments and neutral losses in MS/MS spectra.\nThe spectral similarity score is based on spectral embeddings learnt\nfrom the fragmental relationships within a large set of spectral data. \n\nIf you use **spec2vec** for your research, please cite the following references:\n\nHuber F, Ridder L, Verhoeven S, Spaaks JH, Diblen F, Rogers S, van der Hooft JJJ, (2021) \"Spec2Vec: Improved mass spectral similarity scoring through learning of structural relationships\". PLoS Comput Biol 17(2): e1008724. `doi:10.1371/journal.pcbi.1008724 <https://doi.org/10.1371/journal.pcbi.1008724>`_\n\n(and if you use **matchms** as well:\nF. Huber, S. Verhoeven, C. Meijer, H. Spreeuw, E. M. Villanueva Castilla, C. Geng, J.J.J. van der Hooft, S. Rogers, A. Belloum, F. Diblen, J.H. Spaaks, (2020). \"matchms - processing and similarity evaluation of mass spectrometry data\". Journal of Open Source Software, 5(52), 2411, https://doi.org/10.21105/joss.02411 )\n\nThanks!\n\n\n\n.. |GitHub Badge| image:: https://img.shields.io/badge/github-repo-000.svg?logo=github&labelColor=gray&color=blue\n   :target: https://github.com/iomega/spec2vec\n   :alt: GitHub Badge\n\n.. |License Badge| image:: https://img.shields.io/github/license/iomega/spec2vec\n   :target: https://github.com/iomega/spec2vec\n   :alt: License Badge\n\n.. |Conda Badge| image:: https://img.shields.io/conda/v/bioconda/spec2vec?color=blue\n   :target: https://bioconda.github.io/recipes/spec2vec/README.html\n   :alt: Conda Badge (Bioconda)\n\n.. |Pypi Badge| image:: https://img.shields.io/pypi/v/spec2vec?color=blue\n   :target: https://pypi.org/project/spec2vec/\n   :alt: spec2vec on PyPI\n\n.. |Research Software Directory Badge| image:: https://img.shields.io/badge/rsd-spec2vec-00a3e3.svg\n   :target: https://www.research-software.nl/software/spec2vec\n   :alt: Research Software Directory Badge\n\n.. |Zenodo Badge| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3873169.svg\n   :target: https://doi.org/10.5281/zenodo.3873169\n   :alt: Zenodo Badge\n\n.. |CII Best Practices Badge| image:: https://bestpractices.coreinfrastructure.org/projects/3967/badge\n   :target: https://bestpractices.coreinfrastructure.org/projects/3967\n   :alt: CII Best Practices Badge\n\n.. |Howfairis Badge| image:: https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F-green\n   :target: https://fair-software.eu\n   :alt: Howfairis Badge\n\n.. |ReadTheDocs Badge| image:: https://readthedocs.org/projects/spec2vec/badge/?version=latest\n    :alt: Documentation Status\n    :scale: 100%\n    :target: https://spec2vec.readthedocs.io/en/latest/?badge=latest\n\n.. |Sonarcloud Quality Gate Badge| image:: https://sonarcloud.io/api/project_badges/measure?project=iomega_spec2vec&metric=alert_status\n   :target: https://sonarcloud.io/dashboard?id=iomega_spec2vec\n   :alt: Sonarcloud Quality Gate\n\n.. |Sonarcloud Coverage Badge| image:: https://sonarcloud.io/api/project_badges/measure?project=iomega_spec2vec&metric=coverage\n   :target: https://sonarcloud.io/component_measures?id=iomega_spec2vec&metric=Coverage&view=list\n   :alt: Sonarcloud Coverage\n\n.. |GitHub Workflow Status| image:: https://img.shields.io/github/actions/workflow/status/matchms/spec2vec/CI_build.yml?branch=master\n   :target: https://img.shields.io/github/workflow/status/iomega/spec2vec/CI%20Build\n   :alt: GitHub Workflow Status\n\n\n***********************\nDocumentation for users\n***********************\nFor more extensive documentation `see our readthedocs <https://spec2vec.readthedocs.io/en/latest/>`_ or get started with our `spec2vec introduction tutorial <https://blog.esciencecenter.nl/build-a-mass-spectrometry-analysis-pipeline-in-python-using-matchms-part-ii-spec2vec-8aa639571018>`_.\n\nVersions\n========\nSince version `0.5.0` Spec2Vec uses `gensim >= 4.0.0` which should make it faster and more future proof. Model trained with older versions should still be importable without any issues. If you had scripts that used additional gensim code, however, those might occationally need some adaptation, see also the `gensim documentation on how to migrate your code <https://github.com/RaRe-Technologies/gensim/wiki/Migrating-from-Gensim-3.x-to-4>`_.\n\n\nInstallation\n============\n\n\nPrerequisites:  \n\n- Python 3.7, 3.8, or 3.9  \n- Recommended: Anaconda\n\nWe recommend installing spec2vec from Anaconda Cloud with\n\n.. code-block:: console\n\n  conda create --name spec2vec python=3.8\n  conda activate spec2vec\n  conda install --channel bioconda --channel conda-forge spec2vec\n\nAlternatively, spec2vec can also be installed using ``pip``. When using spec2vec together with ``matchms`` it is important to note that only the Anaconda install will make sure that also ``rdkit`` is installed properly, which is requried for a few matchms filter functions (it is not required for any spec2vec related functionalities though).\n\n.. code-block:: console\n\n  pip install spec2vec\n\nExamples\n========\nBelow a code example of how to process a large data set of reference spectra to\ntrain a word2vec model from scratch. Spectra are converted to documents using ``SpectrumDocument`` which converts spectrum peaks into \"words\" according to their m/z ratio (for instance \"peak@100.39\"). A new word2vec model can then trained using ``train_new_word2vec_model`` which will set the training parameters to spec2vec defaults unless specified otherwise. Word2Vec models learn from co-occurences of peaks (\"words\") across many different spectra.\nTo get a model that can give a meaningful representation of a set of\ngiven spectra it is desirable to train the model on a large and representative\ndataset.\n\n.. code-block:: python\n\n    import os\n    import matchms.filtering as msfilters\n    from matchms.importing import load_from_mgf\n    from spec2vec import SpectrumDocument\n    from spec2vec.model_building import train_new_word2vec_model\n\n    def spectrum_processing(s):\n        \"\"\"This is how one would typically design a desired pre- and post-\n        processing pipeline.\"\"\"\n        s = msfilters.default_filters(s)\n        s = msfilters.add_parent_mass(s)\n        s = msfilters.normalize_intensities(s)\n        s = msfilters.reduce_to_number_of_peaks(s, n_required=10, ratio_desired=0.5, n_max=500)\n        s = msfilters.select_by_mz(s, mz_from=0, mz_to=1000)\n        s = msfilters.add_losses(s, loss_mz_from=10.0, loss_mz_to=200.0)\n        s = msfilters.require_minimum_number_of_peaks(s, n_required=10)\n        return s\n\n    # Load data from MGF file and apply filters\n    spectrums = [spectrum_processing(s) for s in load_from_mgf(\"reference_spectrums.mgf\")]\n\n    # Omit spectrums that didn't qualify for analysis\n    spectrums = [s for s in spectrums if s is not None]\n\n    # Create spectrum documents\n    reference_documents = [SpectrumDocument(s, n_decimals=2) for s in spectrums]\n\n    model_file = \"references.model\"\n    model = train_new_word2vec_model(reference_documents, iterations=[10, 20, 30], filename=model_file,\n                                     workers=2, progress_logger=True)\n\nOnce a word2vec model has been trained, spec2vec allows to calculate the similarities\nbetween mass spectrums based on this model. In cases where the word2vec model was\ntrained on data different than the data it is applied for, a number of peaks (\"words\")\nmight be unknown to the model (if they weren't part of the training dataset). To\naccount for those cases it is important to specify the ``allowed_missing_percentage``,\nas in the example below.\n\n.. code-block:: python\n\n    import gensim\n    from matchms import calculate_scores\n    from spec2vec import Spec2Vec\n\n    # query_spectrums loaded from files using https://matchms.readthedocs.io/en/latest/api/matchms.importing.load_from_mgf.html\n    query_spectrums = [spectrum_processing(s) for s in load_from_mgf(\"query_spectrums.mgf\")]\n\n    # Omit spectrums that didn't qualify for analysis\n    query_spectrums = [s for s in query_spectrums if s is not None]\n\n    # Import pre-trained word2vec model (see code example above)\n    model_file = \"references.model\"\n    model = gensim.models.Word2Vec.load(model_file)\n\n    # Define similarity_function\n    spec2vec_similarity = Spec2Vec(model=model, intensity_weighting_power=0.5,\n                                   allowed_missing_percentage=5.0)\n\n    # Calculate scores on all combinations of reference spectrums and queries\n    scores = calculate_scores(reference_documents, query_spectrums, spec2vec_similarity)\n\n    # Find the highest scores for a query spectrum of interest\n    best_matches = scores.scores_by_query(query_documents[0], sort=True)[:10]\n\n    # Return highest scores\n    print([x[1] for x in best_matches])\n\n\nGlossary of terms\n=================\n\n.. list-table::\n   :header-rows: 1\n\n   * - Term\n     - Description\n   * - adduct / addition product\n     - During ionization in a mass spectrometer, the molecules of the injected compound break apart\n       into fragments. When fragments combine into a new compound, this is known as an addition\n       product, or adduct.  `Wikipedia <https://en.wikipedia.org/wiki/Adduct>`__\n   * - GNPS\n     - Knowledge base for sharing of mass spectrometry data (`link <https://gnps.ucsd.edu/ProteoSAFe/static/gnps-splash.jsp>`__).\n   * - InChI / :code:`INCHI`\n     - InChI is short for International Chemical Identifier. InChIs are useful\n       in retrieving information associated with a certain molecule from a\n       database.\n   * - InChIKey / InChI key / :code:`INCHIKEY`\n     - An indentifier for molecules. For example, the InChI key for carbon\n       dioxide is :code:`InChIKey=CURLTUGMZLYLDI-UHFFFAOYSA-N` (yes, it\n       includes the substring :code:`InChIKey=`).\n   * - MGF File / Mascot Generic Format\n     - A plan ASCII file format to store peak list data from a mass spectrometry experiment. Links: `matrixscience.com <http://www.matrixscience.com/help/data_file_help.html#GEN>`__,\n       `fiehnlab.ucdavis.edu <https://fiehnlab.ucdavis.edu/projects/lipidblast/mgf-files>`__.\n   * - parent mass / :code:`parent_mass`\n     - Actual mass (in Dalton) of the original compound prior to fragmentation.\n       It can be recalculated from the precursor m/z by taking\n       into account the charge state and proton/electron masses.\n   * - precursor m/z / :code:`precursor_mz`\n     - Mass-to-charge ratio of the compound targeted for fragmentation.\n   * - SMILES\n     - A line notation for describing the structure of chemical species using\n       short ASCII strings. For example, water is encoded as :code:`O[H]O`,\n       carbon dioxide is encoded as :code:`O=C=O`, etc. SMILES-encoded species may be converted to InChIKey `using a resolver like this one <https://cactus.nci.nih.gov/chemical/structure>`__. The Wikipedia entry for SMILES is `here <https://en.wikipedia.org/wiki/Simplified_molecular-input_line-entry_system>`__.\n\n\n****************************\nDocumentation for developers\n****************************\n\nInstallation\n============\n\nTo install spec2vec, do:\n\n.. code-block:: console\n\n  git clone https://github.com/iomega/spec2vec.git\n  cd spec2vec\n  conda env create --file conda/environment-dev.yml\n  conda activate spec2vec-dev\n  pip install --editable .\n\nRun the linter with:\n\n.. code-block:: console\n\n  prospector\n\nRun tests (including coverage) with:\n\n.. code-block:: console\n\n  pytest\n\n\nConda package\n=============\n\nThe conda packaging is handled by a `recipe at Bioconda <https://github.com/bioconda/bioconda-recipes/blob/master/recipes/spec2vec/meta.yaml>`_.\n\nPublishing to PyPI will trigger the creation of a `pull request on the bioconda recipes repository <https://github.com/bioconda/bioconda-recipes/pulls?q=is%3Apr+is%3Aopen+spec2vec>`_\nOnce the PR is merged the new version of matchms will appear on `https://anaconda.org/bioconda/spec2vec <https://anaconda.org/bioconda/spec2vec>`_ \n\n\nTo remove spec2vec package from the active environment:\n\n.. code-block:: console\n\n  conda remove spec2vec\n\n\nTo remove spec2vec environment:\n\n.. code-block:: console\n\n  conda env remove --name spec2vec\n\nContributing\n============\n\nIf you want to contribute to the development of spec2vec,\nhave a look at the `contribution guidelines <CONTRIBUTING.md>`_.\n\n*******\nLicense\n*******\n\nCopyright (c) 2020, Netherlands eScience Center\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*******\nCredits\n*******\n\nThis package was created with `Cookiecutter\n<https://github.com/audreyr/cookiecutter>`_ and the `NLeSC/python-template\n<https://github.com/NLeSC/python-template>`_.\n\n\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Word2Vec based similarity measure of mass spectrometry data.",
    "version": "0.8.0",
    "split_keywords": [
        "word2vec",
        "mass spectrometry",
        "fuzzy matching",
        "fuzzy search"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3edab207385bd866a2f826e888d903ead9781c2f7814e3d53225afe03371007b",
                "md5": "5d1b70277f92e54931870c97854317c3",
                "sha256": "2f17d53522bdb3b354fa10e62612b66705ea947031cdc8549f449f04bb7641d5"
            },
            "downloads": -1,
            "filename": "spec2vec-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5d1b70277f92e54931870c97854317c3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 34951,
            "upload_time": "2023-01-19T09:19:01",
            "upload_time_iso_8601": "2023-01-19T09:19:01.421190Z",
            "url": "https://files.pythonhosted.org/packages/3e/da/b207385bd866a2f826e888d903ead9781c2f7814e3d53225afe03371007b/spec2vec-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8cbd5d2a9cf3a65271b2b3aedfe88d3017fd7f414fe6fadb4401c7ac1c6ce0f7",
                "md5": "0499fdb71087b241ee63a246cffc98ba",
                "sha256": "0a5a4c3d79dcc4e2b22ad44bc04a67aee1f7789e42f1f0143c9a7ffef54ce5b0"
            },
            "downloads": -1,
            "filename": "spec2vec-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0499fdb71087b241ee63a246cffc98ba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 33255,
            "upload_time": "2023-01-19T09:19:03",
            "upload_time_iso_8601": "2023-01-19T09:19:03.232583Z",
            "url": "https://files.pythonhosted.org/packages/8c/bd/5d2a9cf3a65271b2b3aedfe88d3017fd7f414fe6fadb4401c7ac1c6ce0f7/spec2vec-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-19 09:19:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "iomega",
    "github_project": "spec2vec",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "spec2vec"
}
        
Elapsed time: 0.06098s