Metadata-Version: 2.1
Name: pyms-nist-search
Version: 0.3.1
Summary: PyMassSpec extension for searching mass spectra using NIST's Spectrum Search Engine
Home-page: https://github.com/domdfcoding/pyms_nist_search
Author: Dominic Davis-Foster
Author-email: dominic@davis-foster.co.uk
License: LGPLv3
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Operating System :: Microsoft :: Windows :: Windows 7
Classifier: Operating System :: Microsoft :: Windows :: Windows 8.1
Classifier: Operating System :: POSIX :: Linux
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Programming Language :: C
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: PyMassSpec (>=2.2.10)
Requires-Dist: chemistry-tools (>=0.2.5)
Requires-Dist: docker (>=4.2.0)
Requires-Dist: requests (>=2.22.0)

************************
PyMassSpec NIST Search
************************

.. image:: https://travis-ci.com/domdfcoding/pynist.svg?branch=master
	:target: https://travis-ci.com/domdfcoding/pynist
	:alt: Build Status
.. image:: https://ci.appveyor.com/api/projects/status/82cs9prucypd1igb?svg=true
	:target: https://ci.appveyor.com/project/domdfcoding/pyms-nist-search/branch/master
	:alt: AppVeyor
.. image:: https://readthedocs.org/projects/pymassspec/badge/?version=latest
	:target: https://pymassspec.readthedocs.io/en/latest/?badge=latest
	:alt: Documentation Status
.. image:: https://img.shields.io/pypi/v/pyms_nist_search.svg
	:target: https://pypi.org/project/pyms_nist_search/
	:alt: PyPI
.. image:: https://img.shields.io/pypi/pyversions/pyms_nist_search.svg
	:target: https://pypi.org/project/pyms_nist_search/
	:alt: PyPI - Python Version



PyMassSpec extension for searching mass spectra using NIST's Spectrum Search Engine


Usage
########

You will need to supply your own copy of the NIST Mass Spectral library to use this software.

The main class in this library is the `Engine` class. This class performs the actual searching. Start by initialising the search engine as follows:

.. code-block:: python

	search = pyms_nist_search.Engine(
			FULL_PATH_TO_MAIN_LIBRARY,
			pyms_nist_search.NISTMS_MAIN_LIB,
			FULL_PATH_TO_WORK_DIR,
			)

Where ``FULL_PATH_TO_MAIN_LIBRARY`` is the path to the location of your mass spectral library, and ``FULL_PATH_TO_WORK_DIR`` is the path to the working directory to be used by the search engine.

A `MassSpectrum` object can then be searched as follows:

.. code-block:: python

	search.full_search_with_ref_data(mass_spec)

This will return a list of tuples consisting of `SearchResult` and `ReferenceData` objects for the possible identities of the mass spectrum.

A list of just the `SearchResult` objects can be obtained with this method:

.. code-block:: python

	hit_list = search.full_search(mass_spec)

For each of these hits, the reference data can be obtained as follows:

.. code-block:: python

	for hit in hit_list:
		ref_data = search.get_reference_data(hit.spec_loc)



