From a9928216b702a1088749bbd2ab8844ee3858f574 Mon Sep 17 00:00:00 2001 From: victorgiurcoiu Date: Thu, 6 Jul 2023 19:50:14 +0200 Subject: [PATCH 01/31] Modified documentation using scanpydoc --- ReadMe.md | 10 + docs/{modules.rst => API.rst} | 4 +- docs/_key_contributors.rst | 14 ++ docs/conf.py | 337 ++++++++++++++-------------------- docs/contributors.md | 5 + docs/index.rst | 58 ++++-- docs/reference.rst | 16 +- 7 files changed, 220 insertions(+), 224 deletions(-) rename docs/{modules.rst => API.rst} (85%) create mode 100644 docs/_key_contributors.rst create mode 100644 docs/contributors.md diff --git a/ReadMe.md b/ReadMe.md index 3bda384..429aed4 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,3 +1,13 @@ +[![PyPI](https://img.shields.io/pypi/v/oktoberfest.svg)](https://pypi.org/project/oktoberfest/) +[![Python Version](https://img.shields.io/pypi/pyversions/oktoberfest)](https://pypi.org/project/oktoberfest) +[![License](https://img.shields.io/github/license/wilhelm-lab/oktoberfest)](https://opensource.org/licenses/MIT) +[![Read the Docs](https://img.shields.io/readthedocs/oktoberfest/latest.svg?label=Read%20the%20Docs)](https://oktoberfest.readthedocs.io/) +[![Build](https://github.com/wilhelm-lab/oktoberfest/workflows/Build%20oktoberfest%20Package/badge.svg)](https://github.com/wilhelm-lab/oktoberfest/actions?workflow=Package) +[![Tests](https://github.com/wilhelm-lab/oktoberfest/workflows/Run%20oktoberfest%20Tests/badge.svg)](https://github.com/wilhelm-lab/oktoberfest/actions?workflow=Tests) +[![Codecov](https://codecov.io/gh/wilhelm-lab/oktoberfest/branch/main/graph/badge.svg)](https://codecov.io/gh/wilhelm-lab/oktoberfest) +[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) +[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) + # Spectrum IO Spectrum IO is a package primarily developed for usage within oktoberfest (https://github.com/wilhelm-lab/oktoberfest). It handles file conversions and input / output operations for oktoberfest. diff --git a/docs/modules.rst b/docs/API.rst similarity index 85% rename from docs/modules.rst rename to docs/API.rst index 6141f96..949f087 100644 --- a/docs/modules.rst +++ b/docs/API.rst @@ -1,5 +1,5 @@ -spectrum_io -=========== +API +=== .. toctree:: :maxdepth: 4 diff --git a/docs/_key_contributors.rst b/docs/_key_contributors.rst new file mode 100644 index 0000000..0722a05 --- /dev/null +++ b/docs/_key_contributors.rst @@ -0,0 +1,14 @@ +.. sidebar:: Key Contributors + + * `Mario Picciani `_: lead developer + * `Wassim Gabriel `_: developer + * `Matthew The `_: developer + * `Victor-George Giurcoiu `_: developer + * `Omar Shouman `_: developer + * Firas Hamood: developer + * `Ludwig Lautenbacher `_: developer + * Cecilia Jensen: developer + * Julian Mueller: developer + * `Mostafa Kalhor `_: developer + * `Armin Soleymaniniya `_: developer + * `Mathias Wilhelm `_: advisor and PI of wilhelmlab \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index fef6748..10c9d28 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,233 +1,172 @@ -#!/usr/bin/env python -# mypy: ignore-errors -# spectrum_io documentation build configuration file -# -# If extensions (or modules to document with autodoc) are in another -# directory, add these directories to sys.path here. If the directory is -# relative to the documentation root, use os.path.abspath to make it -# absolute, like shown here. -# -import importlib -import inspect import os -import re -import subprocess import sys -from typing import Any +from datetime import datetime +from pathlib import Path -sys.path.insert(0, os.path.abspath("..")) +import matplotlib # noqa +# Don’t use tkinter agg when importing scanpy → … → matplotlib +matplotlib.use("agg") -# -- General configuration --------------------------------------------- +HERE = Path(__file__).parent +sys.path[:0] = [str(HERE.parent), str(HERE / "extensions")] -# If your documentation needs a minimal Sphinx version, state it here. -# needs_sphinx = '1.0' +on_rtd = os.environ.get("READTHEDOCS") == "True" -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +# -- General configuration ------------------------------------------------ -# Add 'sphinx_automodapi.automodapi' if you want to build modules -extensions = [ - "sphinx.ext.autodoc", - "sphinx.ext.napoleon", - "sphinx.ext.linkcode", - "sphinx_click", -] -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] +nitpicky = True # Warn about broken links. This is here for a reason: Do not change. +needs_sphinx = "2.0" # Nicer param docs +suppress_warnings = [ + "ref.citation", + "myst.header", # https://github.com/executablebooks/MyST-Parser/issues/262 +] -# The suffix(es) of source filenames. -source_suffix = ".rst" +# General information +project = "Spectrum IO" +author = "Oktoberfest development team" +copyright = f"{datetime.now():%Y}, Wilhelmlab" -# The master toctree document. +# default settings +templates_path = ["_templates"] master_doc = "index" - -# General information about the project. -project = "spectrum_io" -copyright = "2022, Mario Picciani" -author = "Mario Picciani" - -# The version info for the project you're documenting, acts as replacement -# for |version| and |release|, also used in various other places throughout -# the built documents. -# -# The short X.Y version. -version = "0.3.0" -# The full version, including alpha/beta/rc tags. -release = "0.3.0" - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path +default_role = "literal" exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] - -# The name of the Pygments (syntax highlighting) style to use. pygments_style = "sphinx" -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = "sphinx_rtd_theme" - -# Theme options are theme-specific and customize the look and feel of a -# theme further. For a list of options available for each theme, see the -# documentation. -# -# html_theme_options = {} - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] - - -# -- Options for HTMLHelp output --------------------------------------- - -# Output file base name for HTML help builder. -htmlhelp_basename = "spectrum_iodoc" - - -# -- Options for LaTeX output ------------------------------------------ - -latex_elements = { - # The paper size ("letterpaper" or "a4paper"). - # - # "papersize": "letterpaper", - # The font size ("10pt", "11pt" or "12pt"). - # - # "pointsize": "10pt", - # Additional stuff for the LaTeX preamble. - # - # "preamble": "", - # Latex figure (float) alignment - # - # "figure_align": "htbp", -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass -# [howto, manual, or own class]). -latex_documents = [ - ( - master_doc, - "spectrum_io.tex", - "spectrum_io Documentation", - "Mario Picciani", - "manual", - ), +extensions = [ + "myst_parser", + "sphinx.ext.autodoc", + "sphinx.ext.intersphinx", + "sphinx.ext.doctest", + "sphinx.ext.coverage", + "sphinx.ext.mathjax", + "sphinx.ext.napoleon", + "sphinx.ext.autosummary", + # 'plot_generator', + "matplotlib.sphinxext.plot_directive", + "sphinx_autodoc_typehints", # needs to be after napoleon + # 'ipython_directive', + # 'ipython_console_highlighting', + # 'scanpydoc', # scanpydoc.elegant_typehints causes full doc rebuilds + "scanpydoc.rtd_github_links", + "scanpydoc.theme", + "scanpydoc.definition_list_typed_field", + "scanpydoc.autosummary_generate_imported", ] +# Generate the API documentation when building +autosummary_generate = True +autodoc_member_order = "bysource" +# autodoc_default_flags = ['members'] +napoleon_google_docstring = False +napoleon_numpy_docstring = True +napoleon_include_init_with_doc = False +napoleon_use_rtype = True # having a separate entry generally helps readability +napoleon_use_param = True +napoleon_custom_sections = [("Params", "Parameters")] +todo_include_todos = False +api_dir = HERE / "api" # function_images + +typehints_defaults = "braces" + +scanpy_tutorials_url = "https://scanpy-tutorials.readthedocs.io/en/latest/" + +intersphinx_mapping = dict( + anndata=("https://anndata.readthedocs.io/en/stable/", None), + bbknn=("https://bbknn.readthedocs.io/en/latest/", None), + cycler=("https://matplotlib.org/cycler/", None), + h5py=("https://docs.h5py.org/en/stable/", None), + ipython=("https://ipython.readthedocs.io/en/stable/", None), + leidenalg=("https://leidenalg.readthedocs.io/en/latest/", None), + louvain=("https://louvain-igraph.readthedocs.io/en/latest/", None), + matplotlib=("https://matplotlib.org/stable/", None), + networkx=("https://networkx.org/documentation/stable/", None), + numpy=("https://numpy.org/doc/stable/", None), + pandas=("https://pandas.pydata.org/pandas-docs/stable/", None), + pytest=("https://docs.pytest.org/en/latest/", None), + python=("https://docs.python.org/3", None), + scipy=("https://docs.scipy.org/doc/scipy/", None), + seaborn=("https://seaborn.pydata.org/", None), + sklearn=("https://scikit-learn.org/stable/", None), + scanpy_tutorials=(scanpy_tutorials_url, None), +) + + +# -- Options for HTML output ---------------------------------------------- + + +html_theme = "scanpydoc" +html_theme_options = dict( + navigation_depth=4, + logo_only=True, + docsearch_index="scanpy", + docsearch_key="fa4304eb95d2134997e3729553a674b2", +) +html_context = { + "display_github": True, # Integrate GitHub + "github_user": "wilhelm-lab", # Username + "github_repo": "spectrum_io", # Repo name + "github_version": "development", # Version + "conf_py_path": "/docs/", # Path in the checkout to the docs root + "github_url": "https://github.com/wilhelm-lab/spectrum_io/", +} -# -- Options for manual page output ------------------------------------ - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ( - master_doc, - "spectrum_io", - "spectrum_io Documentation", - [author], - 1, - ) -] - -autodoc_typehints = "description" +repository_url = "https://github.com/wilhelm-lab/spectrum_io/" +html_static_path = ["_static"] +html_show_sphinx = False -# -- Options for Texinfo output ---------------------------------------- +# -- Options for other output formats ------------------------------------------ -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) +htmlhelp_basename = f"{project}doc" +doc_title = f"{project} Documentation" +latex_documents = [(master_doc, f"{project}.tex", doc_title, author, "manual")] +man_pages = [(master_doc, project, doc_title, [author], 1)] texinfo_documents = [ ( master_doc, - "spectrum_io", - "spectrum_io Documentation", + project, + doc_title, author, - "spectrum_io", + project, "One line description of project.", "Miscellaneous", - ), + ) ] -html_css_files = [ - "custom_cookietemple.css", -] - -html_context = { - "display_github": True, # Integrate GitHub - "github_user": "wilhelm-lab", # Username - "github_repo": "spectrum_io", # Repo name - "github_version": "main", # Version - "conf_py_path": "/spectrum_io/", # Path in the checkout to the docs root - "github_url": "https://github.com/wilhelm-lab/spectrum_io/", -} - -repository_url = "https://github.com/wilhelm-lab/spectrum_io" - -# Linkcode config - - -def git(*args): - """Gets git linkcode.""" - return subprocess.check_output(["git", *args]).strip().decode() +# -- Suppress link warnings ---------------------------------------------------- -# https://github.com/DisnakeDev/disnake/blob/7853da70b13fcd2978c39c0b7efa59b34d298186/docs/conf.py#L192 -# Current git reference. Uses branch/tag name if found, otherwise uses commit hash -git_ref = None -try: - git_ref = git("name-rev", "--name-only", "--no-undefined", "HEAD") - git_ref = re.sub(r"^(remotes/[^/]+|tags)/", "", git_ref) -except Exception: - print() - -# (if no name found or relative ref, use commit hash instead) -if not git_ref or re.search(r"[\^~]", git_ref): - try: - git_ref = git("rev-parse", "HEAD") - except Exception: - git_ref = "main" - -# https://github.com/DisnakeDev/disnake/blob/7853da70b13fcd2978c39c0b7efa59b34d298186/docs/conf.py#L192 -_module_path = os.path.dirname(importlib.util.find_spec("spectrum_io").origin) # type: ignore - - -def linkcode_resolve(domain, info): - """Resolves linkcode.""" - if domain != "py": - return None - - try: - obj: Any = sys.modules[info["module"]] - for part in info["fullname"].split("."): - obj = getattr(obj, part) - obj = inspect.unwrap(obj) +qualname_overrides = { + "sklearn.neighbors._dist_metrics.DistanceMetric": "sklearn.neighbors.DistanceMetric", + # If the docs are built with an old version of numpy, this will make it work: + "numpy.random.RandomState": "numpy.random.mtrand.RandomState", + "scanpy.plotting._matrixplot.MatrixPlot": "scanpy.pl.MatrixPlot", + "scanpy.plotting._dotplot.DotPlot": "scanpy.pl.DotPlot", + "scanpy.plotting._stacked_violin.StackedViolin": "scanpy.pl.StackedViolin", + "pandas.core.series.Series": "pandas.Series", +} - if isinstance(obj, property): - obj = inspect.unwrap(obj.fget) # type: ignore +nitpick_ignore = [ + # Will probably be documented + ("py:class", "scanpy._settings.Verbosity"), + # Currently undocumented: https://github.com/mwaskom/seaborn/issues/1810 + ("py:class", "seaborn.ClusterGrid"), + # Won’t be documented + ("py:class", "scanpy.plotting._utils._AxesSubplot"), + ("py:class", "scanpy._utils.Empty"), + ("py:class", "numpy.random.mtrand.RandomState"), + # Will work once scipy 1.8 is released + ("py:class", "scipy.sparse.base.spmatrix"), + ("py:class", "scipy.sparse.csr.csr_matrix"), +] - path = os.path.relpath(inspect.getsourcefile(obj), start=_module_path) # type: ignore - src, lineno = inspect.getsourcelines(obj) - except Exception: - return None +# Options for plot examples - path = f"{path}#L{lineno}-L{lineno + len(src) - 1}" - git_ref = "development" - return f"{repository_url}/blob/{git_ref}/spectrum_io/{path}" +plot_include_source = True +plot_formats = [("png", 90)] +plot_html_show_formats = False +plot_html_show_source_link = False +plot_working_directory = HERE.parent # Project root diff --git a/docs/contributors.md b/docs/contributors.md new file mode 100644 index 0000000..60c1fe3 --- /dev/null +++ b/docs/contributors.md @@ -0,0 +1,5 @@ +# Contributors + +```{eval-rst} +.. include:: _key_contributors.rst +``` diff --git a/docs/index.rst b/docs/index.rst index 152462d..a5d88a9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,23 +1,51 @@ -.. include:: ../README.rst -=========================== -Welcome to spectrum_io's documentation! -========================================================== +.. include:: _key_contributors.rst + +.. role:: small + +.. role:: smaller + +|PyPI| |Python Version| |License| |Read the Docs| |Build| |Tests| |Codecov| |pre-commit| |Black| + +.. |PyPI| image:: https://img.shields.io/pypi/v/oktoberfest.svg + :target: https://pypi.org/project/oktoberfest/ + :alt: PyPI +.. |Python Version| image:: https://img.shields.io/pypi/pyversions/oktoberfest + :target: https://pypi.org/project/oktoberfest + :alt: Python Version +.. |License| image:: https://img.shields.io/github/license/wilhelm-lab/oktoberfest + :target: https://opensource.org/licenses/MIT + :alt: License +.. |Read the Docs| image:: https://img.shields.io/readthedocs/oktoberfest/latest.svg?label=Read%20the%20Docs + :target: https://oktoberfest.readthedocs.io/ + :alt: Read the documentation at https://oktoberfest.readthedocs.io/ +.. |Build| image:: https://github.com/wilhelm-lab/oktoberfest/workflows/Build%20oktoberfest%20Package/badge.svg + :target: https://github.com/wilhelm-lab/oktoberfest/actions?workflow=Package + :alt: Build Package Status +.. |Tests| image:: https://github.com/wilhelm-lab/oktoberfest/workflows/Run%20oktoberfest%20Tests/badge.svg + :target: https://github.com/wilhelm-lab/oktoberfest/actions?workflow=Tests + :alt: Run Tests Status +.. |Codecov| image:: https://codecov.io/gh/wilhelm-lab/oktoberfest/branch/main/graph/badge.svg + :target: https://codecov.io/gh/wilhelm-lab/oktoberfest + :alt: Codecov +.. |pre-commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white + :target: https://github.com/pre-commit/pre-commit + :alt: pre-commit +.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg + :target: https://github.com/psf/black + :alt: Black + +Spectrum IO +=========== + +Spectrum IO is a package primarily developed for usage within oktoberfest (https://github.com/wilhelm-lab/oktoberfest). It handles file conversions and input / output operations for oktoberfest. .. toctree:: :maxdepth: 2 :caption: Contents: - readme installation usage - modules - reference + API contributing - authors - code_of_conduct - -Indices and tables -================== -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` + contributors + reference diff --git a/docs/reference.rst b/docs/reference.rst index b540093..91eff79 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -1,10 +1,10 @@ -Reference -========= +References +========== -.. contents:: - :local: - :backlinks: none +.. [Prosit] Gessulat S, Schmidt T, Zolg DP, Samaras P, Schnatbaum K, Zerweck J, Knaute T, Rechenberger J, Delanghe B, Huhmer A, Reimer U, Ehrlich HC, Aiche S, Kuster B, Wilhelm M (2019), + *TriMap: PROSIT: Proteome-wide prediction of peptide tandem mass spectra by deep learning*, + `Nature Methods `__. - -.. automodule:: spectrum_io.__main__ - :members: +.. [Prosit-TMT] Gabriel W, The M, Zolg D, Bayer FP, Shouman O, Lautenbacher L, Schnatbaum K, Zerweck J, Knaute T, Delanghe B, Huhmer A, Wenschuh H, Reimer U, Médard G, Kuster B, Wilhelm M (2022), + *TriMap: Prosit-TMT: Deep Learning Boosts Identification of TMT-Labeled Peptides*, + `Analytical Chemistry `__. From e2358343682f5de26f193f02b538146b92fb53b9 Mon Sep 17 00:00:00 2001 From: victorgiurcoiu Date: Tue, 11 Jul 2023 10:20:13 +0200 Subject: [PATCH 02/31] Simplified conf.py, fixed index.rst --- README.rst | 9 +++------ docs/conf.py | 37 +------------------------------------ docs/index.rst | 38 +++----------------------------------- 3 files changed, 7 insertions(+), 77 deletions(-) diff --git a/README.rst b/README.rst index 3587c4d..e8157f7 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,3 @@ -spectrum_io -=========================== - |PyPI| |Python Version| |License| |Read the Docs| |Build| |Tests| |Codecov| |pre-commit| |Black| .. |PyPI| image:: https://img.shields.io/pypi/v/spectrum_io.svg @@ -32,10 +29,10 @@ spectrum_io :alt: Black -Features --------- +Spectrum IO +=========== -* TODO +Spectrum IO is a package primarily developed for usage within oktoberfest (https://github.com/wilhelm-lab/oktoberfest). It handles file conversions and input / output operations for oktoberfest. Installation diff --git a/docs/conf.py b/docs/conf.py index 10c9d28..aee0e0c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -42,11 +42,10 @@ "sphinx.ext.doctest", "sphinx.ext.coverage", "sphinx.ext.mathjax", - "sphinx.ext.napoleon", "sphinx.ext.autosummary", # 'plot_generator', "matplotlib.sphinxext.plot_directive", - "sphinx_autodoc_typehints", # needs to be after napoleon + "sphinx_autodoc_typehints", # 'ipython_directive', # 'ipython_console_highlighting', # 'scanpydoc', # scanpydoc.elegant_typehints causes full doc rebuilds @@ -60,43 +59,12 @@ autosummary_generate = True autodoc_member_order = "bysource" # autodoc_default_flags = ['members'] -napoleon_google_docstring = False -napoleon_numpy_docstring = True -napoleon_include_init_with_doc = False -napoleon_use_rtype = True # having a separate entry generally helps readability -napoleon_use_param = True -napoleon_custom_sections = [("Params", "Parameters")] todo_include_todos = False api_dir = HERE / "api" # function_images typehints_defaults = "braces" -scanpy_tutorials_url = "https://scanpy-tutorials.readthedocs.io/en/latest/" - -intersphinx_mapping = dict( - anndata=("https://anndata.readthedocs.io/en/stable/", None), - bbknn=("https://bbknn.readthedocs.io/en/latest/", None), - cycler=("https://matplotlib.org/cycler/", None), - h5py=("https://docs.h5py.org/en/stable/", None), - ipython=("https://ipython.readthedocs.io/en/stable/", None), - leidenalg=("https://leidenalg.readthedocs.io/en/latest/", None), - louvain=("https://louvain-igraph.readthedocs.io/en/latest/", None), - matplotlib=("https://matplotlib.org/stable/", None), - networkx=("https://networkx.org/documentation/stable/", None), - numpy=("https://numpy.org/doc/stable/", None), - pandas=("https://pandas.pydata.org/pandas-docs/stable/", None), - pytest=("https://docs.pytest.org/en/latest/", None), - python=("https://docs.python.org/3", None), - scipy=("https://docs.scipy.org/doc/scipy/", None), - seaborn=("https://seaborn.pydata.org/", None), - sklearn=("https://scikit-learn.org/stable/", None), - scanpy_tutorials=(scanpy_tutorials_url, None), -) - - # -- Options for HTML output ---------------------------------------------- - - html_theme = "scanpydoc" html_theme_options = dict( navigation_depth=4, @@ -143,9 +111,6 @@ "sklearn.neighbors._dist_metrics.DistanceMetric": "sklearn.neighbors.DistanceMetric", # If the docs are built with an old version of numpy, this will make it work: "numpy.random.RandomState": "numpy.random.mtrand.RandomState", - "scanpy.plotting._matrixplot.MatrixPlot": "scanpy.pl.MatrixPlot", - "scanpy.plotting._dotplot.DotPlot": "scanpy.pl.DotPlot", - "scanpy.plotting._stacked_violin.StackedViolin": "scanpy.pl.StackedViolin", "pandas.core.series.Series": "pandas.Series", } diff --git a/docs/index.rst b/docs/index.rst index a5d88a9..d80847d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,44 +1,12 @@ +.. include:: ../README.rst + :end-line: 36 + .. include:: _key_contributors.rst .. role:: small .. role:: smaller -|PyPI| |Python Version| |License| |Read the Docs| |Build| |Tests| |Codecov| |pre-commit| |Black| - -.. |PyPI| image:: https://img.shields.io/pypi/v/oktoberfest.svg - :target: https://pypi.org/project/oktoberfest/ - :alt: PyPI -.. |Python Version| image:: https://img.shields.io/pypi/pyversions/oktoberfest - :target: https://pypi.org/project/oktoberfest - :alt: Python Version -.. |License| image:: https://img.shields.io/github/license/wilhelm-lab/oktoberfest - :target: https://opensource.org/licenses/MIT - :alt: License -.. |Read the Docs| image:: https://img.shields.io/readthedocs/oktoberfest/latest.svg?label=Read%20the%20Docs - :target: https://oktoberfest.readthedocs.io/ - :alt: Read the documentation at https://oktoberfest.readthedocs.io/ -.. |Build| image:: https://github.com/wilhelm-lab/oktoberfest/workflows/Build%20oktoberfest%20Package/badge.svg - :target: https://github.com/wilhelm-lab/oktoberfest/actions?workflow=Package - :alt: Build Package Status -.. |Tests| image:: https://github.com/wilhelm-lab/oktoberfest/workflows/Run%20oktoberfest%20Tests/badge.svg - :target: https://github.com/wilhelm-lab/oktoberfest/actions?workflow=Tests - :alt: Run Tests Status -.. |Codecov| image:: https://codecov.io/gh/wilhelm-lab/oktoberfest/branch/main/graph/badge.svg - :target: https://codecov.io/gh/wilhelm-lab/oktoberfest - :alt: Codecov -.. |pre-commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white - :target: https://github.com/pre-commit/pre-commit - :alt: pre-commit -.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg - :target: https://github.com/psf/black - :alt: Black - -Spectrum IO -=========== - -Spectrum IO is a package primarily developed for usage within oktoberfest (https://github.com/wilhelm-lab/oktoberfest). It handles file conversions and input / output operations for oktoberfest. - .. toctree:: :maxdepth: 2 :caption: Contents: From 3d52e29fb67f278b1765c6064b5594189621a9d6 Mon Sep 17 00:00:00 2001 From: victorgiurcoiu Date: Tue, 11 Jul 2023 12:41:03 +0200 Subject: [PATCH 03/31] Updated contributors --- docs/_key_contributors.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/_key_contributors.rst b/docs/_key_contributors.rst index 0722a05..94a0269 100644 --- a/docs/_key_contributors.rst +++ b/docs/_key_contributors.rst @@ -1,14 +1,14 @@ .. sidebar:: Key Contributors - * `Mario Picciani `_: lead developer - * `Wassim Gabriel `_: developer - * `Matthew The `_: developer + * `Mario Picciani `_: developer, maintainer + * `Wassim Gabriel `_: developer, maintainer + * `Matthew The `_: developer, maintainer + * `Ludwig Lautenbacher `_: developer, maintainer * `Victor-George Giurcoiu `_: developer * `Omar Shouman `_: developer * Firas Hamood: developer - * `Ludwig Lautenbacher `_: developer * Cecilia Jensen: developer * Julian Mueller: developer * `Mostafa Kalhor `_: developer * `Armin Soleymaniniya `_: developer - * `Mathias Wilhelm `_: advisor and PI of wilhelmlab \ No newline at end of file + * `Mathias Wilhelm `_: advisor and PI of wilhelmlab \ No newline at end of file From d19e99656b1165238b79d225cd6c38e26325cc15 Mon Sep 17 00:00:00 2001 From: victorgiurcoiu Date: Wed, 12 Jul 2023 22:07:20 +0200 Subject: [PATCH 04/31] Added docs requirements, changed installation.rst --- docs/installation.rst | 50 +++---------------------------------------- docs/requirements.txt | 3 +++ noxfile.py | 3 ++- 3 files changed, 8 insertions(+), 48 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index 0ba1973..787bc8f 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -4,50 +4,6 @@ Installation ============ - -Stable release --------------- - -To install spectrum_io, run this command in your terminal: - -.. code-block:: console - - $ pip install spectrum_io - -This is the preferred method to install spectrum_io, as it will always install the most recent stable release. - -If you don't have `pip`_ installed, this `Python installation guide`_ can guide -you through the process. - -.. _pip: https://pip.pypa.io -.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/ - - -From sources ------------- - -The sources for spectrum_io can be downloaded from the `Github repo`_. -Please note that you require `poetry`_ to be installed. - -You can either clone the public repository: - -.. code-block:: console - - $ git clone git://github.com/wilhelm-lab/spectrum_io - -Or download the `tarball`_: - -.. code-block:: console - - $ curl -OJL https://github.com/wilhelm-lab/spectrum_io/tarball/master - -Once you have a copy of the source, you can install it with: - -.. code-block:: console - - $ make install - - -.. _Github repo: https://github.com/wilhelm-lab/spectrum_io -.. _tarball: https://github.com/wilhelm-lab/spectrum_io/tarball/master -.. _poetry: https://python-poetry.org/ +.. include:: ../README.rst + :start-line: 40 + :end-line: 47 \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index c0a815f..3c2cf99 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -5,3 +5,6 @@ sphinx-automodapi>=0.13 sphinx_click>=3.0.0 click>=8.0.1 -r ../requirements.txt +myst_parser +sphinx_autodoc_typehints +scanpydoc diff --git a/noxfile.py b/noxfile.py index c79d08d..9bc9f9d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -187,7 +187,8 @@ def docs_build(session: Session) -> None: """Build the documentation.""" args = session.posargs or ["docs", "docs/_build"] session.install(".") - session.install("sphinx", "sphinx-click", "sphinx-rtd-theme", "sphinx-rtd-dark-mode") + session.install("sphinx", "sphinx-click", "sphinx-rtd-theme") + session.install("-r", "./docs/requirements.txt") build_dir = Path("docs", "_build") if build_dir.exists(): From f54d0c583bee1e5cc5fcd9f92ed7532eaa18786e Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Mon, 24 Jun 2024 15:00:38 +0200 Subject: [PATCH 05/31] started documentation with new template --- README.rst | 36 +--- docs/API.rst | 44 +++- docs/_static/custom_cookietemple.css | 78 ++++++- docs/_templates/autosummary/base.rst | 5 + docs/authors.rst | 13 -- docs/code_of_conduct.rst | 1 - docs/conf.py | 294 ++++++++++++++++++--------- docs/index.rst | 11 +- docs/news.rst | 5 + docs/quickstart.rst | 6 + docs/reference.rst | 10 +- docs/requirements.txt | 9 - poetry.lock | 85 ++++---- pyproject.toml | 6 +- requirements.txt | 169 +++++++++++---- 15 files changed, 526 insertions(+), 246 deletions(-) create mode 100644 docs/_templates/autosummary/base.rst delete mode 100644 docs/authors.rst delete mode 100644 docs/code_of_conduct.rst create mode 100644 docs/news.rst create mode 100644 docs/quickstart.rst diff --git a/README.rst b/README.rst index e8157f7..30d49e5 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,6 @@ +Spectrum-IO: File / Data Conversion for Mass Spec data within the Oktoberfest ecosystem +======================================================================================= + |PyPI| |Python Version| |License| |Read the Docs| |Build| |Tests| |Codecov| |pre-commit| |Black| .. |PyPI| image:: https://img.shields.io/pypi/v/spectrum_io.svg @@ -28,37 +31,4 @@ :target: https://github.com/psf/black :alt: Black - -Spectrum IO -=========== - Spectrum IO is a package primarily developed for usage within oktoberfest (https://github.com/wilhelm-lab/oktoberfest). It handles file conversions and input / output operations for oktoberfest. - - -Installation ------------- - -You can install *spectrum_io* via pip_ from PyPI_: - -.. code:: console - - $ pip install spectrum_io - - -Usage ------ - -Please see the `Command-line Reference `_ for details. - - -Credits -------- - -This package was created with cookietemple_ using Cookiecutter_ based on Hypermodern_Python_Cookiecutter_. - -.. _cookietemple: https://cookietemple.com -.. _Cookiecutter: https://github.com/audreyr/cookiecutter -.. _PyPI: https://pypi.org/ -.. _Hypermodern_Python_Cookiecutter: https://github.com/cjolowicz/cookiecutter-hypermodern-python -.. _pip: https://pip.pypa.io/ -.. _Usage: https://spectrum_io.readthedocs.io/en/latest/usage.html diff --git a/docs/API.rst b/docs/API.rst index 949f087..7555c50 100644 --- a/docs/API.rst +++ b/docs/API.rst @@ -1,11 +1,41 @@ +.. module:: spectrum_io + +.. automodule:: spectrum_io + :noindex: + API === -.. toctree:: - :maxdepth: 4 +Import SpectrumIO using + +.. code-block:: python + + import spectrum_io as specio + +File conversions +---------------- + +.. module:: spectrum_io.d + +.. currentmodule:: spectrum_io + +Todo: add functions for bruker d conversions here + +.. autosummary:: + :toctree: api/d + +.. module:: spectrum_io.raw + +.. currentmodule:: spectrum_io + +Todo: add functions for thermoraw here + +Modstring conversions +--------------------- + +Todo +---- + +other modules + - spectrum_io - spectrum_io.file - spectrum_io.raw - spectrum_io.search_result - spectrum_io.spectral_library diff --git a/docs/_static/custom_cookietemple.css b/docs/_static/custom_cookietemple.css index c286236..553419b 100644 --- a/docs/_static/custom_cookietemple.css +++ b/docs/_static/custom_cookietemple.css @@ -1,6 +1,80 @@ @import "basic.css"; -/*Set max width to none so the theme uses all available width*/ .wy-nav-content { - max-width: none; + max-width: 1200px; +} + +.wy-side-nav-search { + background-color: inherit; +} + +table.align-default { + text-align: left; +} + +.fixed-table th:first-child, +.fixed-table td:first-child, +.autosummary th:first-child, +.autosummary td:first-child { + min-width: 250px; +} + +.autosummary th:first-child, +.autosummary td:first-child { + min-width: 400px; +} + +.fixed-table th:last-child, +.fixed-table td:last-child, +.autosummary th:last-child, +.autosummary td:last-child { + width: 100%; +} + +.fixed-table { + margin-left: 0; +} + +.wy-table-responsive table th p, +.wy-table-responsive table td p { + white-space: normal; +} + +.autosummary { + margin-left: 0 !important; +} + +.main-config-table tbody tr:nth-child(n + 4):nth-child(-n + 5) td:nth-child(1) { + padding-left: 50px; +} + +.main-config-table tbody tr:nth-child(n + 7):nth-child(-n + 7) td:nth-child(1) { + padding-left: 50px; +} + +.lib-rescore-config-table + tbody + tr:nth-child(n + 2):nth-child(-n + 5) + td:nth-child(1) { + padding-left: 50px; +} + +.lib-rescore-config-table tbody tr:nth-last-child(-n + 2) td:nth-child(1) { + padding-left: 50px; +} + +.lib-config-table tbody tr:nth-child(n + 2):nth-child(-n + 3) td:nth-child(1) { + padding-left: 50px; +} + +.lib-config-table tbody tr:nth-last-child(-n + 6) td:nth-child(1) { + padding-left: 50px; +} + +.digest-config-table tbody tr:not(:first-child) td:nth-child(1) { + padding-left: 50px; +} + +.date { + font-size: 50%; } diff --git a/docs/_templates/autosummary/base.rst b/docs/_templates/autosummary/base.rst new file mode 100644 index 0000000..4ae6a2c --- /dev/null +++ b/docs/_templates/autosummary/base.rst @@ -0,0 +1,5 @@ +:github_url: {{ fullname | modurl }} + +{% extends "!autosummary/base.rst" %} + +.. http://www.sphinx-doc.org/en/stable/ext/autosummary.html#customizing-templates \ No newline at end of file diff --git a/docs/authors.rst b/docs/authors.rst deleted file mode 100644 index c38349a..0000000 --- a/docs/authors.rst +++ /dev/null @@ -1,13 +0,0 @@ -======= -Credits -======= - -Development Lead ----------------- - -* Mario Picciani - -Contributors ------------- - -None yet. Why not be the first? diff --git a/docs/code_of_conduct.rst b/docs/code_of_conduct.rst deleted file mode 100644 index 96e0ba2..0000000 --- a/docs/code_of_conduct.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../CODE_OF_CONDUCT.rst diff --git a/docs/conf.py b/docs/conf.py index aee0e0c..43a8b88 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,77 +1,85 @@ +#!/usr/bin/env python +# mypy: ignore-errors +# spectrum_io documentation build configuration file +# +# If extensions (or modules to document with autodoc) are in another +# directory, add these directories to sys.path here. If the directory is +# relative to the documentation root, use os.path.abspath to make it +# absolute, like shown here. +# +import inspect import os import sys from datetime import datetime from pathlib import Path -import matplotlib # noqa +from jinja2.defaults import DEFAULT_FILTERS -# Don’t use tkinter agg when importing scanpy → … → matplotlib -matplotlib.use("agg") +sys.path.insert(0, os.path.abspath("..")) -HERE = Path(__file__).parent -sys.path[:0] = [str(HERE.parent), str(HERE / "extensions")] -on_rtd = os.environ.get("READTHEDOCS") == "True" +# If your documentation needs a minimal Sphinx version, state it here. +# needs_sphinx = '1.0' -# -- General configuration ------------------------------------------------ +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. - -nitpicky = True # Warn about broken links. This is here for a reason: Do not change. -needs_sphinx = "2.0" # Nicer param docs -suppress_warnings = [ - "ref.citation", - "myst.header", # https://github.com/executablebooks/MyST-Parser/issues/262 +# Add 'sphinx_automodapi.automodapi' if you want to build modules +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.autosummary", + "sphinx_autodoc_typehints", + "sphinx.ext.intersphinx", + "sphinx_click", ] -# General information -project = "Spectrum IO" -author = "Oktoberfest development team" -copyright = f"{datetime.now():%Y}, Wilhelmlab" - -# default settings +# Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] + +# The suffix(es) of source filenames. +source_suffix = ".rst" + +# The master toctree document. master_doc = "index" -default_role = "literal" + +# General information about the project. +project = "Spectrum-IO" +author = "Oktoberfest development team" +copyright = f"{datetime.now():%Y}, Wilhelmlab at Technical University of Munich" + +# The version info for the project you're documenting, acts as replacement +# for |version| and |release|, also used in various other places throughout +# the built documents. +# +# The short X.Y version. +version = "0.4.3" +# The full version, including alpha/beta/rc tags. +release = "0.4.3" + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = "en" + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] -pygments_style = "sphinx" -extensions = [ - "myst_parser", - "sphinx.ext.autodoc", - "sphinx.ext.intersphinx", - "sphinx.ext.doctest", - "sphinx.ext.coverage", - "sphinx.ext.mathjax", - "sphinx.ext.autosummary", - # 'plot_generator', - "matplotlib.sphinxext.plot_directive", - "sphinx_autodoc_typehints", - # 'ipython_directive', - # 'ipython_console_highlighting', - # 'scanpydoc', # scanpydoc.elegant_typehints causes full doc rebuilds - "scanpydoc.rtd_github_links", - "scanpydoc.theme", - "scanpydoc.definition_list_typed_field", - "scanpydoc.autosummary_generate_imported", -] +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = "sphinx" -# Generate the API documentation when building -autosummary_generate = True -autodoc_member_order = "bysource" -# autodoc_default_flags = ['members'] +# If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False -api_dir = HERE / "api" # function_images -typehints_defaults = "braces" +suppress_warnings = [ + "ref.citation", +] + +# -- Options for HTML output ------------------------------------------- -# -- Options for HTML output ---------------------------------------------- -html_theme = "scanpydoc" -html_theme_options = dict( - navigation_depth=4, - logo_only=True, - docsearch_index="scanpy", - docsearch_key="fa4304eb95d2134997e3729553a674b2", -) html_context = { "display_github": True, # Integrate GitHub "github_user": "wilhelm-lab", # Username @@ -81,57 +89,161 @@ "github_url": "https://github.com/wilhelm-lab/spectrum_io/", } -repository_url = "https://github.com/wilhelm-lab/spectrum_io/" +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = "sphinx_rtd_theme" + +# Theme options are theme-specific and customize the look and feel of a +# theme further. For a list of options available for each theme, see the +# documentation. +# +html_theme_options = dict( + navigation_depth=4, + logo_only=True, +) +# html_logo = "_static/img/Oktoberfest.svg" + + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] -html_show_sphinx = False -# -- Options for other output formats ------------------------------------------ +# -- Options for HTMLHelp output --------------------------------------- + +# Output file base name for HTML help builder. +htmlhelp_basename = "spectrumiodoc" + +# -- Options for LaTeX output ------------------------------------------ + +latex_elements = { + # The paper size ("letterpaper" or "a4paper"). + # + # "papersize": "letterpaper", + # The font size ("10pt", "11pt" or "12pt"). + # + # "pointsize": "10pt", + # Additional stuff for the LaTeX preamble. + # + # "preamble": "", + # Latex figure (float) alignment + # + # "figure_align": "htbp", +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass +# [howto, manual, or own class]). +latex_documents = [ + ( + master_doc, + "SpectrumIO.tex", + "SpectrumIO Documentation", + author, + "manual", + ), +] + +# -- Options for manual page output ------------------------------------ + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ( + master_doc, + "SpectrumIO", + "SpectrumIO Documentation", + [author], + 1, + ) +] + +autodoc_typehints = "description" + + +# -- Options for Texinfo output ---------------------------------------- -htmlhelp_basename = f"{project}doc" -doc_title = f"{project} Documentation" -latex_documents = [(master_doc, f"{project}.tex", doc_title, author, "manual")] -man_pages = [(master_doc, project, doc_title, [author], 1)] +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) texinfo_documents = [ ( master_doc, - project, - doc_title, + "SpectrumIO", + "SpectrumIO Documentation", author, - project, + "SpectrumIO", "One line description of project.", "Miscellaneous", - ) + ), ] +html_css_files = [ + "custom_cookietemple.css", +] +# -- Options for intersphinx mappings ---------------------------------- + +intersphinx_mapping = dict( + matplotlib=("https://matplotlib.org/stable/", None), + numpy=("https://numpy.org/doc/stable/", None), + pandas=("https://pandas.pydata.org/pandas-docs/stable/", None), + python=("https://docs.python.org/3", None), + scipy=("https://docs.scipy.org/doc/scipy/", None), + seaborn=("https://seaborn.pydata.org/", None), + sklearn=("https://scikit-learn.org/stable/", None), +) -# -- Suppress link warnings ---------------------------------------------------- -qualname_overrides = { - "sklearn.neighbors._dist_metrics.DistanceMetric": "sklearn.neighbors.DistanceMetric", - # If the docs are built with an old version of numpy, this will make it work: - "numpy.random.RandomState": "numpy.random.mtrand.RandomState", - "pandas.core.series.Series": "pandas.Series", -} +# module path filter to create direct links to sources for autogenerated docs +# according to https://gist.github.com/flying-sheep/b65875c0ce965fbdd1d9e5d0b9851ef1 -nitpick_ignore = [ - # Will probably be documented - ("py:class", "scanpy._settings.Verbosity"), - # Currently undocumented: https://github.com/mwaskom/seaborn/issues/1810 - ("py:class", "seaborn.ClusterGrid"), - # Won’t be documented - ("py:class", "scanpy.plotting._utils._AxesSubplot"), - ("py:class", "scanpy._utils.Empty"), - ("py:class", "numpy.random.mtrand.RandomState"), - # Will work once scipy 1.8 is released - ("py:class", "scipy.sparse.base.spmatrix"), - ("py:class", "scipy.sparse.csr.csr_matrix"), -] -# Options for plot examples +def get_obj_module(qualname): + """Get a module/class/attribute and its original module by qualname.""" + modname = qualname + classname = None + attrname = None + while modname not in sys.modules: + attrname = classname + modname, classname = modname.rsplit(".", 1) + + # retrieve object and find original module name + if classname: + cls = getattr(sys.modules[modname], classname) + modname = cls.__module__ + obj = getattr(cls, attrname) if attrname else cls + else: + obj = None + + return obj, sys.modules[modname] + + +def get_linenos(obj): + """Get an object’s line numbers.""" + try: + lines, start = inspect.getsourcelines(obj) + except TypeError: # obj is an attribute or None + return None, None + else: + return start, start + len(lines) - 1 + + +project_dir = Path(__file__).parent.parent # project/docs/conf.py/../.. → project/ +github_url = "https://github.com/{github_user}/{github_repo}/tree/{github_version}".format_map(html_context) + + +def modurl(qualname): + """Get the full GitHub URL for some object’s qualname.""" + obj, module = get_obj_module(qualname) + path = Path(module.__file__).relative_to(project_dir) + start, end = get_linenos(obj) + fragment = f"#L{start}-L{end}" if start and end else "" + return f"{github_url}/{path}{fragment}" + -plot_include_source = True -plot_formats = [("png", 90)] -plot_html_show_formats = False -plot_html_show_source_link = False -plot_working_directory = HERE.parent # Project root +# html_context doesn’t apply to autosummary templates ☹ +# and there’s no way to insert filters into those templates +# so we have to modify the default filters +DEFAULT_FILTERS["modurl"] = modurl diff --git a/docs/index.rst b/docs/index.rst index d80847d..71e74f3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,4 @@ -.. include:: ../README.rst - :end-line: 36 +.. include:: readme.rst .. include:: _key_contributors.rst @@ -7,7 +6,12 @@ .. role:: smaller +.. include:: quickstart.rst + +.. include:: news.rst + .. toctree:: + :hidden: :maxdepth: 2 :caption: Contents: @@ -15,5 +19,6 @@ usage API contributing - contributors reference + +.. _github: https://github.com/wilhelm-lab/spectrum_io diff --git a/docs/news.rst b/docs/news.rst new file mode 100644 index 0000000..a4057fe --- /dev/null +++ b/docs/news.rst @@ -0,0 +1,5 @@ +News +==== + +.. role:: date + :class: date \ No newline at end of file diff --git a/docs/quickstart.rst b/docs/quickstart.rst new file mode 100644 index 0000000..e582491 --- /dev/null +++ b/docs/quickstart.rst @@ -0,0 +1,6 @@ +Quickstart +---------- + +- Discuss usage, development and issues on `GitHub `_. +- Check the `usage principles <./usage.html>`_ or the `API <./API.html>`_. +- Check the `Contributor Guide <./contributing.html>`_ if you want to participate in developing. \ No newline at end of file diff --git a/docs/reference.rst b/docs/reference.rst index 91eff79..f97cb5b 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -1,10 +1,2 @@ References -========== - -.. [Prosit] Gessulat S, Schmidt T, Zolg DP, Samaras P, Schnatbaum K, Zerweck J, Knaute T, Rechenberger J, Delanghe B, Huhmer A, Reimer U, Ehrlich HC, Aiche S, Kuster B, Wilhelm M (2019), - *TriMap: PROSIT: Proteome-wide prediction of peptide tandem mass spectra by deep learning*, - `Nature Methods `__. - -.. [Prosit-TMT] Gabriel W, The M, Zolg D, Bayer FP, Shouman O, Lautenbacher L, Schnatbaum K, Zerweck J, Knaute T, Delanghe B, Huhmer A, Wenschuh H, Reimer U, Médard G, Kuster B, Wilhelm M (2022), - *TriMap: Prosit-TMT: Deep Learning Boosts Identification of TMT-Labeled Peptides*, - `Analytical Chemistry `__. +========== \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index 3c2cf99..3c8d7e7 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,10 +1 @@ -Sphinx>=4.0.1 -sphinx_rtd_theme>=0.5.2 -sphinx-rtd-dark-mode>=1.2.1 -sphinx-automodapi>=0.13 -sphinx_click>=3.0.0 -click>=8.0.1 -r ../requirements.txt -myst_parser -sphinx_autodoc_typehints -scanpydoc diff --git a/poetry.lock b/poetry.lock index c5f6d63..cc11a2f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "alabaster" -version = "0.7.13" -description = "A configurable sidebar-enabled Sphinx theme" +version = "0.7.16" +description = "A light, configurable Sphinx theme" optional = false -python-versions = ">=3.6" +python-versions = ">=3.9" files = [ - {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"}, - {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, + {file = "alabaster-0.7.16-py3-none-any.whl", hash = "sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92"}, + {file = "alabaster-0.7.16.tar.gz", hash = "sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65"}, ] [[package]] @@ -51,9 +51,6 @@ files = [ {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, ] -[package.dependencies] -typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} - [[package]] name = "attrs" version = "23.2.0" @@ -98,9 +95,6 @@ files = [ {file = "Babel-2.14.0.tar.gz", hash = "sha256:6919867db036398ba21eb5c7a0f6b28ab8cbc3ae7a73a44ebe34ae74a4e7d363"}, ] -[package.dependencies] -pytz = {version = ">=2015.7", markers = "python_version < \"3.9\""} - [package.extras] dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] @@ -1210,9 +1204,13 @@ files = [ {file = "lxml-5.2.2-cp36-cp36m-win_amd64.whl", hash = "sha256:edcfa83e03370032a489430215c1e7783128808fd3e2e0a3225deee278585196"}, {file = "lxml-5.2.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:28bf95177400066596cdbcfc933312493799382879da504633d16cf60bba735b"}, {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3a745cc98d504d5bd2c19b10c79c61c7c3df9222629f1b6210c0368177589fb8"}, + {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b590b39ef90c6b22ec0be925b211298e810b4856909c8ca60d27ffbca6c12e6"}, {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b336b0416828022bfd5a2e3083e7f5ba54b96242159f83c7e3eebaec752f1716"}, + {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:c2faf60c583af0d135e853c86ac2735ce178f0e338a3c7f9ae8f622fd2eb788c"}, {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:4bc6cb140a7a0ad1f7bc37e018d0ed690b7b6520ade518285dc3171f7a117905"}, + {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7ff762670cada8e05b32bf1e4dc50b140790909caa8303cfddc4d702b71ea184"}, {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:57f0a0bbc9868e10ebe874e9f129d2917750adf008fe7b9c1598c0fbbfdde6a6"}, + {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:a6d2092797b388342c1bc932077ad232f914351932353e2e8706851c870bca1f"}, {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:60499fe961b21264e17a471ec296dcbf4365fbea611bf9e303ab69db7159ce61"}, {file = "lxml-5.2.2-cp37-cp37m-win32.whl", hash = "sha256:d9b342c76003c6b9336a80efcc766748a333573abf9350f4094ee46b006ec18f"}, {file = "lxml-5.2.2-cp37-cp37m-win_amd64.whl", hash = "sha256:b16db2770517b8799c79aa80f4053cd6f8b716f21f8aca962725a9565ce3ee40"}, @@ -1611,7 +1609,6 @@ files = [ ] [package.dependencies] -importlib-metadata = {version = "*", markers = "python_version < \"3.9\""} llvmlite = "==0.41.*" numpy = ">=1.22,<1.27" @@ -2560,7 +2557,6 @@ files = [ [package.dependencies] markdown-it-py = ">=2.2.0" pygments = ">=2.13.0,<3.0.0" -typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.9\""} [package.extras] jupyter = ["ipywidgets (>=7.5.1,<9)"] @@ -2840,13 +2836,13 @@ files = [ [[package]] name = "spectrum-fundamentals" -version = "0.5.2" +version = "0.5.4" description = "Fundamental functions, annotation pipeline and constants for oktoberfest" optional = false python-versions = "<3.11.0,>=3.8.0" files = [ - {file = "spectrum_fundamentals-0.5.2-py3-none-any.whl", hash = "sha256:358235daa5ff48aa99437be238fa3da97b04cdd11e9feacedc3264f41661089e"}, - {file = "spectrum_fundamentals-0.5.2.tar.gz", hash = "sha256:99fcde6f8e01f8647413eff0b9da64a0b6ea87a9a69a9ee96c1f2ffb76ec637f"}, + {file = "spectrum_fundamentals-0.5.4-py3-none-any.whl", hash = "sha256:11ff8cc4b9568dc3a3d16aa125bccf2941bb94e49fdbc4470d6903f342d64009"}, + {file = "spectrum_fundamentals-0.5.4.tar.gz", hash = "sha256:9c148e5e6623bc67135de9e29ea10a7eb32ab19bcfe2ecd9c4e2a890bb6c3dfb"}, ] [package.dependencies] @@ -2854,32 +2850,32 @@ click = ">=8.0.0" joblib = ">=1.0.1,<2.0.0" moepy = ">=1.1.4,<2.0.0" numpy = ">=1.24.1,<1.25" -pandas = ">=1.3.0,<2.0.0" +pandas = ">=1.3,<3.0" PyYAML = ">=5.4.1" rich = ">=10.3.0" scikit-learn = ">=1.0,<2.0" [[package]] name = "sphinx" -version = "7.1.2" +version = "7.3.7" description = "Python documentation generator" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "sphinx-7.1.2-py3-none-any.whl", hash = "sha256:d170a81825b2fcacb6dfd5a0d7f578a053e45d3f2b153fecc948c37344eb4cbe"}, - {file = "sphinx-7.1.2.tar.gz", hash = "sha256:780f4d32f1d7d1126576e0e5ecc19dc32ab76cd24e950228dcf7b1f6d3d9e22f"}, + {file = "sphinx-7.3.7-py3-none-any.whl", hash = "sha256:413f75440be4cacf328f580b4274ada4565fb2187d696a84970c23f77b64d8c3"}, + {file = "sphinx-7.3.7.tar.gz", hash = "sha256:a4a7db75ed37531c05002d56ed6948d4c42f473a36f46e1382b0bd76ca9627bc"}, ] [package.dependencies] -alabaster = ">=0.7,<0.8" +alabaster = ">=0.7.14,<0.8.0" babel = ">=2.9" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -docutils = ">=0.18.1,<0.21" +docutils = ">=0.18.1,<0.22" imagesize = ">=1.3" importlib-metadata = {version = ">=4.8", markers = "python_version < \"3.10\""} Jinja2 = ">=3.0" packaging = ">=21.0" -Pygments = ">=2.13" +Pygments = ">=2.14" requests = ">=2.25.0" snowballstemmer = ">=2.0" sphinxcontrib-applehelp = "*" @@ -2887,12 +2883,13 @@ sphinxcontrib-devhelp = "*" sphinxcontrib-htmlhelp = ">=2.0.0" sphinxcontrib-jsmath = "*" sphinxcontrib-qthelp = "*" -sphinxcontrib-serializinghtml = ">=1.1.5" +sphinxcontrib-serializinghtml = ">=1.1.9" +tomli = {version = ">=2", markers = "python_version < \"3.11\""} [package.extras] docs = ["sphinxcontrib-websupport"] -lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-simplify", "isort", "mypy (>=0.990)", "ruff", "sphinx-lint", "types-requests"] -test = ["cython", "filelock", "html5lib", "pytest (>=4.6)"] +lint = ["flake8 (>=3.5.0)", "importlib_metadata", "mypy (==1.9.0)", "pytest (>=6.0)", "ruff (==0.3.7)", "sphinx-lint", "tomli", "types-docutils", "types-requests"] +test = ["cython (>=3.0)", "defusedxml (>=0.7.1)", "pytest (>=6.0)", "setuptools (>=67.0)"] [[package]] name = "sphinx-autobuild" @@ -2913,6 +2910,25 @@ sphinx = "*" [package.extras] test = ["pytest", "pytest-cov"] +[[package]] +name = "sphinx-autodoc-typehints" +version = "2.2.2" +description = "Type hints (PEP 484) support for the Sphinx autodoc extension" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinx_autodoc_typehints-2.2.2-py3-none-any.whl", hash = "sha256:b98337a8530c95b73ba0c65465847a8ab0a13403bdc81294d5ef396bbd1f783e"}, + {file = "sphinx_autodoc_typehints-2.2.2.tar.gz", hash = "sha256:128e600eeef63b722f3d8dac6403594592c8cade3ba66fd11dcb997465ee259d"}, +] + +[package.dependencies] +sphinx = ">=7.3.5" + +[package.extras] +docs = ["furo (>=2024.1.29)"] +numpy = ["nptyping (>=2.5)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.4.4)", "defusedxml (>=0.7.1)", "diff-cover (>=9)", "pytest (>=8.1.1)", "pytest-cov (>=5)", "sphobjinv (>=2.3.1)", "typing-extensions (>=4.11)"] + [[package]] name = "sphinx-click" version = "5.1.0" @@ -3052,17 +3068,18 @@ test = ["pytest"] [[package]] name = "sphinxcontrib-serializinghtml" -version = "1.1.5" -description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." +version = "1.1.10" +description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)" optional = false -python-versions = ">=3.5" +python-versions = ">=3.9" files = [ - {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, - {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, + {file = "sphinxcontrib_serializinghtml-1.1.10-py3-none-any.whl", hash = "sha256:326369b8df80a7d2d8d7f99aa5ac577f51ea51556ed974e7716cfd4fca3f6cb7"}, + {file = "sphinxcontrib_serializinghtml-1.1.10.tar.gz", hash = "sha256:93f3f5dc458b91b192fe10c397e324f262cf163d79f3282c158e8436a2c4511f"}, ] [package.extras] lint = ["docutils-stubs", "flake8", "mypy"] +standalone = ["Sphinx (>=5)"] test = ["pytest"] [[package]] @@ -3315,5 +3332,5 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" -python-versions = ">=3.8.0,<3.11.0" -content-hash = "067c3bb6ecad61000fcd7838724860ad32235925e3a8c3e09e09d4312a516dbb" +python-versions = ">=3.9.0,<3.11.0" +content-hash = "c2ffe131dd2c37342117da4810d8681cadc9618c1a9f34d84d8a94b13930a2a9" diff --git a/pyproject.toml b/pyproject.toml index 4ba27f5..255f092 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,14 +12,13 @@ packages = [ { include = "spectrum_io" }, ] classifiers = [ - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", ] [tool.poetry.dependencies] -python = ">=3.8.0,<3.11.0" +python = ">=3.9.0,<3.11.0" click = ">=8.0.0" rich = ">=10.3.0" PyYAML = ">=5.4.1" @@ -65,6 +64,9 @@ pyupgrade = ">=2.31.0" [tool.poetry.scripts] spectrum_io = "spectrum_io.__main__:main" +[tool.poetry.group.dev.dependencies] +sphinx-autodoc-typehints = "^2.2.2" + [tool.black] line-length = 120 diff --git a/requirements.txt b/requirements.txt index 6342d52..d6c3425 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,42 +1,127 @@ -alphatims==1.0.8 ; python_version >= "3.8" and python_full_version < "3.11.0" -click==8.1.7 ; python_version >= "3.8" and python_full_version < "3.11.0" -colorama==0.4.6 ; python_version >= "3.8" and python_full_version < "3.11.0" and platform_system == "Windows" -contourpy==1.1.1 ; python_version >= "3.8" and python_full_version < "3.11.0" -cycler==0.12.1 ; python_version >= "3.8" and python_full_version < "3.11.0" -fonttools==4.51.0 ; python_version >= "3.8" and python_full_version < "3.11.0" -h5py==3.11.0 ; python_version >= "3.8" and python_full_version < "3.11.0" -importlib-metadata==7.1.0 ; python_version >= "3.8" and python_version < "3.9" -importlib-resources==6.4.0 ; python_version >= "3.8" and python_version < "3.10" -joblib==1.4.0 ; python_version >= "3.8" and python_full_version < "3.11.0" -kiwisolver==1.4.5 ; python_version >= "3.8" and python_full_version < "3.11.0" -llvmlite==0.41.1 ; python_version >= "3.8" and python_full_version < "3.11.0" -lxml==4.9.4 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -markdown-it-py==3.0.0 ; python_version >= "3.8" and python_full_version < "3.11.0" -matplotlib==3.7.5 ; python_version >= "3.8" and python_full_version < "3.11.0" -mdurl==0.1.2 ; python_version >= "3.8" and python_full_version < "3.11.0" -moepy==1.1.4 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -numba==0.58.1 ; python_version >= "3.8" and python_full_version < "3.11.0" -numpy==1.24.4 ; python_version >= "3.8" and python_full_version < "3.11.0" -packaging==24.0 ; python_version >= "3.8" and python_full_version < "3.11.0" -pandas==1.5.3 ; python_version >= "3.8" and python_full_version < "3.11.0" -pillow==10.3.0 ; python_version >= "3.8" and python_full_version < "3.11.0" -psutil==5.9.8 ; python_version >= "3.8" and python_full_version < "3.11.0" -pygments==2.17.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -pymzml==2.5.9 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -pyparsing==3.1.2 ; python_version >= "3.8" and python_full_version < "3.11.0" -pyteomics==4.7.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -python-dateutil==2.9.0.post0 ; python_version >= "3.8" and python_full_version < "3.11.0" -pytz==2024.1 ; python_version >= "3.8" and python_full_version < "3.11.0" -pyyaml==6.0.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -pyzstd==0.15.10 ; python_version >= "3.8" and python_full_version < "3.11.0" -regex==2024.4.16 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -rich==13.7.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -scikit-learn==1.3.2 ; python_version >= "3.8" and python_full_version < "3.11.0" -scipy==1.10.1 ; python_version >= "3.8" and python_full_version < "3.11.0" -six==1.16.0 ; python_version >= "3.8" and python_full_version < "3.11.0" -sortedcontainers==2.4.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -spectrum-fundamentals==0.5.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -threadpoolctl==3.4.0 ; python_version >= "3.8" and python_full_version < "3.11.0" -tqdm==4.66.2 ; python_version >= "3.8" and python_full_version < "3.11.0" -typing-extensions==4.11.0 ; python_version >= "3.8" and python_version < "3.9" -zipp==3.18.1 ; python_version >= "3.8" and python_version < "3.10" +alabaster==0.7.16 ; python_version >= "3.9" and python_full_version < "3.11.0" +alphatims==1.0.8 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +annotated-types==0.6.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +attrs==23.2.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +authlib==1.3.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +babel==2.14.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +bandit==1.7.8 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +black==24.4.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +certifi==2024.2.2 ; python_version >= "3.9" and python_full_version < "3.11.0" +cffi==1.16.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" and platform_python_implementation != "PyPy" +cfgv==3.4.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +charset-normalizer==3.3.2 ; python_version >= "3.9" and python_full_version < "3.11.0" +click==8.1.7 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +colorama==0.4.6 ; python_version >= "3.9" and python_full_version < "3.11.0" +contourpy==1.1.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +coverage[toml]==7.5.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +cryptography==42.0.5 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +cycler==0.12.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +darglint==1.8.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +distlib==0.3.8 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +docutils==0.20.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +dparse==0.6.4b0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +exceptiongroup==1.2.1 ; python_full_version >= "3.9.0" and python_version < "3.11" +filelock==3.13.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +flake8-bandit==4.1.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +flake8-bugbear==23.3.12 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +flake8-docstrings==1.7.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +flake8-rst-docstrings==0.3.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +flake8==5.0.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +fonttools==4.51.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +h5py==3.11.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +identify==2.5.36 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +idna==3.7 ; python_version >= "3.9" and python_full_version < "3.11.0" +imagesize==1.4.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +importlib-metadata==7.1.0 ; python_version >= "3.9" and python_version < "3.10" +importlib-resources==6.4.0 ; python_full_version >= "3.9.0" and python_version < "3.10" +iniconfig==2.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +jinja2==3.1.3 ; python_version >= "3.9" and python_full_version < "3.11.0" +joblib==1.4.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +kiwisolver==1.4.5 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +livereload==2.6.3 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +llvmlite==0.41.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +lxml==5.2.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +markdown-it-py==3.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +markupsafe==2.1.5 ; python_version >= "3.9" and python_full_version < "3.11.0" +marshmallow==3.21.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +matplotlib==3.7.5 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +mccabe==0.7.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +mdurl==0.1.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +moepy==1.1.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +mypy-extensions==1.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +mypy==1.10.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +nodeenv==1.8.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +numba==0.58.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +numpy==1.24.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +packaging==24.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +pandas==1.5.3 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pathspec==0.12.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pbr==6.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pep8-naming==0.13.3 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pillow==10.3.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +platformdirs==4.2.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pluggy==1.5.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pre-commit-hooks==4.6.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pre-commit==3.5.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +psutil==5.9.8 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pycodestyle==2.9.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pycparser==2.22 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" and platform_python_implementation != "PyPy" +pydantic-core==2.18.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pydantic==2.7.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pydocstyle==6.3.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pyflakes==2.5.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pygments==2.17.2 ; python_version >= "3.9" and python_full_version < "3.11.0" +pymzml==2.5.9 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pyparsing==3.1.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pyteomics==4.7.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pytest==8.2.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +python-dateutil==2.9.0.post0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pytz==2024.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pyupgrade==3.8.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pyyaml==6.0.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pyzstd==0.15.10 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +regex==2024.4.16 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +requests==2.31.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +restructuredtext-lint==1.4.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +rich==13.7.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +ruamel-yaml-clib==0.2.8 ; platform_python_implementation == "CPython" and python_full_version < "3.11.0" and python_full_version >= "3.9.0" +ruamel-yaml==0.18.6 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +safety-schemas==0.0.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +safety==3.1.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +scikit-learn==1.3.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +scipy==1.10.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +setuptools==69.5.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +shellingham==1.5.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +six==1.16.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +snowballstemmer==2.2.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +sortedcontainers==2.4.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +spectrum-fundamentals==0.5.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +sphinx-autobuild==2021.3.14 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +sphinx-autodoc-typehints==2.2.2 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinx-click==5.1.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +sphinx-rtd-dark-mode==1.3.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +sphinx-rtd-theme==2.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +sphinx==7.3.7 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinxcontrib-applehelp==1.0.4 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinxcontrib-devhelp==1.0.2 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinxcontrib-htmlhelp==2.0.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinxcontrib-jquery==4.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinxcontrib-qthelp==1.0.3 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinxcontrib-serializinghtml==1.1.10 ; python_version >= "3.9" and python_full_version < "3.11.0" +stevedore==5.2.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +threadpoolctl==3.4.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +tokenize-rt==5.2.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +tomli==2.0.1 ; python_version >= "3.9" and python_version < "3.11" +tornado==6.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +tqdm==4.66.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +typeguard==4.2.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +typer==0.12.3 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +types-attrs==19.1.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +types-pkg-resources==0.1.3 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +types-requests==2.31.0.20240406 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +typing-extensions==4.11.0 ; python_full_version >= "3.9.0" and python_version < "3.11" +urllib3==2.2.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +virtualenv==20.26.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +xdoctest[colors]==1.1.3 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +zipp==3.18.1 ; python_version >= "3.9" and python_version < "3.10" From 06b8525a3d106caef36b4df2b56ec120d9cbb364 Mon Sep 17 00:00:00 2001 From: Fabian Basso Date: Fri, 12 Jul 2024 13:23:53 +0000 Subject: [PATCH 06/31] cahnges for every search engine --- spectrum_io/search_result/mascot.py | 59 +++++++++++++++++++-- spectrum_io/search_result/maxquant.py | 23 ++++---- spectrum_io/search_result/msfragger.py | 17 +++--- spectrum_io/search_result/sage.py | 10 ++-- spectrum_io/search_result/search_results.py | 11 ++-- 5 files changed, 89 insertions(+), 31 deletions(-) diff --git a/spectrum_io/search_result/mascot.py b/spectrum_io/search_result/mascot.py index 3468868..13d63fe 100644 --- a/spectrum_io/search_result/mascot.py +++ b/spectrum_io/search_result/mascot.py @@ -1,7 +1,8 @@ import logging +import re import sqlite3 from pathlib import Path -from typing import Optional, Union +from typing import Optional, Union, Dict, Tuple import pandas as pd import spectrum_fundamentals.constants as c @@ -15,7 +16,8 @@ class Mascot(SearchResults): """Handle search results from Mascot.""" - def read_result(self, tmt_labeled: str) -> pd.DataFrame: + def read_result(self, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, float]] = None, + custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: """ Function to read a mascot msf file and perform some basic formatting. @@ -76,13 +78,60 @@ def read_result(self, tmt_labeled: str) -> pd.DataFrame: ).agg({"MODIFICATIONS": "|".join}) mod_masses_reverse = {round(float(v), 3): k for k, v in c.MOD_MASSES.items()} + + def custom_regex_escape(key: str) -> str: + """ + Subfunction to escape only normal brackets in the modstring. + + :param key: The match to escape + :return: match with escaped special characters + """ + for k, v in {"[": r"\[", "]": r"\]", "(": r"\(", ")": r"\)"}.items(): + key = key.replace(k, v) + return key + + def find_replacement(match: re.Match, seq: str) -> str: + """ + Subfunction to find the corresponding substitution for a match. + + :param match: an re.Match object found by re.sub + :return: substitution string for the given match + """ + key = match.string[match.start() : match.end()] + if custom_var_mods is not None and key in custom_var_mods.keys(): + assert isinstance(custom_mods[key][0], str), f"Provided illegal custom mod format, expected dict-values are (str, float), recieved {(type(custom_mods[key][0]).__name__), (type(custom_mods[key][1]).__name__)}." + end = match.span()[1] + if end < len(seq) and (seq[end] == "[" or seq[end]== "("): + return key + if not custom_mods[key][0].startswith(key): + return key + custom_mods[key][0] + return custom_mods[key][0] + elif custom_stat_mods is not None and key in custom_stat_mods.keys(): + assert isinstance(custom_mods[key][0], str), f"Provided illegal custom mod format, expected dict-values are (str, float), recieved {(type(replacements[key][0]).__name__), (type(replacements[key][1]).__name__)}." + return custom_mods[key][0] + return custom_mods[key] + + + custom_mods = {} + + if custom_var_mods is not None: + custom_mods.update(custom_var_mods) + if custom_stat_mods is not None: + custom_mods.update(custom_stat_mods) + + if custom_mods: + regex = re.compile("|".join(map(custom_regex_escape, custom_mods.keys()))) + sequences = [] for _, row in df.iterrows(): modifications = row["MODIFICATIONS"].split("|") + sequence = row["SEQUENCE"] + if custom_mods: + sequence = regex.sub(lambda match: find_replacement(match, sequence), sequence) + if len(modifications) == 0: - sequences.append(row["SEQUENCE"]) - else: - sequence = row["SEQUENCE"] + sequences.append(sequence) + else: skip = 0 for mod in modifications: pos, mass = mod.split("$") diff --git a/spectrum_io/search_result/maxquant.py b/spectrum_io/search_result/maxquant.py index e68d830..0453c03 100644 --- a/spectrum_io/search_result/maxquant.py +++ b/spectrum_io/search_result/maxquant.py @@ -1,6 +1,6 @@ import logging from pathlib import Path -from typing import Union +from typing import Union, Dict, Tuple import pandas as pd import spectrum_fundamentals.constants as c @@ -41,7 +41,8 @@ def add_tmt_mod(mass: float, seq: str, unimod_tag: str) -> float: mass += num_of_tmt * c.MOD_MASSES[f"{unimod_tag}"] return mass - def read_result(self, tmt_labeled: str) -> pd.DataFrame: + def read_result(self, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, float]] = None, + custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: """ Function to read a msms txt and perform some basic formatting. @@ -72,11 +73,12 @@ def read_result(self, tmt_labeled: str) -> pd.DataFrame: df.columns = df.columns.str.upper() df.columns = df.columns.str.replace(" ", "_") - df = MaxQuant.update_columns_for_prosit(df, tmt_labeled) + df = MaxQuant.update_columns_for_prosit(df, tmt_labeled, custom_stat_mods, custom_var_mods) return filter_valid_prosit_sequences(df) @staticmethod - def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str) -> pd.DataFrame: + def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, float]] = None, + custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: """ Update columns of df to work with Prosit. @@ -94,8 +96,8 @@ def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str) -> pd.DataFram logger.info("Adding TMT fixed modifications") df["MODIFIED_SEQUENCE"] = maxquant_to_internal( df["MODIFIED_SEQUENCE"].to_numpy(), - fixed_mods={"C": "C[UNIMOD:4]", "^_": f"_{unimod_tag}-", "K": f"K{unimod_tag}"}, - ) + fixed_mods={"C": "C[UNIMOD:4]", "^_": f"_{unimod_tag}-", "K": f"K{unimod_tag}"}, + stat_custom_mods=custom_stat_mods, var_custom_mods=custom_var_mods) df["MASS"] = df.apply(lambda x: MaxQuant.add_tmt_mod(x.MASS, x.MODIFIED_SEQUENCE, unimod_tag), axis=1) if "msa" in tmt_labeled: logger.info("Replacing phospho by dehydration for Phospho-MSA") @@ -106,16 +108,19 @@ def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str) -> pd.DataFram logger.info("Adding SILAC fixed modifications") df.loc[df["LABELING_STATE"] == 1, "MODIFIED_SEQUENCE"] = maxquant_to_internal( df[df["LABELING_STATE"] == 1]["MODIFIED_SEQUENCE"].to_numpy(), - fixed_mods={"C": "C[UNIMOD:4]", "K": "K[UNIMOD:259]", "R": "R[UNIMOD:267]"}, + fixed_mods={"C": "C[UNIMOD:4]", "K": "K[UNIMOD:259]", "R": "R[UNIMOD:267]"}, stat_custom_mods=custom_stat_mods, + var_custom_mods=custom_var_mods ) df.loc[df["LABELING_STATE"] != 1, "MODIFIED_SEQUENCE"] = maxquant_to_internal( - df[df["LABELING_STATE"] != 1]["MODIFIED_SEQUENCE"].to_numpy() + df[df["LABELING_STATE"] != 1]["MODIFIED_SEQUENCE"].to_numpy(), stat_custom_mods=custom_stat_mods, + var_custom_mods=custom_var_mods ) df["MASS"] = df.apply(lambda x: MaxQuant.add_tmt_mod(x.MASS, x.MODIFIED_SEQUENCE, "[UNIMOD:259]"), axis=1) df["MASS"] = df.apply(lambda x: MaxQuant.add_tmt_mod(x.MASS, x.MODIFIED_SEQUENCE, "[UNIMOD:267]"), axis=1) df.drop(columns=["LABELING_STATE"], inplace=True) else: - df["MODIFIED_SEQUENCE"] = maxquant_to_internal(df["MODIFIED_SEQUENCE"].to_numpy()) + df["MODIFIED_SEQUENCE"] = maxquant_to_internal(df["MODIFIED_SEQUENCE"].to_numpy(), stat_custom_mods=custom_stat_mods, + var_custom_mods=custom_var_mods) df["SEQUENCE"] = internal_without_mods(df["MODIFIED_SEQUENCE"]) df["PEPTIDE_LENGTH"] = df["SEQUENCE"].apply(lambda x: len(x)) df["PROTEINS"].fillna("UNKNOWN", inplace=True) diff --git a/spectrum_io/search_result/msfragger.py b/spectrum_io/search_result/msfragger.py index 142f299..cb9de37 100644 --- a/spectrum_io/search_result/msfragger.py +++ b/spectrum_io/search_result/msfragger.py @@ -1,6 +1,6 @@ import logging from pathlib import Path -from typing import Union +from typing import Union, Dict, Tuple import pandas as pd import spectrum_fundamentals.constants as c @@ -16,7 +16,8 @@ class MSFragger(SearchResults): """Handle search results from MSFragger.""" - def read_result(self, tmt_labeled: str) -> pd.DataFrame: + def read_result(self, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, float]] = None, + custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: """ Function to read a msms txt and perform some basic formatting. @@ -37,11 +38,12 @@ def read_result(self, tmt_labeled: str) -> pd.DataFrame: df = pd.concat(ms_frag_results) - df = update_columns_for_prosit(df, tmt_labeled) + df = update_columns_for_prosit(df, tmt_labeled, custom_stat_mods=custom_stat_mods, custom_var_mods=custom_var_mods) return filter_valid_prosit_sequences(df) -def update_columns_for_prosit(df, tmt_labeled: str) -> pd.DataFrame: +def update_columns_for_prosit(df, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, float]] = None, + custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: """ Update columns of df to work with Prosit. @@ -61,10 +63,11 @@ def update_columns_for_prosit(df, tmt_labeled: str) -> pd.DataFrame: logger.info("Adding TMT fixed modifications") df["MODIFIED_SEQUENCE"] = msfragger_to_internal( df["modified_peptide"].to_list(), - fixed_mods={"C": "C[UNIMOD:4]", r"n[\d+]": f"{unimod_tag}-", "K": f"K{unimod_tag}"}, - ) + fixed_mods={"C": "C[UNIMOD:4]", r"n[\d+]": f"{unimod_tag}-", "K": f"K{unimod_tag}"}, stat_custom_mods=custom_stat_mods, + var_custom_mods=custom_var_mods) else: - df["MODIFIED_SEQUENCE"] = msfragger_to_internal(df["modified_peptide"].to_list()) + df["MODIFIED_SEQUENCE"] = msfragger_to_internal(df["modified_peptide"].to_list(), stat_custom_mods=custom_stat_mods, + var_custom_mods=custom_var_mods) df.rename( columns={ diff --git a/spectrum_io/search_result/sage.py b/spectrum_io/search_result/sage.py index 78b10c4..11ccae9 100644 --- a/spectrum_io/search_result/sage.py +++ b/spectrum_io/search_result/sage.py @@ -1,6 +1,6 @@ import logging from pathlib import Path -from typing import Union +from typing import Union, Dict, Tuple import pandas as pd import spectrum_fundamentals.constants as c @@ -14,7 +14,7 @@ class Sage(SearchResults): """Handle search results from Sage.""" - def read_result(self, tmt_labeled: str = "") -> pd.DataFrame: + def read_result(self, tmt_labeled: str = "", custom_mods: Dict[str, str] = None) -> pd.DataFrame: """ Function to read a msms tsv and perform some basic formatting. @@ -33,11 +33,11 @@ def read_result(self, tmt_labeled: str = "") -> pd.DataFrame: df.columns = df.columns.str.upper() df.columns = df.columns.str.replace(" ", "_") - df = Sage.update_columns_for_prosit(df, tmt_labeled) + df = Sage.update_columns_for_prosit(df, tmt_labeled, custom_mods) return filter_valid_prosit_sequences(df) @staticmethod - def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str) -> pd.DataFrame: + def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, float]] = None, custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: """ Update columns of df to work with Prosit. @@ -68,7 +68,7 @@ def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str) -> pd.DataFram # length of the peptide df["PEPTIDE_LENGTH"] = df["SEQUENCE"].str.len() # converting sage to unimod - df["MODIFIED_SEQUENCE"] = sage_to_internal(df["MODIFIED_SEQUENCE"]) + df["MODIFIED_SEQUENCE"] = sage_to_internal(df["MODIFIED_SEQUENCE"], stat_custom_mods=custom_stat_mods, var_custom_mods=custom_var_mods) df["PROTEINS"].fillna("UNKNOWN", inplace=True) return df diff --git a/spectrum_io/search_result/search_results.py b/spectrum_io/search_result/search_results.py index 8e9a6b5..b91c91d 100644 --- a/spectrum_io/search_result/search_results.py +++ b/spectrum_io/search_result/search_results.py @@ -2,7 +2,7 @@ import re from abc import abstractmethod from pathlib import Path -from typing import Optional, Union +from typing import Optional, Union, Dict, Tuple import pandas as pd @@ -51,7 +51,7 @@ def __init__(self, path: Union[str, Path]): self.path = path @abstractmethod - def read_result(self, tmt_labeled: str): + def read_result(self, tmt_labeled: str, custom_mods: Dict[str, str]): """Read result. :param tmt_labeled: tmt label as str @@ -59,7 +59,7 @@ def read_result(self, tmt_labeled: str): """ raise NotImplementedError - def generate_internal(self, tmt_labeled: str, out_path: Optional[Union[str, Path]] = None) -> pd.DataFrame: + def generate_internal(self, tmt_labeled: str, out_path: Optional[Union[str, Path]] = None, custom_stat_mods: Dict[str, Tuple[str, float]] = None, custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: """ Generate df and save to out_path if provided. @@ -69,7 +69,7 @@ def generate_internal(self, tmt_labeled: str, out_path: Optional[Union[str, Path """ if out_path is None: # convert and return - return self.read_result(tmt_labeled) + return self.read_result(tmt_labeled, custom_stat_mods, custom_var_mods) if isinstance(out_path, str): out_path = Path(out_path) @@ -77,10 +77,11 @@ def generate_internal(self, tmt_labeled: str, out_path: Optional[Union[str, Path if out_path.is_file(): # only read converted and return logger.info(f"Found search results in internal format at {out_path}, skipping conversion") + #TODO: internal_to_unimod return csv.read_file(out_path) # convert, save and return - df = self.read_result(tmt_labeled) + df = self.read_result(tmt_labeled, custom_stat_mods, custom_var_mods) csv.write_file(df, out_path) return df From 98ff14935c9e58b6af669b6f4ca11199bbe38131 Mon Sep 17 00:00:00 2001 From: Fabian Basso Date: Fri, 12 Jul 2024 13:29:31 +0000 Subject: [PATCH 07/31] fixed mascot --- spectrum_io/search_result/mascot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spectrum_io/search_result/mascot.py b/spectrum_io/search_result/mascot.py index 13d63fe..777cb91 100644 --- a/spectrum_io/search_result/mascot.py +++ b/spectrum_io/search_result/mascot.py @@ -99,7 +99,8 @@ def find_replacement(match: re.Match, seq: str) -> str: """ key = match.string[match.start() : match.end()] if custom_var_mods is not None and key in custom_var_mods.keys(): - assert isinstance(custom_mods[key][0], str), f"Provided illegal custom mod format, expected dict-values are (str, float), recieved {(type(custom_mods[key][0]).__name__), (type(custom_mods[key][1]).__name__)}." + assert isinstance(custom_mods[key][0], str), f"Provided illegal custom mod format, expected dict-values are (str, float), + recieved {(type(custom_mods[key][0]).__name__), (type(custom_mods[key][1]).__name__)}." end = match.span()[1] if end < len(seq) and (seq[end] == "[" or seq[end]== "("): return key @@ -107,7 +108,8 @@ def find_replacement(match: re.Match, seq: str) -> str: return key + custom_mods[key][0] return custom_mods[key][0] elif custom_stat_mods is not None and key in custom_stat_mods.keys(): - assert isinstance(custom_mods[key][0], str), f"Provided illegal custom mod format, expected dict-values are (str, float), recieved {(type(replacements[key][0]).__name__), (type(replacements[key][1]).__name__)}." + assert isinstance(custom_mods[key][0], str), f"Provided illegal custom mod format, expected dict-values are (str, float), + recieved {(type(custom_mods[key][0]).__name__), (type(custom_mods[key][1]).__name__)}." return custom_mods[key][0] return custom_mods[key] From da4ab8b53bba5c8af1dd5ce37264d10ee1a5624b Mon Sep 17 00:00:00 2001 From: Fabian Basso Date: Fri, 12 Jul 2024 14:49:31 +0000 Subject: [PATCH 08/31] switched stat & var --- spectrum_io/search_result/mascot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spectrum_io/search_result/mascot.py b/spectrum_io/search_result/mascot.py index 777cb91..451e0ad 100644 --- a/spectrum_io/search_result/mascot.py +++ b/spectrum_io/search_result/mascot.py @@ -98,7 +98,7 @@ def find_replacement(match: re.Match, seq: str) -> str: :return: substitution string for the given match """ key = match.string[match.start() : match.end()] - if custom_var_mods is not None and key in custom_var_mods.keys(): + if custom_stat_mods is not None and key in custom_stat_mods.keys(): assert isinstance(custom_mods[key][0], str), f"Provided illegal custom mod format, expected dict-values are (str, float), recieved {(type(custom_mods[key][0]).__name__), (type(custom_mods[key][1]).__name__)}." end = match.span()[1] @@ -107,7 +107,7 @@ def find_replacement(match: re.Match, seq: str) -> str: if not custom_mods[key][0].startswith(key): return key + custom_mods[key][0] return custom_mods[key][0] - elif custom_stat_mods is not None and key in custom_stat_mods.keys(): + elif custom_var_mods is not None and key in custom_var_mods.keys(): assert isinstance(custom_mods[key][0], str), f"Provided illegal custom mod format, expected dict-values are (str, float), recieved {(type(custom_mods[key][0]).__name__), (type(custom_mods[key][1]).__name__)}." return custom_mods[key][0] From bb03deb73dda79714fca4113020750baba921aa1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:49:46 +0000 Subject: [PATCH 09/31] [DEPENDABOT]: Bump pypa/gh-action-pypi-publish from 1.8.14 to 1.9.0 Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.14 to 1.9.0. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.8.14...v1.9.0) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/publish_package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish_package.yml b/.github/workflows/publish_package.yml index e9b2249..9f4a54a 100644 --- a/.github/workflows/publish_package.yml +++ b/.github/workflows/publish_package.yml @@ -29,7 +29,7 @@ jobs: poetry build --ansi - name: Publish package on PyPI - uses: pypa/gh-action-pypi-publish@v1.8.14 + uses: pypa/gh-action-pypi-publish@v1.9.0 with: # TODO COOKIETEMPLE: Configure your PyPI Token to enable automatic deployment to PyPi on releases # https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets From 6f839ce0c2e5d460d060639a2f113c3e4398e62f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:49:49 +0000 Subject: [PATCH 10/31] [DEPENDABOT]: Bump codecov/codecov-action from 4.4.1 to 4.5.0 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.4.1 to 4.5.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4.4.1...v4.5.0) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 2a323c4..2c87840 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -165,4 +165,4 @@ jobs: run: nox --force-color --session=coverage -- xml -i - name: Upload coverage report - uses: codecov/codecov-action@v4.4.1 + uses: codecov/codecov-action@v4.5.0 From 46455c2fef74b86abec15fa4af9554e41e33c26f Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Thu, 18 Jul 2024 10:41:53 +0200 Subject: [PATCH 11/31] fixed reading scannr, if already an int --- spectrum_io/search_result/sage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spectrum_io/search_result/sage.py b/spectrum_io/search_result/sage.py index 78b10c4..05cc798 100644 --- a/spectrum_io/search_result/sage.py +++ b/spectrum_io/search_result/sage.py @@ -60,7 +60,8 @@ def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str) -> pd.DataFram # removing .mzML df["RAW_FILE"] = df["RAW_FILE"].str.replace(r"\.mz[M|m][l|L]", "", regex=True) # extracting only the scan number - df["SCAN_NUMBER"] = [int(x.rsplit("=", 1)[-1]) for x in df["SCAN_NUMBER"]] + if not df["SCAN_NUMBER"].dtype == int: + df["SCAN_NUMBER"] = [int(x.rsplit("=", 1)[-1]) for x in df["SCAN_NUMBER"]] # creating a column of decoys and targets df["REVERSE"] = df["REVERSE"] < 0 # removing modification to create the unmodified sequences From f44b95aa4eb42ea20ea43519a3c1c722e5767d9a Mon Sep 17 00:00:00 2001 From: Fabian Basso Date: Thu, 18 Jul 2024 13:18:26 +0000 Subject: [PATCH 12/31] updated custom_modification feature --- spectrum_io/search_result/mascot.py | 64 +++++++-------------- spectrum_io/search_result/maxquant.py | 40 +++++++------ spectrum_io/search_result/msfragger.py | 36 +++++++----- spectrum_io/search_result/sage.py | 19 ++++-- spectrum_io/search_result/search_results.py | 19 ++++-- 5 files changed, 95 insertions(+), 83 deletions(-) diff --git a/spectrum_io/search_result/mascot.py b/spectrum_io/search_result/mascot.py index 451e0ad..e3f7adc 100644 --- a/spectrum_io/search_result/mascot.py +++ b/spectrum_io/search_result/mascot.py @@ -6,7 +6,7 @@ import pandas as pd import spectrum_fundamentals.constants as c -from spectrum_fundamentals.mod_string import internal_without_mods +from spectrum_fundamentals.mod_string import internal_without_mods, custom_regex_escape from .search_results import SearchResults, filter_valid_prosit_sequences @@ -16,12 +16,14 @@ class Mascot(SearchResults): """Handle search results from Mascot.""" - def read_result(self, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, float]] = None, - custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: + def read_result(self, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, + var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: """ Function to read a mascot msf file and perform some basic formatting. :param tmt_labeled: tmt label as str + :param var_mods: dict with custom variable identifier and respecitve internal equivalent + :param stat_mods: dict with custom static identifier and respecitve internal equivalent :return: pd.DataFrame with the formatted data """ logger.info("Reading mascot msf file") @@ -76,59 +78,35 @@ def read_result(self, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, f ["SCAN_NUMBER", "PRECURSOR_CHARGE", "SCORE", "RAW_FILE", "SEQUENCE", "REVERSE"], as_index=False, ).agg({"MODIFICATIONS": "|".join}) - mod_masses_reverse = {round(float(v), 3): k for k, v in c.MOD_MASSES.items()} - - - def custom_regex_escape(key: str) -> str: - """ - Subfunction to escape only normal brackets in the modstring. - - :param key: The match to escape - :return: match with escaped special characters - """ - for k, v in {"[": r"\[", "]": r"\]", "(": r"\(", ")": r"\)"}.items(): - key = key.replace(k, v) - return key + MOD_MASSES = c.update_mod_masses() + mod_masses_reverse = {round(float(v), 3): k for k, v in MOD_MASSES.items()} - def find_replacement(match: re.Match, seq: str) -> str: + def find_replacement(match: re.Match, sequence: str) -> str: """ - Subfunction to find the corresponding substitution for a match. + Subfunction to find the corresponding substitution for a match. - :param match: an re.Match object found by re.sub - :return: substitution string for the given match - """ + :param match: an re.Match object found by re.sub + :return: substitution string for the given match + """ key = match.string[match.start() : match.end()] - if custom_stat_mods is not None and key in custom_stat_mods.keys(): - assert isinstance(custom_mods[key][0], str), f"Provided illegal custom mod format, expected dict-values are (str, float), - recieved {(type(custom_mods[key][0]).__name__), (type(custom_mods[key][1]).__name__)}." - end = match.span()[1] - if end < len(seq) and (seq[end] == "[" or seq[end]== "("): - return key - if not custom_mods[key][0].startswith(key): - return key + custom_mods[key][0] - return custom_mods[key][0] - elif custom_var_mods is not None and key in custom_var_mods.keys(): - assert isinstance(custom_mods[key][0], str), f"Provided illegal custom mod format, expected dict-values are (str, float), - recieved {(type(custom_mods[key][0]).__name__), (type(custom_mods[key][1]).__name__)}." - return custom_mods[key][0] - return custom_mods[key] + return mods[key] - custom_mods = {} + mods = {} - if custom_var_mods is not None: - custom_mods.update(custom_var_mods) - if custom_stat_mods is not None: - custom_mods.update(custom_stat_mods) + if var_mods is not None: + mods.update(var_mods) + if stat_mods is not None: + mods.update(stat_mods) - if custom_mods: - regex = re.compile("|".join(map(custom_regex_escape, custom_mods.keys()))) + if mods: + regex = re.compile("|".join(map(custom_regex_escape, mods.keys()))) sequences = [] for _, row in df.iterrows(): modifications = row["MODIFICATIONS"].split("|") sequence = row["SEQUENCE"] - if custom_mods: + if mods: sequence = regex.sub(lambda match: find_replacement(match, sequence), sequence) if len(modifications) == 0: diff --git a/spectrum_io/search_result/maxquant.py b/spectrum_io/search_result/maxquant.py index 0453c03..2180979 100644 --- a/spectrum_io/search_result/maxquant.py +++ b/spectrum_io/search_result/maxquant.py @@ -1,10 +1,11 @@ import logging from pathlib import Path -from typing import Union, Dict, Tuple +from typing import Optional, Union, Dict, Tuple import pandas as pd import spectrum_fundamentals.constants as c from spectrum_fundamentals.mod_string import internal_without_mods, maxquant_to_internal +from spectrum_fundamentals.constants import MAXQUANT_VAR_MODS from .search_results import SearchResults, filter_valid_prosit_sequences @@ -41,12 +42,14 @@ def add_tmt_mod(mass: float, seq: str, unimod_tag: str) -> float: mass += num_of_tmt * c.MOD_MASSES[f"{unimod_tag}"] return mass - def read_result(self, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, float]] = None, - custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: + def read_result(self, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, + var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: """ Function to read a msms txt and perform some basic formatting. :param tmt_labeled: tmt label as str + :param var_mods: dict with custom variable identifier and respecitve internal equivalent + :param stat_mods: dict with custom static identifier and respecitve internal equivalent :return: pd.DataFrame with the formatted data """ logger.info("Reading msms.txt file") @@ -73,21 +76,25 @@ def read_result(self, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, f df.columns = df.columns.str.upper() df.columns = df.columns.str.replace(" ", "_") - df = MaxQuant.update_columns_for_prosit(df, tmt_labeled, custom_stat_mods, custom_var_mods) + df = MaxQuant.update_columns_for_prosit(df, tmt_labeled, stat_mods, var_mods) return filter_valid_prosit_sequences(df) @staticmethod - def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, float]] = None, - custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: + def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, + var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: """ Update columns of df to work with Prosit. :param df: df to modify :param tmt_labeled: True if tmt labeled + :param var_mods: dict with custom variable identifier and respecitve internal equivalent + :param stat_mods: dict with custom static identifier and respecitve internal equivalent :return: modified df as pd.DataFrame """ df.rename(columns={"CHARGE": "PRECURSOR_CHARGE"}, inplace=True) + mods = {**(MAXQUANT_VAR_MODS), **(stat_mods or {}), **(var_mods or {})} + df["REVERSE"].fillna(False, inplace=True) df["REVERSE"].replace("+", True, inplace=True) logger.info("Converting MaxQuant peptide sequence to internal format") @@ -95,32 +102,33 @@ def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str, custom_stat_mo unimod_tag = c.TMT_MODS[tmt_labeled] logger.info("Adding TMT fixed modifications") df["MODIFIED_SEQUENCE"] = maxquant_to_internal( - df["MODIFIED_SEQUENCE"].to_numpy(), - fixed_mods={"C": "C[UNIMOD:4]", "^_": f"_{unimod_tag}-", "K": f"K{unimod_tag}"}, - stat_custom_mods=custom_stat_mods, var_custom_mods=custom_var_mods) + df["MODIFIED_SEQUENCE"].to_numpy(), mods= + {**{"C": "C[UNIMOD:4]", "^_": f"_{unimod_tag}-", "K": f"K{unimod_tag}"}, **mods} + ) df["MASS"] = df.apply(lambda x: MaxQuant.add_tmt_mod(x.MASS, x.MODIFIED_SEQUENCE, unimod_tag), axis=1) if "msa" in tmt_labeled: logger.info("Replacing phospho by dehydration for Phospho-MSA") df["MODIFIED_SEQUENCE_MSA"] = df["MODIFIED_SEQUENCE"].str.replace( "[UNIMOD:21]", "[UNIMOD:23]", regex=False ) + fixed_mods = {"C": "C[UNIMOD:4]"} elif "LABELING_STATE" in df.columns: logger.info("Adding SILAC fixed modifications") + df.loc[df["LABELING_STATE"] == 1, "MODIFIED_SEQUENCE"] = maxquant_to_internal( - df[df["LABELING_STATE"] == 1]["MODIFIED_SEQUENCE"].to_numpy(), - fixed_mods={"C": "C[UNIMOD:4]", "K": "K[UNIMOD:259]", "R": "R[UNIMOD:267]"}, stat_custom_mods=custom_stat_mods, - var_custom_mods=custom_var_mods + df[df["LABELING_STATE"] == 1]["MODIFIED_SEQUENCE"].to_numpy(), mods = + {**{"C": "C[UNIMOD:4]", "K": "K[UNIMOD:259]", "R": "R[UNIMOD:267]"}, **mods} ) df.loc[df["LABELING_STATE"] != 1, "MODIFIED_SEQUENCE"] = maxquant_to_internal( - df[df["LABELING_STATE"] != 1]["MODIFIED_SEQUENCE"].to_numpy(), stat_custom_mods=custom_stat_mods, - var_custom_mods=custom_var_mods + df[df["LABELING_STATE"] != 1]["MODIFIED_SEQUENCE"].to_numpy(), mods= + {**{"C": "C[UNIMOD:4]"}, **mods} ) df["MASS"] = df.apply(lambda x: MaxQuant.add_tmt_mod(x.MASS, x.MODIFIED_SEQUENCE, "[UNIMOD:259]"), axis=1) df["MASS"] = df.apply(lambda x: MaxQuant.add_tmt_mod(x.MASS, x.MODIFIED_SEQUENCE, "[UNIMOD:267]"), axis=1) df.drop(columns=["LABELING_STATE"], inplace=True) else: - df["MODIFIED_SEQUENCE"] = maxquant_to_internal(df["MODIFIED_SEQUENCE"].to_numpy(), stat_custom_mods=custom_stat_mods, - var_custom_mods=custom_var_mods) + df["MODIFIED_SEQUENCE"] = maxquant_to_internal(df["MODIFIED_SEQUENCE"].to_numpy(), mods= + {**{"C": "C[UNIMOD:4]"}, **mods}) df["SEQUENCE"] = internal_without_mods(df["MODIFIED_SEQUENCE"]) df["PEPTIDE_LENGTH"] = df["SEQUENCE"].apply(lambda x: len(x)) df["PROTEINS"].fillna("UNKNOWN", inplace=True) diff --git a/spectrum_io/search_result/msfragger.py b/spectrum_io/search_result/msfragger.py index cb9de37..968380e 100644 --- a/spectrum_io/search_result/msfragger.py +++ b/spectrum_io/search_result/msfragger.py @@ -1,11 +1,12 @@ import logging from pathlib import Path -from typing import Union, Dict, Tuple +from typing import Optional, Union, Dict, Tuple import pandas as pd import spectrum_fundamentals.constants as c from pyteomics import pepxml -from spectrum_fundamentals.mod_string import internal_without_mods, msfragger_to_internal +from spectrum_fundamentals.mod_string import internal_without_mods, msfragger_or_custom_to_internal +from spectrum_fundamentals.constants import MSFRAGGER_VAR_MODS from tqdm import tqdm from .search_results import SearchResults, filter_valid_prosit_sequences @@ -16,13 +17,14 @@ class MSFragger(SearchResults): """Handle search results from MSFragger.""" - def read_result(self, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, float]] = None, - custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: + def read_result(self, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, + var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: """ Function to read a msms txt and perform some basic formatting. :param tmt_labeled: tmt label as str - :raises FileNotFoundError: in case the given path is neither a file, nor a directory. + :param var_mods: dict with custom variable identifier and respecitve internal equivalent + :param stat_mods: dict with custom static identifier and respecitve internal equivalent:raises FileNotFoundError: in case the given path is neither a file, nor a directory. :return: pd.DataFrame with the formatted data """ if self.path.is_file(): @@ -38,17 +40,19 @@ def read_result(self, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, f df = pd.concat(ms_frag_results) - df = update_columns_for_prosit(df, tmt_labeled, custom_stat_mods=custom_stat_mods, custom_var_mods=custom_var_mods) + df = update_columns_for_prosit(df, tmt_labeled, stat_mods=stat_mods, var_mods=var_mods) return filter_valid_prosit_sequences(df) -def update_columns_for_prosit(df, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, float]] = None, - custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: +def update_columns_for_prosit(df, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, + var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: """ Update columns of df to work with Prosit. :param df: df to modify :param tmt_labeled: True if tmt labeled + :param var_mods: dict with custom variable identifier and respecitve internal equivalent + :param stat_mods: dict with custom static identifier and respecitve internal equivalent :return: modified df as pd.DataFrame """ df["PROTEINS"] = df["protein"] @@ -58,16 +62,20 @@ def update_columns_for_prosit(df, tmt_labeled: str, custom_stat_mods: Dict[str, df["MASS"] = df["precursor_neutral_mass"] df["PEPTIDE_LENGTH"] = df["peptide"].apply(lambda x: len(x)) + mods = {**(MSFRAGGER_VAR_MODS), **(stat_mods or {}), **(var_mods or {})} + + if tmt_labeled != "": unimod_tag = c.TMT_MODS[tmt_labeled] logger.info("Adding TMT fixed modifications") - df["MODIFIED_SEQUENCE"] = msfragger_to_internal( - df["modified_peptide"].to_list(), - fixed_mods={"C": "C[UNIMOD:4]", r"n[\d+]": f"{unimod_tag}-", "K": f"K{unimod_tag}"}, stat_custom_mods=custom_stat_mods, - var_custom_mods=custom_var_mods) + mods = {**{"C": "C[UNIMOD:4]", r"n[\d+]": f"{unimod_tag}-", "K": f"K{unimod_tag}"}, **mods} + df["MODIFIED_SEQUENCE"] = msfragger_or_custom_to_internal( + df["modified_peptide"].to_list(), mods=mods) else: - df["MODIFIED_SEQUENCE"] = msfragger_to_internal(df["modified_peptide"].to_list(), stat_custom_mods=custom_stat_mods, - var_custom_mods=custom_var_mods) + #By default, i.e. if nothing is supplied to fixed_mods, carbamidomethylation on cystein will be included + # in the fixed modifications. If you want to have no fixed modifictions at all, supply fixed_mods={} + mods = {**{"C": "C[UNIMOD:4]"}, **mods} + df["MODIFIED_SEQUENCE"] = msfragger_or_custom_to_internal(df["modified_peptide"].to_list(), mods=mods) df.rename( columns={ diff --git a/spectrum_io/search_result/sage.py b/spectrum_io/search_result/sage.py index 11ccae9..10be092 100644 --- a/spectrum_io/search_result/sage.py +++ b/spectrum_io/search_result/sage.py @@ -1,9 +1,9 @@ import logging from pathlib import Path -from typing import Union, Dict, Tuple +from typing import Optional, Union, Dict, Tuple import pandas as pd -import spectrum_fundamentals.constants as c +from spectrum_fundamentals.constants import MOD_MASSES_SAGE from spectrum_fundamentals.mod_string import sage_to_internal from .search_results import SearchResults, filter_valid_prosit_sequences @@ -14,11 +14,14 @@ class Sage(SearchResults): """Handle search results from Sage.""" - def read_result(self, tmt_labeled: str = "", custom_mods: Dict[str, str] = None) -> pd.DataFrame: + def read_result(self, tmt_labeled: str = "", stat_mods: Optional[Dict[str, str]] = None, + var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: """ Function to read a msms tsv and perform some basic formatting. :param tmt_labeled: tmt label as str + :param var_mods: Variable modifications with custom identifiers and their respective internal equivalents + :param stat_mods: Static modifications with custom identifiers and their respective internal equivalents :return: pd.DataFrame with the formatted data """ logger.info(f"Reading {self.path}") @@ -33,16 +36,19 @@ def read_result(self, tmt_labeled: str = "", custom_mods: Dict[str, str] = None) df.columns = df.columns.str.upper() df.columns = df.columns.str.replace(" ", "_") - df = Sage.update_columns_for_prosit(df, tmt_labeled, custom_mods) + df = Sage.update_columns_for_prosit(df, tmt_labeled, stat_mods=stat_mods, var_mods=var_mods) return filter_valid_prosit_sequences(df) @staticmethod - def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str, custom_stat_mods: Dict[str, Tuple[str, float]] = None, custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: + def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, + var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: """ Update columns of df to work with Prosit. :param df: df to modify :param tmt_labeled: True if tmt labeled, ignored + :param var_mods: Variable modifications with custom identifiers and their respective internal equivalents + :param stat_mods: Static modifications with custom identifiers and their respective internal equivalents :return: modified df as pd.DataFrame """ df = df.rename( @@ -56,6 +62,7 @@ def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str, custom_stat_mo "LABEL": "REVERSE", } ) + mods = {**(MOD_MASSES_SAGE), **(stat_mods or {}), **(var_mods or {})} # removing .mzML df["RAW_FILE"] = df["RAW_FILE"].str.replace(r"\.mz[M|m][l|L]", "", regex=True) @@ -68,7 +75,7 @@ def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str, custom_stat_mo # length of the peptide df["PEPTIDE_LENGTH"] = df["SEQUENCE"].str.len() # converting sage to unimod - df["MODIFIED_SEQUENCE"] = sage_to_internal(df["MODIFIED_SEQUENCE"], stat_custom_mods=custom_stat_mods, var_custom_mods=custom_var_mods) + df["MODIFIED_SEQUENCE"] = sage_to_internal(df["MODIFIED_SEQUENCE"], mods=mods) df["PROTEINS"].fillna("UNKNOWN", inplace=True) return df diff --git a/spectrum_io/search_result/search_results.py b/spectrum_io/search_result/search_results.py index b91c91d..cba5b85 100644 --- a/spectrum_io/search_result/search_results.py +++ b/spectrum_io/search_result/search_results.py @@ -3,6 +3,7 @@ from abc import abstractmethod from pathlib import Path from typing import Optional, Union, Dict, Tuple +from spectrum_fundamentals.constants import update_custom_mods import pandas as pd @@ -51,25 +52,35 @@ def __init__(self, path: Union[str, Path]): self.path = path @abstractmethod - def read_result(self, tmt_labeled: str, custom_mods: Dict[str, str]): + def read_result(self, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, + var_mods: Optional[Dict[str, str]] = None): """Read result. :param tmt_labeled: tmt label as str + :param var_mods: variable modifications with custom identifier and respecitve internal equivalent + :param stat_mods: static modifications with custom identifier and respecitve internal equivalent """ raise NotImplementedError - def generate_internal(self, tmt_labeled: str, out_path: Optional[Union[str, Path]] = None, custom_stat_mods: Dict[str, Tuple[str, float]] = None, custom_var_mods: Dict[str, Tuple[str, float]] = None) -> pd.DataFrame: + def generate_internal(self, tmt_labeled: str, out_path: Optional[Union[str, Path]] = None, custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None) -> pd.DataFrame: """ Generate df and save to out_path if provided. :param out_path: path to output :param tmt_labeled: tmt label as str + :param custom_mods: dict with static and variable custom modifications, their internal identifier and mass :return: path to output file """ + stat_mods: Dict[str, str] = {key: value[0] for key, value in (custom_mods.get("stat_mods") or {}).items()} + var_mods: Dict[str, str] = {key: value[0] for key, value in (custom_mods.get("var_mods") or {}).items()} + + mod_masses = [(value[0], float(value[1])) for value in stat_mods.values()+var_mods.values()] + update_custom_mods(mods=mod_masses) + if out_path is None: # convert and return - return self.read_result(tmt_labeled, custom_stat_mods, custom_var_mods) + return self.read_result(tmt_labeled, stat_mods=stat_mods, var_mods=var_mods) if isinstance(out_path, str): out_path = Path(out_path) @@ -81,7 +92,7 @@ def generate_internal(self, tmt_labeled: str, out_path: Optional[Union[str, Path return csv.read_file(out_path) # convert, save and return - df = self.read_result(tmt_labeled, custom_stat_mods, custom_var_mods) + df = self.read_result(tmt_labeled, stat_mods=stat_mods, var_mods=var_mods) csv.write_file(df, out_path) return df From 11e4405660ad541f3a25ec6519eb6fb66fe13cf8 Mon Sep 17 00:00:00 2001 From: Fabian Basso Date: Sat, 27 Jul 2024 13:07:00 +0000 Subject: [PATCH 13/31] updated search_Results + tests for sage done --- spectrum_io/search_result/search_results.py | 4 +--- .../data/sage_output_internal_mods.csv | 18 ++++++++++++++++++ tests/unit_tests/data/sage_output_mods.tsv | 18 ++++++++++++++++++ tests/unit_tests/test_sage.py | 10 ++++++++++ 4 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 tests/unit_tests/data/sage_output_internal_mods.csv create mode 100644 tests/unit_tests/data/sage_output_mods.tsv diff --git a/spectrum_io/search_result/search_results.py b/spectrum_io/search_result/search_results.py index cba5b85..ead4234 100644 --- a/spectrum_io/search_result/search_results.py +++ b/spectrum_io/search_result/search_results.py @@ -70,14 +70,12 @@ def generate_internal(self, tmt_labeled: str, out_path: Optional[Union[str, Path :param out_path: path to output :param tmt_labeled: tmt label as str :param custom_mods: dict with static and variable custom modifications, their internal identifier and mass + :raises AssertionError: if custom modification with illegal mass was provided :return: path to output file """ stat_mods: Dict[str, str] = {key: value[0] for key, value in (custom_mods.get("stat_mods") or {}).items()} var_mods: Dict[str, str] = {key: value[0] for key, value in (custom_mods.get("var_mods") or {}).items()} - mod_masses = [(value[0], float(value[1])) for value in stat_mods.values()+var_mods.values()] - update_custom_mods(mods=mod_masses) - if out_path is None: # convert and return return self.read_result(tmt_labeled, stat_mods=stat_mods, var_mods=var_mods) diff --git a/tests/unit_tests/data/sage_output_internal_mods.csv b/tests/unit_tests/data/sage_output_internal_mods.csv new file mode 100644 index 0000000..9b6c7ff --- /dev/null +++ b/tests/unit_tests/data/sage_output_internal_mods.csv @@ -0,0 +1,18 @@ +MODIFIED_SEQUENCE,PROTEINS,RAW_FILE,SCAN_NUMBER,REVERSE,MASS,PRECURSOR_CHARGE,SCORE,SEQUENCE,PEPTIDE_LENGTH +[UNIMOD:737]-HLDGGAEQSLLFVAGM[UNIMOD:35]R,rev_sp|P26006-1|ITA3_HUMAN;rev_sp|P26006|ITA3_HUMAN,GN20170722_SK_HLA_G0103_R1_01,50989,True,2045.0568,2,18.084579770792818,HLDGGAEQSLLFVAGMR,17 +[UNIMOD:737]-GRFVEPLSNVQEEWNQK[UNIMOD:737],rev_sp|Q9H1A3-2|METL9_HUMAN;rev_sp|Q9H1A3|METL9_HUMAN;rev_tr|H3BN86|H3BN86_HUMAN;rev_tr|Q8TD49|Q8TD49_HUMAN,GN20170722_SK_HLA_G0103_R1_01,37495,True,2517.338,2,21.44256145543081,GRFVEPLSNVQEEWNQK,17 +[UNIMOD:737]-LTVEC[UNIMOD:4]MPTIASDDLPVGTLQESEVSM[UNIMOD:35]TGPG,rev_tr|C9JVX2|C9JVX2_HUMAN,GN20170722_SK_HLA_G0103_R1_01,45450,True,3378.6082,3,18.628243636678995,LTVECMPTIASDDLPVGTLQESEVSMTGPG,30 +[UNIMOD:737]-VNM[UNIMOD:35]RTSSSIQNEDEATSMELIAPGP,sp|Q9Y5Y9|SCNAA_HUMAN;tr|A0A2R8Y6J6|A0A2R8Y6J6_HUMAN;tr|A0A590UJM0|A0A590UJM0_HUMAN,GN20170722_SK_HLA_G0103_R1_01,45493,False,2921.3948,3,19.97971639308644,VNMRTSSSIQNEDEATSMELIAPGP,25 +[UNIMOD:737]-VGEQEAPHEGGHPGSDSARASMADWLR,sp|Q9H093|NUAK2_HUMAN,GN20170722_SK_HLA_G0103_R1_01,41946,False,3075.4417,3,20.936078174830037,VGEQEAPHEGGHPGSDSARASMADWLR,27 +[UNIMOD:737]-EM[UNIMOD:35]VSPTDSC[UNIMOD:4]VRVSVRDLPQFHVSVVDM[UNIMOD:35]DR,rev_sp|Q9HCN3|PGAP6_HUMAN;rev_tr|K4DI83|K4DI83_HUMAN,GN20170722_SK_HLA_G0103_R1_01,39750,True,3620.7583,3,17.954540767022678,EMVSPTDSCVRVSVRDLPQFHVSVVDMDR,29 +[UNIMOD:737]-K[UNIMOD:737]M[UNIMOD:35]EEDIYTNLSK[UNIMOD:737]METVLGQSMSSLPLSYR,sp|Q8WXH0-2|SYNE2_HUMAN;sp|Q8WXH0|SYNE2_HUMAN;tr|A0A0A0MRE3|A0A0A0MRE3_HUMAN;tr|G3V5X4|G3V5X4_HUMAN,GN20170722_SK_HLA_G0103_R1_01,45441,False,4053.1077,4,19.962357128713123,KMEEDIYTNLSKMETVLGQSMSSLPLSYR,29 +[UNIMOD:737]-TC[UNIMOD:4]SK[UNIMOD:737]SQGSWGNREIVIIDTPDMFSWK[UNIMOD:737],sp|Q9UG22|GIMA2_HUMAN,GN20170722_SK_HLA_G0103_R1_01,36758,False,3728.9263,3,18.776753308950084,TCSKSQGSWGNREIVIIDTPDMFSWK,26 +[UNIMOD:737]-M[UNIMOD:35]SLGRAAPSAPGR,rev_sp|P51693-2|APLP1_HUMAN;rev_sp|P51693|APLP1_HUMAN;rev_tr|K7EMS1|K7EMS1_HUMAN,GN20170722_SK_HLA_G0103_R1_01,49100,True,1514.819,2,20.66450790410668,MSLGRAAPSAPGR,13 +[UNIMOD:737]-C[UNIMOD:4]LIQM[UNIMOD:35]GAAVEAK[UNIMOD:737]AYNGNTALHVAASLQYR,tr|H7C5S1|H7C5S1_HUMAN,GN20170722_SK_HLA_G0103_R1_01,37376,False,3593.885,3,21.88178474607965,CLIQMGAAVEAKAYNGNTALHVAASLQYR,29 +[UNIMOD:737]-M[UNIMOD:35]EESLNIVK[UNIMOD:737]YTAFLYNDQLIWSGLEQDDMR,sp|P86790|CCZ1B_HUMAN;sp|P86791|CCZ1_HUMAN,GN20170722_SK_HLA_G0103_R1_01,41296,False,4095.037,3,22.91659667770412,MEESLNIVKYTAFLYNDQLIWSGLEQDDMR,30 +[UNIMOD:737]-LNVEGTERGSC[UNIMOD:4]GRK[UNIMOD:737],sp|O75078-2|ADA11_HUMAN;sp|O75078|ADA11_HUMAN;tr|B4DKD2|B4DKD2_HUMAN;tr|K7EKA8|K7EKA8_HUMAN,GN20170722_SK_HLA_G0103_R1_01,40784,False,2020.0887,3,21.842498887625368,LNVEGTERGSCGRK,14 +[UNIMOD:737]-C[UNIMOD:4]NRGWTALHESVSR,sp|Q96Q27-1|ASB2_HUMAN;sp|Q96Q27|ASB2_HUMAN;tr|G3V2Z2|G3V2Z2_HUMAN;tr|G3V4B2|G3V4B2_HUMAN,GN20170722_SK_HLA_G0103_R1_01,51002,False,1900.9526,2,17.823081883875247,CNRGWTALHESVSR,14 +[UNIMOD:737]-AEVDNQMHVVDK[UNIMOD:737]NPVSLVSK[UNIMOD:737]TR,rev_sp|O75151|PHF2_HUMAN,GN20170722_SK_HLA_G0103_R1_01,40715,True,3152.7583,3,19.971965322167343,AEVDNQMHVVDKNPVSLVSKTR,22 +[UNIMOD:737]-YLLSLEEERPALMDDR,sp|Q86TB9-2|PATL1_HUMAN;sp|Q86TB9-4|PATL1_HUMAN;sp|Q86TB9|PATL1_HUMAN,GN20170722_SK_HLA_G0103_R1_01,37506,False,2178.1194,2,19.99761378859208,YLLSLEEERPALMDDR,16 +[UNIMOD:737]-EGRGAGSQSPPRGR,sp|Q6ZSN1|YI023_HUMAN,GN20170722_SK_HLA_G0103_R1_01,45427,False,1639.8704,2,19.22966416224777,EGRGAGSQSPPRGR,14 +[UNIMOD:737]-TASASRRSAR,sp|P08729|K2C7_HUMAN,GN20170722_SK_HLA_G0103_R1_01,30700,False,1290.7319,2,19.376349012983997,TASASRRSAR,10 diff --git a/tests/unit_tests/data/sage_output_mods.tsv b/tests/unit_tests/data/sage_output_mods.tsv new file mode 100644 index 0000000..6488d2b --- /dev/null +++ b/tests/unit_tests/data/sage_output_mods.tsv @@ -0,0 +1,18 @@ +peptide proteins num_proteins filename scannr rank label expmass calcmass charge peptide_len missed_cleavages isotope_error precursor_ppm fragment_ppm hyperscore delta_next delta_best rt aligned_rt predicted_rt delta_rt_model matched_peaks longest_b longest_y longest_y_pct matched_intensity_pct scored_candidates poisson sage_discriminant_score posterior_error spectrum_q peptide_q protein_q ms1_intensity ms2_intensity +[+229.1629]-HLDGGAEQSLLFVAGM[+15.9948]R rev_sp|P26006-1|ITA3_HUMAN;rev_sp|P26006|ITA3_HUMAN 2 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=50989 1 -1 2199.172 2045.0568 2 17 0 0.0 72623.49 7.826053 18.084579770792818 0.20642824189008735 0.0 113.94822 0.9495685 0.0 0.9495685 4 2 1 0.05882353 1.318411 84602 -2.0562283019710534 -0.37137848 -0.35820845 0.30232558 0.5880901 0.5815684 926232.0 7361.109 +[+229.1629]-GRFVEPLSNVQEEWNQK[+229.1629] rev_sp|Q9H1A3-2|METL9_HUMAN;rev_sp|Q9H1A3|METL9_HUMAN;rev_tr|H3BN86|H3BN86_HUMAN;rev_tr|Q8TD49|Q8TD49_HUMAN 4 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=37495 1 -1 2671.5417 2517.338 2 17 1 0.0 59436.277 4.4063077 21.44256145543081 0.24493444146309074 0.0 83.519325 0.6959944 0.0 0.6959944 4 1 2 0.11764706 3.139837 130027 -2.014281373814444 -0.37227735 -0.35820845 0.30232558 0.5880901 0.5815684 2674831.2 42405.516 +[+229.1629]-LTVEC[+57.0215]MPTIASDDLPVGTLQESEVSM[+15.9948]TGPG rev_tr|C9JVX2|C9JVX2_HUMAN 1 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=45450 1 -1 3533.4688 3378.6082 3 30 0 0.0 44808.7 2.583788 18.628243636678995 0.4911733270242351 0.0 102.02221 0.8501851 0.0 0.8501851 4 1 2 0.06666667 1.6194082 80638 -2.046675752396668 -0.3724502 -0.35820845 0.30232558 0.5880901 0.5815684 643726.75 8588.239 +[+229.1629]-VNM[+15.9948]RTSSSIQNEDEATSMELIAPGP sp|Q9Y5Y9|SCNAA_HUMAN;tr|A0A2R8Y6J6|A0A2R8Y6J6_HUMAN;tr|A0A590UJM0|A0A590UJM0_HUMAN 3 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=45493 1 1 3074.5525 2921.3948 3 25 1 0.0 51087.08 5.391072 19.979716393086438 0.2293833747943026 0.0 102.12942 0.85107845 0.0 0.85107845 5 1 2 0.08 1.4697478 154744 -2.71207222963538 -0.3737817 -0.35820845 0.30232558 0.5880901 0.5815684 1085421.8 8865.469 +[+229.1629]-VGEQEAPHEGGHPGSDSARASMADWLR sp|Q9H093|NUAK2_HUMAN 1 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=41946 1 1 3229.3804 3075.4417 3 27 1 0.0 48832.06 2.6081188 20.936078174830033 0.05364075290029291 0.0 93.63916 0.7803263 0.0 0.7803263 4 1 1 0.037037037 6.790568 109802 -2.034297610829216 -0.37500644 -0.35820845 0.30232558 0.5880901 0.5815684 604286.9 36628.875 +[+229.1629]-EM[+15.9948]VSPTDSC[+57.0215]VRVSVRDLPQFHVSVVDM[+15.9948]DR rev_sp|Q9HCN3|PGAP6_HUMAN;rev_tr|K4DI83|K4DI83_HUMAN 2 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=39750 1 -1 3924.602 3620.7583 3 29 2 0.0 80537.9 4.2269964 17.954540767022678 0.13827490088740646 0.0 88.40008 0.73666734 0.0 0.73666734 4 1 2 0.06896552 2.1663432 50127 -2.0296029706779146 -0.375757 -0.35820845 0.30232558 0.5880901 0.5815684 1711349.0 6906.8516 +[+229.1629]-K[+229.1629]M[+15.9948]EEDIYTNLSK[+229.1629]METVLGQSMSSLPLSYR sp|Q8WXH0-2|SYNE2_HUMAN;sp|Q8WXH0|SYNE2_HUMAN;tr|A0A0A0MRE3|A0A0A0MRE3_HUMAN;tr|G3V5X4|G3V5X4_HUMAN 4 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=45441 2 1 4205.6133 4053.1077 4 29 2 0.0 36932.02 7.9742827 19.962357128713123 0.0 0.0 101.99851 0.8499876 0.0 0.8499876 4 1 2 0.06896552 2.6182032 65126 -1.9825140292603154 -0.37760013 -0.35820845 0.30232558 0.5880901 0.5815684 1558514.0 15372.994 +[+229.1629]-TC[+57.0215]SK[+229.1629]SQGSWGNREIVIIDTPDMFSWK[+229.1629] sp|Q9UG22|GIMA2_HUMAN 1 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=36758 1 1 3881.789 3728.9263 3 26 2 0.0 40170.414 8.588704 18.776753308950084 2.853361183504054 0.0 81.83095 0.6819246 0.0 0.6819246 4 1 1 0.03846154 2.170038 54463 -2.02115128698497 -0.3785715 -0.35820845 0.30232558 0.5880901 0.5815684 1264436.8 13284.256 +[+229.1629]-M[+15.9948]SLGRAAPSAPGR rev_sp|P51693-2|APLP1_HUMAN;rev_sp|P51693|APLP1_HUMAN;rev_tr|K7EMS1|K7EMS1_HUMAN 3 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=49100 1 -1 1669.267 1514.819 2 13 1 0.0 97012.45 4.073574 20.66450790410668 0.2021918361478079 0.0 109.23304 0.91027534 0.0 0.91027534 5 1 3 0.23076923 1.8854505 176106 -2.684809584132347 -0.37956935 -0.35820845 0.30232558 0.5880901 0.5815684 611105.25 12195.32 +[+229.1629]-C[+57.0215]LIQM[+15.9948]GAAVEAK[+229.1629]AYNGNTALHVAASLQYR tr|H7C5S1|H7C5S1_HUMAN 1 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=37376 1 1 3897.3843 3593.885 3 29 1 0.0 81027.46 5.0039053 21.88178474607965 0.07848479239995854 0.0 83.277466 0.6939789 0.0 0.6939789 4 1 2 0.06896552 2.1495197 58331 -2.045800246831915 -0.37965888 -0.35820845 0.30232558 0.5880901 0.5815684 18796730.0 52520.473 +[+229.1629]-M[+15.9948]EESLNIVK[+229.1629]YTAFLYNDQLIWSGLEQDDMR sp|P86790|CCZ1B_HUMAN;sp|P86791|CCZ1_HUMAN 2 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=41296 1 1 4398.7207 4095.037 3 30 1 0.0 71507.48 3.7571762 22.91659667770412 2.159702635767953 0.0 92.108765 0.76757306 0.0 0.76757306 4 2 2 0.06666667 18.10546 11995 -2.0440490580574484 -0.38045537 -0.35820845 0.30232558 0.5880901 0.5815684 1328658.9 71828.805 +[+229.1629]-LNVEGTERGSC[+57.0215]GRK[+229.1629] sp|O75078-2|ADA11_HUMAN;sp|O75078|ADA11_HUMAN;tr|B4DKD2|B4DKD2_HUMAN;tr|K7EKA8|K7EKA8_HUMAN 4 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=40784 2 1 2174.1533 2020.0887 3 14 2 0.0 73464.8 5.374492 21.842498887625368 0.6170763228642393 0.0 90.874275 0.75728565 0.0 0.75728565 5 3 2 0.14285715 2.8490458 237683 -2.6522210241481585 -0.3812077 -0.35820845 0.30232558 0.5880901 0.5815684 1290087.5 21134.262 +[+229.1629]-C[+57.0215]NRGWTALHESVSR sp|Q96Q27-1|ASB2_HUMAN;sp|Q96Q27|ASB2_HUMAN;tr|G3V2Z2|G3V2Z2_HUMAN;tr|G3V4B2|G3V4B2_HUMAN 4 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=51002 2 1 2055.9688 1900.9526 2 14 1 0.0 78351.875 5.277066 17.823081883875247 0.012034867562086049 0.0 113.98048 0.9498373 0.0 0.9498373 4 1 1 0.071428575 1.2503061 115129 -2.0307522097044646 -0.3828116 -0.35820845 0.30232558 0.5880901 0.5815684 977832.06 5506.2334 +[+229.1629]-AEVDNQMHVVDK[+229.1629]NPVSLVSK[+229.1629]TR rev_sp|O75151|PHF2_HUMAN 1 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=40715 2 -1 3307.599 3152.7583 3 22 2 0.0 47935.68 2.6617033 19.971965322167343 1.5655510246394897 0.0 90.70834 0.7559029 0.0 0.7559029 4 2 1 0.045454547 2.7450855 107384 -2.0235551137874417 -0.38507006 -0.35820845 0.30232558 0.5880901 0.5815684 923512.1 14331.008 +[+229.1629]-YLLSLEEERPALMDDR sp|Q86TB9-2|PATL1_HUMAN;sp|Q86TB9-4|PATL1_HUMAN;sp|Q86TB9|PATL1_HUMAN 3 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=37506 1 1 2331.2417 2178.1194 2 16 0 0.0 67913.086 2.5317562 19.997613788592076 0.39086524401945155 0.0 83.542175 0.6961848 0.0 0.6961848 4 1 2 0.125 4.0383697 80445 -2.062325498085077 -0.38619247 -0.35820845 0.30232558 0.5880901 0.5815684 3893642.5 14758.541 +[+229.1629]-EGRGAGSQSPPRGR sp|Q6ZSN1|YI023_HUMAN 1 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=45427 1 1 1942.9047 1639.8704 2 14 2 0.0 169161.78 4.145797 19.229664162247772 0.4602391019734071 0.0 101.96355 0.8496962 0.0 0.8496962 4 1 1 0.071428575 4.303446 136956 -2.026177700336816 -0.3904131 -0.35820845 0.30232558 0.5880901 0.5815684 993124.44 14842.607 +[+229.1629]-TASASRRSAR sp|P08729|K2C7_HUMAN 1 GN20170722_SK_HLA_G0103_R1_01.mzML controllerType=0 controllerNumber=1 scan=30700 1 1 1444.0938 1290.7319 2 10 2 0.0 112154.734 2.7423766 19.376349012983994 0.42494292662552624 0.0 67.56542 0.5630452 0.0 0.5630452 4 1 2 0.2 4.1968794 97885 -2.029718921235703 -0.3916049 -0.35820845 0.30232558 0.5880901 0.5815684 266738.5 11889.021 diff --git a/tests/unit_tests/test_sage.py b/tests/unit_tests/test_sage.py index 9faf7e7..f571923 100644 --- a/tests/unit_tests/test_sage.py +++ b/tests/unit_tests/test_sage.py @@ -17,3 +17,13 @@ def test_read_sage(self): ) expected_df = pd.read_csv(expected_sage_internal_path) pd.testing.assert_frame_equal(internal_search_results_df, expected_df) + + def test_read_sage_custom(self): + """Test function for reading sage results with custom mods and transforming to Prosit format .""" + stat_mods = {"15.9948": "[UNIMOD:35]"} + expected_sage_internal_path = Path.cwd() / "data" / "sage_output_internal_mods.csv" + internal_search_results_df = ( + Sage(Path.cwd() / "data" / "sage_output_mods.tsv").read_result(stat_mods=stat_mods).reset_index(drop=True) + ) + expected_df = pd.read_csv(expected_sage_internal_path) + pd.testing.assert_frame_equal(internal_search_results_df, expected_df) From 1368743c3427919b71ed0f0638f82c4727e17abe Mon Sep 17 00:00:00 2001 From: Fabian Basso Date: Sun, 28 Jul 2024 15:16:34 +0000 Subject: [PATCH 14/31] updated searchresults & msfragger --- spectrum_io/search_result/msfragger.py | 6 +++--- spectrum_io/search_result/search_results.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/spectrum_io/search_result/msfragger.py b/spectrum_io/search_result/msfragger.py index 968380e..df98d79 100644 --- a/spectrum_io/search_result/msfragger.py +++ b/spectrum_io/search_result/msfragger.py @@ -5,7 +5,7 @@ import pandas as pd import spectrum_fundamentals.constants as c from pyteomics import pepxml -from spectrum_fundamentals.mod_string import internal_without_mods, msfragger_or_custom_to_internal +from spectrum_fundamentals.mod_string import internal_without_mods, msfragger_to_internal from spectrum_fundamentals.constants import MSFRAGGER_VAR_MODS from tqdm import tqdm @@ -69,13 +69,13 @@ def update_columns_for_prosit(df, tmt_labeled: str, stat_mods: Optional[Dict[str unimod_tag = c.TMT_MODS[tmt_labeled] logger.info("Adding TMT fixed modifications") mods = {**{"C": "C[UNIMOD:4]", r"n[\d+]": f"{unimod_tag}-", "K": f"K{unimod_tag}"}, **mods} - df["MODIFIED_SEQUENCE"] = msfragger_or_custom_to_internal( + df["MODIFIED_SEQUENCE"] = msfragger_to_internal( df["modified_peptide"].to_list(), mods=mods) else: #By default, i.e. if nothing is supplied to fixed_mods, carbamidomethylation on cystein will be included # in the fixed modifications. If you want to have no fixed modifictions at all, supply fixed_mods={} mods = {**{"C": "C[UNIMOD:4]"}, **mods} - df["MODIFIED_SEQUENCE"] = msfragger_or_custom_to_internal(df["modified_peptide"].to_list(), mods=mods) + df["MODIFIED_SEQUENCE"] = msfragger_to_internal(df["modified_peptide"].to_list(), mods=mods) df.rename( columns={ diff --git a/spectrum_io/search_result/search_results.py b/spectrum_io/search_result/search_results.py index ead4234..9bccdfc 100644 --- a/spectrum_io/search_result/search_results.py +++ b/spectrum_io/search_result/search_results.py @@ -3,7 +3,6 @@ from abc import abstractmethod from pathlib import Path from typing import Optional, Union, Dict, Tuple -from spectrum_fundamentals.constants import update_custom_mods import pandas as pd From 9143d1d85ef4e5cef65006cb1a1fc76a6e6bbbdb Mon Sep 17 00:00:00 2001 From: Fabian Basso Date: Wed, 31 Jul 2024 12:02:07 +0000 Subject: [PATCH 15/31] tests pased spectrum_io --- spectrum_io/search_result/mascot.py | 34 ++-- spectrum_io/search_result/maxquant.py | 53 +++--- spectrum_io/search_result/msfragger.py | 35 ++-- spectrum_io/search_result/sage.py | 27 ++- spectrum_io/search_result/search_results.py | 30 +-- spectrum_io/search_result/xisearch.py | 10 +- spectrum_io/spectral_library/dlib.py | 9 +- spectrum_io/spectral_library/msp.py | 5 +- .../spectral_library/spectral_library.py | 13 +- spectrum_io/spectral_library/spectronaut.py | 5 +- tests/unit_tests/data/psm_mods.pepXML | 175 ++++++++++++++++++ .../unit_tests/data/psm_tmt_internal_mods.csv | 5 + tests/unit_tests/test_msfragger.py | 17 +- 13 files changed, 334 insertions(+), 84 deletions(-) create mode 100644 tests/unit_tests/data/psm_mods.pepXML create mode 100644 tests/unit_tests/data/psm_tmt_internal_mods.csv diff --git a/spectrum_io/search_result/mascot.py b/spectrum_io/search_result/mascot.py index e3f7adc..7e6f2eb 100644 --- a/spectrum_io/search_result/mascot.py +++ b/spectrum_io/search_result/mascot.py @@ -2,11 +2,11 @@ import re import sqlite3 from pathlib import Path -from typing import Optional, Union, Dict, Tuple +from typing import Dict, Optional, Tuple, Union import pandas as pd import spectrum_fundamentals.constants as c -from spectrum_fundamentals.mod_string import internal_without_mods, custom_regex_escape +from spectrum_fundamentals.mod_string import custom_regex_escape, internal_without_mods from .search_results import SearchResults, filter_valid_prosit_sequences @@ -16,14 +16,16 @@ class Mascot(SearchResults): """Handle search results from Mascot.""" - def read_result(self, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, - var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: + def read_result( + self, + tmt_labeled: str, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + ) -> pd.DataFrame: """ Function to read a mascot msf file and perform some basic formatting. :param tmt_labeled: tmt label as str - :param var_mods: dict with custom variable identifier and respecitve internal equivalent - :param stat_mods: dict with custom static identifier and respecitve internal equivalent + :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass :return: pd.DataFrame with the formatted data """ logger.info("Reading mascot msf file") @@ -78,10 +80,10 @@ def read_result(self, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = No ["SCAN_NUMBER", "PRECURSOR_CHARGE", "SCORE", "RAW_FILE", "SEQUENCE", "REVERSE"], as_index=False, ).agg({"MODIFICATIONS": "|".join}) - MOD_MASSES = c.update_mod_masses() - mod_masses_reverse = {round(float(v), 3): k for k, v in MOD_MASSES.items()} - - def find_replacement(match: re.Match, sequence: str) -> str: + mod_masses = c.update_mod_masses() + mod_masses_reverse = {round(float(v), 3): k for k, v in mod_masses.items()} + + def find_replacement(match: re.Match) -> str: """ Subfunction to find the corresponding substitution for a match. @@ -90,7 +92,13 @@ def find_replacement(match: re.Match, sequence: str) -> str: """ key = match.string[match.start() : match.end()] return mods[key] - + + stat_mods: Dict[str, str] = {} + var_mods: Dict[str, str] = {} + + if custom_mods is not None: + stat_mods = {key: value[0] for key, value in (custom_mods.get("stat_mods") or {}).items()} + var_mods = {key: value[0] for key, value in (custom_mods.get("var_mods") or {}).items()} mods = {} @@ -107,11 +115,11 @@ def find_replacement(match: re.Match, sequence: str) -> str: modifications = row["MODIFICATIONS"].split("|") sequence = row["SEQUENCE"] if mods: - sequence = regex.sub(lambda match: find_replacement(match, sequence), sequence) + sequence = regex.sub(lambda match: find_replacement(match), sequence) if len(modifications) == 0: sequences.append(sequence) - else: + else: skip = 0 for mod in modifications: pos, mass = mod.split("$") diff --git a/spectrum_io/search_result/maxquant.py b/spectrum_io/search_result/maxquant.py index 2180979..410102e 100644 --- a/spectrum_io/search_result/maxquant.py +++ b/spectrum_io/search_result/maxquant.py @@ -1,11 +1,10 @@ import logging from pathlib import Path -from typing import Optional, Union, Dict, Tuple +from typing import Dict, Optional, Tuple, Union import pandas as pd import spectrum_fundamentals.constants as c from spectrum_fundamentals.mod_string import internal_without_mods, maxquant_to_internal -from spectrum_fundamentals.constants import MAXQUANT_VAR_MODS from .search_results import SearchResults, filter_valid_prosit_sequences @@ -42,14 +41,16 @@ def add_tmt_mod(mass: float, seq: str, unimod_tag: str) -> float: mass += num_of_tmt * c.MOD_MASSES[f"{unimod_tag}"] return mass - def read_result(self, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, - var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: + def read_result( + self, + tmt_labeled: str, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + ) -> pd.DataFrame: """ Function to read a msms txt and perform some basic formatting. :param tmt_labeled: tmt label as str - :param var_mods: dict with custom variable identifier and respecitve internal equivalent - :param stat_mods: dict with custom static identifier and respecitve internal equivalent + :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass :return: pd.DataFrame with the formatted data """ logger.info("Reading msms.txt file") @@ -76,24 +77,35 @@ def read_result(self, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = No df.columns = df.columns.str.upper() df.columns = df.columns.str.replace(" ", "_") + stat_mods: Dict[str, str] = {} + var_mods: Dict[str, str] = {} + + if custom_mods is not None: + stat_mods = {key: value[0] for key, value in (custom_mods.get("stat_mods") or {}).items()} + var_mods = {key: value[0] for key, value in (custom_mods.get("var_mods") or {}).items()} + df = MaxQuant.update_columns_for_prosit(df, tmt_labeled, stat_mods, var_mods) return filter_valid_prosit_sequences(df) @staticmethod - def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, - var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: + def update_columns_for_prosit( + df: pd.DataFrame, + tmt_labeled: str, + stat_mods: Optional[Dict[str, str]] = None, + var_mods: Optional[Dict[str, str]] = None, + ) -> pd.DataFrame: """ Update columns of df to work with Prosit. :param df: df to modify :param tmt_labeled: True if tmt labeled - :param var_mods: dict with custom variable identifier and respecitve internal equivalent + :param var_mods: dict with custom variable identifier and respecitve internal equivalent :param stat_mods: dict with custom static identifier and respecitve internal equivalent :return: modified df as pd.DataFrame """ df.rename(columns={"CHARGE": "PRECURSOR_CHARGE"}, inplace=True) - mods = {**(MAXQUANT_VAR_MODS), **(stat_mods or {}), **(var_mods or {})} + mods = {**(c.MAXQUANT_VAR_MODS), **(stat_mods or {}), **(var_mods or {})} df["REVERSE"].fillna(False, inplace=True) df["REVERSE"].replace("+", True, inplace=True) @@ -102,33 +114,32 @@ def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str, stat_mods: Opt unimod_tag = c.TMT_MODS[tmt_labeled] logger.info("Adding TMT fixed modifications") df["MODIFIED_SEQUENCE"] = maxquant_to_internal( - df["MODIFIED_SEQUENCE"].to_numpy(), mods= - {**{"C": "C[UNIMOD:4]", "^_": f"_{unimod_tag}-", "K": f"K{unimod_tag}"}, **mods} - ) + df["MODIFIED_SEQUENCE"].to_numpy(), + mods={**{"C": "C[UNIMOD:4]", "^_": f"_{unimod_tag}-", "K": f"K{unimod_tag}"}, **mods}, + ) df["MASS"] = df.apply(lambda x: MaxQuant.add_tmt_mod(x.MASS, x.MODIFIED_SEQUENCE, unimod_tag), axis=1) if "msa" in tmt_labeled: logger.info("Replacing phospho by dehydration for Phospho-MSA") df["MODIFIED_SEQUENCE_MSA"] = df["MODIFIED_SEQUENCE"].str.replace( "[UNIMOD:21]", "[UNIMOD:23]", regex=False ) - fixed_mods = {"C": "C[UNIMOD:4]"} elif "LABELING_STATE" in df.columns: logger.info("Adding SILAC fixed modifications") - + df.loc[df["LABELING_STATE"] == 1, "MODIFIED_SEQUENCE"] = maxquant_to_internal( - df[df["LABELING_STATE"] == 1]["MODIFIED_SEQUENCE"].to_numpy(), mods = - {**{"C": "C[UNIMOD:4]", "K": "K[UNIMOD:259]", "R": "R[UNIMOD:267]"}, **mods} + df[df["LABELING_STATE"] == 1]["MODIFIED_SEQUENCE"].to_numpy(), + mods={**{"C": "C[UNIMOD:4]", "K": "K[UNIMOD:259]", "R": "R[UNIMOD:267]"}, **mods}, ) df.loc[df["LABELING_STATE"] != 1, "MODIFIED_SEQUENCE"] = maxquant_to_internal( - df[df["LABELING_STATE"] != 1]["MODIFIED_SEQUENCE"].to_numpy(), mods= - {**{"C": "C[UNIMOD:4]"}, **mods} + df[df["LABELING_STATE"] != 1]["MODIFIED_SEQUENCE"].to_numpy(), mods={**{"C": "C[UNIMOD:4]"}, **mods} ) df["MASS"] = df.apply(lambda x: MaxQuant.add_tmt_mod(x.MASS, x.MODIFIED_SEQUENCE, "[UNIMOD:259]"), axis=1) df["MASS"] = df.apply(lambda x: MaxQuant.add_tmt_mod(x.MASS, x.MODIFIED_SEQUENCE, "[UNIMOD:267]"), axis=1) df.drop(columns=["LABELING_STATE"], inplace=True) else: - df["MODIFIED_SEQUENCE"] = maxquant_to_internal(df["MODIFIED_SEQUENCE"].to_numpy(), mods= - {**{"C": "C[UNIMOD:4]"}, **mods}) + df["MODIFIED_SEQUENCE"] = maxquant_to_internal( + df["MODIFIED_SEQUENCE"].to_numpy(), mods={**{"C": "C[UNIMOD:4]"}, **mods} + ) df["SEQUENCE"] = internal_without_mods(df["MODIFIED_SEQUENCE"]) df["PEPTIDE_LENGTH"] = df["SEQUENCE"].apply(lambda x: len(x)) df["PROTEINS"].fillna("UNKNOWN", inplace=True) diff --git a/spectrum_io/search_result/msfragger.py b/spectrum_io/search_result/msfragger.py index df98d79..3911700 100644 --- a/spectrum_io/search_result/msfragger.py +++ b/spectrum_io/search_result/msfragger.py @@ -1,12 +1,12 @@ import logging from pathlib import Path -from typing import Optional, Union, Dict, Tuple +from typing import Dict, Optional, Tuple, Union import pandas as pd import spectrum_fundamentals.constants as c from pyteomics import pepxml -from spectrum_fundamentals.mod_string import internal_without_mods, msfragger_to_internal from spectrum_fundamentals.constants import MSFRAGGER_VAR_MODS +from spectrum_fundamentals.mod_string import internal_without_mods, msfragger_to_internal from tqdm import tqdm from .search_results import SearchResults, filter_valid_prosit_sequences @@ -17,14 +17,17 @@ class MSFragger(SearchResults): """Handle search results from MSFragger.""" - def read_result(self, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, - var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: + def read_result( + self, + tmt_labeled: str, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + ) -> pd.DataFrame: """ Function to read a msms txt and perform some basic formatting. :param tmt_labeled: tmt label as str - :param var_mods: dict with custom variable identifier and respecitve internal equivalent - :param stat_mods: dict with custom static identifier and respecitve internal equivalent:raises FileNotFoundError: in case the given path is neither a file, nor a directory. + :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass + :raises FileNotFoundError: in case the given path is neither a file, nor a directory. :return: pd.DataFrame with the formatted data """ if self.path.is_file(): @@ -40,18 +43,26 @@ def read_result(self, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = No df = pd.concat(ms_frag_results) + stat_mods: Dict[str, str] = {} + var_mods: Dict[str, str] = {} + + if custom_mods is not None: + stat_mods = {key: value[0] for key, value in (custom_mods.get("stat_mods") or {}).items()} + var_mods = {key: value[0] for key, value in (custom_mods.get("var_mods") or {}).items()} + df = update_columns_for_prosit(df, tmt_labeled, stat_mods=stat_mods, var_mods=var_mods) return filter_valid_prosit_sequences(df) -def update_columns_for_prosit(df, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, - var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: +def update_columns_for_prosit( + df, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, var_mods: Optional[Dict[str, str]] = None +) -> pd.DataFrame: """ Update columns of df to work with Prosit. :param df: df to modify :param tmt_labeled: True if tmt labeled - :param var_mods: dict with custom variable identifier and respecitve internal equivalent + :param var_mods: dict with custom variable identifier and respecitve internal equivalent :param stat_mods: dict with custom static identifier and respecitve internal equivalent :return: modified df as pd.DataFrame """ @@ -64,15 +75,13 @@ def update_columns_for_prosit(df, tmt_labeled: str, stat_mods: Optional[Dict[str mods = {**(MSFRAGGER_VAR_MODS), **(stat_mods or {}), **(var_mods or {})} - if tmt_labeled != "": unimod_tag = c.TMT_MODS[tmt_labeled] logger.info("Adding TMT fixed modifications") mods = {**{"C": "C[UNIMOD:4]", r"n[\d+]": f"{unimod_tag}-", "K": f"K{unimod_tag}"}, **mods} - df["MODIFIED_SEQUENCE"] = msfragger_to_internal( - df["modified_peptide"].to_list(), mods=mods) + df["MODIFIED_SEQUENCE"] = msfragger_to_internal(df["modified_peptide"].to_list(), mods=mods) else: - #By default, i.e. if nothing is supplied to fixed_mods, carbamidomethylation on cystein will be included + # By default, i.e. if nothing is supplied to fixed_mods, carbamidomethylation on cystein will be included # in the fixed modifications. If you want to have no fixed modifictions at all, supply fixed_mods={} mods = {**{"C": "C[UNIMOD:4]"}, **mods} df["MODIFIED_SEQUENCE"] = msfragger_to_internal(df["modified_peptide"].to_list(), mods=mods) diff --git a/spectrum_io/search_result/sage.py b/spectrum_io/search_result/sage.py index 10be092..50438b9 100644 --- a/spectrum_io/search_result/sage.py +++ b/spectrum_io/search_result/sage.py @@ -1,6 +1,6 @@ import logging from pathlib import Path -from typing import Optional, Union, Dict, Tuple +from typing import Dict, Optional, Tuple, Union import pandas as pd from spectrum_fundamentals.constants import MOD_MASSES_SAGE @@ -14,14 +14,16 @@ class Sage(SearchResults): """Handle search results from Sage.""" - def read_result(self, tmt_labeled: str = "", stat_mods: Optional[Dict[str, str]] = None, - var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: + def read_result( + self, + tmt_labeled: str = "", + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + ) -> pd.DataFrame: """ Function to read a msms tsv and perform some basic formatting. :param tmt_labeled: tmt label as str - :param var_mods: Variable modifications with custom identifiers and their respective internal equivalents - :param stat_mods: Static modifications with custom identifiers and their respective internal equivalents + :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass :return: pd.DataFrame with the formatted data """ logger.info(f"Reading {self.path}") @@ -36,12 +38,23 @@ def read_result(self, tmt_labeled: str = "", stat_mods: Optional[Dict[str, str]] df.columns = df.columns.str.upper() df.columns = df.columns.str.replace(" ", "_") + stat_mods: Dict[str, str] = {} + var_mods: Dict[str, str] = {} + + if custom_mods is not None: + stat_mods = {key: value[0] for key, value in (custom_mods.get("stat_mods") or {}).items()} + var_mods = {key: value[0] for key, value in (custom_mods.get("var_mods") or {}).items()} + df = Sage.update_columns_for_prosit(df, tmt_labeled, stat_mods=stat_mods, var_mods=var_mods) return filter_valid_prosit_sequences(df) @staticmethod - def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, - var_mods: Optional[Dict[str, str]] = None) -> pd.DataFrame: + def update_columns_for_prosit( + df: pd.DataFrame, + tmt_labeled: str, + stat_mods: Optional[Dict[str, str]] = None, + var_mods: Optional[Dict[str, str]] = None, + ) -> pd.DataFrame: """ Update columns of df to work with Prosit. diff --git a/spectrum_io/search_result/search_results.py b/spectrum_io/search_result/search_results.py index 9bccdfc..0d9c476 100644 --- a/spectrum_io/search_result/search_results.py +++ b/spectrum_io/search_result/search_results.py @@ -2,7 +2,7 @@ import re from abc import abstractmethod from pathlib import Path -from typing import Optional, Union, Dict, Tuple +from typing import Dict, Optional, Tuple, Union import pandas as pd @@ -51,33 +51,35 @@ def __init__(self, path: Union[str, Path]): self.path = path @abstractmethod - def read_result(self, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, - var_mods: Optional[Dict[str, str]] = None): + def read_result( + self, + tmt_labeled: str, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + ): """Read result. :param tmt_labeled: tmt label as str - :param var_mods: variable modifications with custom identifier and respecitve internal equivalent - :param stat_mods: static modifications with custom identifier and respecitve internal equivalent - + :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass """ raise NotImplementedError - def generate_internal(self, tmt_labeled: str, out_path: Optional[Union[str, Path]] = None, custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None) -> pd.DataFrame: + def generate_internal( + self, + tmt_labeled: str, + out_path: Optional[Union[str, Path]] = None, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + ) -> pd.DataFrame: """ Generate df and save to out_path if provided. :param out_path: path to output :param tmt_labeled: tmt label as str :param custom_mods: dict with static and variable custom modifications, their internal identifier and mass - :raises AssertionError: if custom modification with illegal mass was provided :return: path to output file """ - stat_mods: Dict[str, str] = {key: value[0] for key, value in (custom_mods.get("stat_mods") or {}).items()} - var_mods: Dict[str, str] = {key: value[0] for key, value in (custom_mods.get("var_mods") or {}).items()} - if out_path is None: # convert and return - return self.read_result(tmt_labeled, stat_mods=stat_mods, var_mods=var_mods) + return self.read_result(tmt_labeled, custom_mods=custom_mods) if isinstance(out_path, str): out_path = Path(out_path) @@ -85,11 +87,11 @@ def generate_internal(self, tmt_labeled: str, out_path: Optional[Union[str, Path if out_path.is_file(): # only read converted and return logger.info(f"Found search results in internal format at {out_path}, skipping conversion") - #TODO: internal_to_unimod + # TODO: internal_to_unimod return csv.read_file(out_path) # convert, save and return - df = self.read_result(tmt_labeled, stat_mods=stat_mods, var_mods=var_mods) + df = self.read_result(tmt_labeled, custom_mods=custom_mods) csv.write_file(df, out_path) return df diff --git a/spectrum_io/search_result/xisearch.py b/spectrum_io/search_result/xisearch.py index 5e1bbd9..ffeb5ef 100644 --- a/spectrum_io/search_result/xisearch.py +++ b/spectrum_io/search_result/xisearch.py @@ -3,9 +3,8 @@ import os import re from pathlib import Path -from typing import Union +from typing import Dict, Optional, Tuple, Union -import numpy as np import pandas as pd import spectrum_fundamentals.constants as c from spectrum_fundamentals.mod_string import xisearch_to_internal @@ -18,11 +17,16 @@ class Xisearch(SearchResults): """Handle search results from xisearch.""" - def read_result(self, tmt_labeled: str = "") -> pd.DataFrame: + def read_result( + self, + tmt_labeled: str = "", + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + ) -> pd.DataFrame: """ Function to read a csv of CSMs and perform some basic formatting. :param tmt_labeled: tmt label as str + :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass :raises NotImplementedError: if a tmt label is provided :return: pd.DataFrame with the formatted data """ diff --git a/spectrum_io/spectral_library/dlib.py b/spectrum_io/spectral_library/dlib.py index 703926f..ba9558c 100644 --- a/spectrum_io/spectral_library/dlib.py +++ b/spectrum_io/spectral_library/dlib.py @@ -1,7 +1,7 @@ import sqlite3 import zlib from pathlib import Path -from typing import IO, Dict, Union +from typing import IO, Dict, Union, Tuple, Optional import numpy as np import pandas as pd @@ -125,12 +125,13 @@ def _create_database(conn: sqlite3.Connection): c.execute(sql_insert_meta, ["staleProteinMapping", "true"]) conn.commit() - def _write(self, out: Union[IO, sqlite3.Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame): + def _write(self, out: Union[IO, sqlite3.Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None): if isinstance(out, IO): raise TypeError("Not supported. Use msp/spectronaut if you want to write a text file.") seqs = metadata["SEQUENCE"] - modseqs = metadata["MODIFIED_SEQUENCE"] - mass_mod_sequences = internal_to_mod_mass(modseqs) + modseqs = metadata["MODIFIED_SEQUENCE"] + mass_mod_sequences = internal_to_mod_mass(modseqs, custom_mods) p_charges = metadata["PRECURSOR_CHARGE"] p_mzs = (metadata["MASS"] + (p_charges * PARTICLE_MASSES["PROTON"])) / p_charges diff --git a/spectrum_io/spectral_library/msp.py b/spectrum_io/spectral_library/msp.py index ffe42b4..1412375 100644 --- a/spectrum_io/spectral_library/msp.py +++ b/spectrum_io/spectral_library/msp.py @@ -1,5 +1,5 @@ from sqlite3 import Connection -from typing import IO, Dict, Union +from typing import IO, Dict, Union, Tuple, Optional import numpy as np import pandas as pd @@ -17,7 +17,8 @@ def _assemble_fragment_string(f_mz: float, f_int: float, f_a: bytes): annot = f_a[:-2].decode() if f_a.endswith(b"1") else f_a.replace(b"+", b"^").decode() return f'{f_mz:.8f}\t{f_int:.4f}\t"{annot}/0.0ppm"\n' - def _write(self, out: Union[IO, Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame): + def _write(self, out: Union[IO, Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None): # prepare metadata if isinstance(out, Connection): raise TypeError("Not supported. Use DLib if you want to write a database file.") diff --git a/spectrum_io/spectral_library/spectral_library.py b/spectrum_io/spectral_library/spectral_library.py index 1d8bbc9..b037c14 100644 --- a/spectrum_io/spectral_library/spectral_library.py +++ b/spectrum_io/spectral_library/spectral_library.py @@ -3,7 +3,7 @@ from multiprocessing.managers import ValueProxy from pathlib import Path from sqlite3 import Connection -from typing import IO, Dict, Optional, Union +from typing import IO, Dict, Optional, Union, Tuple import numpy as np import pandas as pd @@ -52,12 +52,14 @@ def write(self, *args, **kwargs): def _get_handle(self): return open(self.out_path, self.mode) - def async_write(self, queue: Queue, progress: ValueProxy): + def async_write(self, queue: Queue, progress: ValueProxy, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None): """ Asynchronously write content to the output file from a queue. :param queue: A queue from which content will be retrieved for writing. :param progress: An integer value representing the progress of the writing process. + :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass """ with self._get_handle() as out: self._initialize(out) @@ -65,7 +67,7 @@ def async_write(self, queue: Queue, progress: ValueProxy): content = queue.get() if content is None: break - self._write(out, *content) + self._write(out, *content, custom_mods=custom_mods) progress.value += 1 def _fragment_filter_passed( @@ -86,7 +88,8 @@ def _fragment_filter_passed( return (f_mz != -1) & (f_int >= self.min_intensity_threshold) @abstractmethod - def _write(self, out: Union[IO, Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame): + def _write(self, out: Union[IO, Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None): """ Internal writer function. @@ -97,6 +100,8 @@ def _write(self, out: Union[IO, Connection], data: Dict[str, np.ndarray], metada :param out: file handle accepting the data to be written to disk :param data: Dictionary containing TODO keys and corresponding values as numpy array :param metadata: a dataframe that contains the columns TODO + :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass + """ pass diff --git a/spectrum_io/spectral_library/spectronaut.py b/spectrum_io/spectral_library/spectronaut.py index 4adb612..c4632f3 100644 --- a/spectrum_io/spectral_library/spectronaut.py +++ b/spectrum_io/spectral_library/spectronaut.py @@ -2,7 +2,7 @@ import re from itertools import chain, cycle from sqlite3 import Connection -from typing import IO, Dict, Tuple, Union +from typing import IO, Dict, Tuple, Union, Optional import numpy as np import pandas as pd @@ -26,7 +26,8 @@ def _assemble_fragment_string(f_int: float, f_mz: float, f_annot: bytes): f"{f_int:.4f},{f_mz:.8f},{m.group(2)},{m.group(1)},{m.group(3)},{m.group(4) if m.group(4) else 'noloss'}\n" ) - def _write(self, out: Union[IO, Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame): + def _write(self, out: Union[IO, Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None): # prepare metadata if isinstance(out, Connection): raise TypeError("Not supported. Use DLib if you want to write a database file.") diff --git a/tests/unit_tests/data/psm_mods.pepXML b/tests/unit_tests/data/psm_mods.pepXML new file mode 100644 index 0000000..b2a5ca5 --- /dev/null +++ b/tests/unit_tests/data/psm_mods.pepXML @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/unit_tests/data/psm_tmt_internal_mods.csv b/tests/unit_tests/data/psm_tmt_internal_mods.csv new file mode 100644 index 0000000..166040e --- /dev/null +++ b/tests/unit_tests/data/psm_tmt_internal_mods.csv @@ -0,0 +1,5 @@ +,RAW_FILE,SCAN_NUMBER,MODIFIED_SEQUENCE,PRECURSOR_CHARGE,SCAN_EVENT_NUMBER,MASS,SCORE,REVERSE,SEQUENCE,PEPTIDE_LENGTH,PROTEINS +0,Ecl1_0277_R0096-01_S004436_D_H01_TMT18_01,2459,[UNIMOD:2016]-GQAVLAFQEQVGTGR,5,34,1863.023,8.221,True,GQAVLAFQEQVGTGR,15,rev_tr|E9Q8J5|E9Q8J5_MOUSE +1,Ecl1_0277_R0096-01_S004436_D_H01_TMT18_01,2486,[UNIMOD:2016]-TEVPM[UNIMOD:35]GLSLRTTSAR,5,42,1937.0531,7.083,False,TEVPMGLSLRTTSAR,15,tr|A0A0N4SW17|A0A0N4SW17_MOUSE +2,Ecl1_0277_R0096-01_S004436_D_H01_TMT18_01,2980,[UNIMOD:2016]-YSGN[UNIMOD:41]C[UNIMOD:4]DRQSVER,3,193,1773.8123,3.932,False,YSGNCDRQSVER,12,sp|Q9D413-2|SH2D6_MOUSE;sp|Q9D413|SH2D6_MOUSE;tr|A0A3Q4EBW9|A0A3Q4EBW9_MOUSE;tr|A0A3Q4ECA8|A0A3Q4ECA8_MOUSE;tr|A0A3Q4EGG3|A0A3Q4EGG3_MOUSE;tr|E0CYY5|E0CYY5_MOUSE;tr|E9QJU1|E9QJU1_MOUSE +3,Ecl1_0277_R0096-01_S004436_D_H01_TMT18_01,3945,[UNIMOD:2016]-ESTK[UNIMOD:2016]SAAER,3,647,1586.8887,10.839,True,ESTKSAAER,9,rev_sp|Q3TLH4-5|PRC2C_MOUSE;rev_sp|Q3TLH4|PRC2C_MOUSE;rev_tr|A0A0A0MQ79|A0A0A0MQ79_MOUSE;rev_tr|S4R209|S4R209_MOUSE;rev_tr|S4R294|S4R294_MOUSE;rev_tr|S4R2J9|S4R2J9_MOUSE diff --git a/tests/unit_tests/test_msfragger.py b/tests/unit_tests/test_msfragger.py index 2eac2b7..86be885 100644 --- a/tests/unit_tests/test_msfragger.py +++ b/tests/unit_tests/test_msfragger.py @@ -27,7 +27,7 @@ def test_read_result(self): self.assertTrue("PROTEINS" in df.columns) def test_read_msfragger(self): - """Test function for reading sage results and transforming to Prosit format.""" + """Test function for reading msfragger results and transforming to Prosit format.""" expected_msfragger_internal_path = Path(__file__).parent / "data" / "psm_tmt_internal.csv" internal_search_results_df = MSFragger(Path(__file__).parent / "data" / "psm_tmt.pepXML").read_result( @@ -38,3 +38,18 @@ def test_read_msfragger(self): print("Expected Columns:", expected_df.columns) pd.testing.assert_frame_equal(internal_search_results_df, expected_df) + + def test_read_msfragger_mods(self): + """Test function for reading msfragger results and transforming to Prosit format with custom mods.""" + expected_msfragger_internal_path = Path(__file__).parent / "data" / "psm_tmt_internal_mods.csv" + stat_mod = {"M[35]": "[UNIMOD:35]"} + var_mod = {"[41]": "[UNIMOD:41]"} + + internal_search_results_df = MSFragger(Path(__file__).parent / "data" / "psm_mods.pepXML").read_result( + tmt_labeled="tmtpro", stat_mods=stat_mod, var_mods=var_mod + ) + expected_df = pd.read_csv(expected_msfragger_internal_path, index_col=0) + print("Internal Search Results Columns:", internal_search_results_df.columns) + print("Expected Columns:", expected_df.columns) + + pd.testing.assert_frame_equal(internal_search_results_df, expected_df) From a192686258778e5e62e4487e70143e3cd566fc56 Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Wed, 31 Jul 2024 21:29:00 +0200 Subject: [PATCH 16/31] fix links --- README.rst | 4 ++-- ReadMe.md | 14 +++++++------- docs/_key_contributors.rst | 33 ++++++++++++++++++++++----------- docs/contributing.rst | 2 +- pyproject.toml | 2 +- 5 files changed, 33 insertions(+), 22 deletions(-) diff --git a/README.rst b/README.rst index 30d49e5..211c412 100644 --- a/README.rst +++ b/README.rst @@ -13,8 +13,8 @@ Spectrum-IO: File / Data Conversion for Mass Spec data within the Oktoberfest ec :target: https://opensource.org/licenses/MIT :alt: License .. |Read the Docs| image:: https://img.shields.io/readthedocs/spectrum_io/latest.svg?label=Read%20the%20Docs - :target: https://spectrum_io.readthedocs.io/ - :alt: Read the documentation at https://spectrum_io.readthedocs.io/ + :target: https://spectrum-io.readthedocs.io/ + :alt: Read the documentation at https://spectrum-io.readthedocs.io/ .. |Build| image:: https://github.com/wilhelm-lab/spectrum_io/workflows/Build%20spectrum_io%20Package/badge.svg :target: https://github.com/wilhelm-lab/spectrum_io/actions?workflow=Package :alt: Build Package Status diff --git a/ReadMe.md b/ReadMe.md index 429aed4..cec3896 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,10 +1,10 @@ -[![PyPI](https://img.shields.io/pypi/v/oktoberfest.svg)](https://pypi.org/project/oktoberfest/) -[![Python Version](https://img.shields.io/pypi/pyversions/oktoberfest)](https://pypi.org/project/oktoberfest) -[![License](https://img.shields.io/github/license/wilhelm-lab/oktoberfest)](https://opensource.org/licenses/MIT) -[![Read the Docs](https://img.shields.io/readthedocs/oktoberfest/latest.svg?label=Read%20the%20Docs)](https://oktoberfest.readthedocs.io/) -[![Build](https://github.com/wilhelm-lab/oktoberfest/workflows/Build%20oktoberfest%20Package/badge.svg)](https://github.com/wilhelm-lab/oktoberfest/actions?workflow=Package) -[![Tests](https://github.com/wilhelm-lab/oktoberfest/workflows/Run%20oktoberfest%20Tests/badge.svg)](https://github.com/wilhelm-lab/oktoberfest/actions?workflow=Tests) -[![Codecov](https://codecov.io/gh/wilhelm-lab/oktoberfest/branch/main/graph/badge.svg)](https://codecov.io/gh/wilhelm-lab/oktoberfest) +[![PyPI](https://img.shields.io/pypi/v/spectrum_io.svg)](https://pypi.org/project/spectrum_io/) +[![Python Version](https://img.shields.io/pypi/pyversions/spectrum_io)](https://pypi.org/project/spectrum_io) +[![License](https://img.shields.io/github/license/wilhelm-lab/spectrum_io)](https://opensource.org/licenses/MIT) +[![Read the Docs](https://img.shields.io/readthedocs/spectrum_io/latest.svg?label=Read%20the%20Docs)](https://spectrum-io.readthedocs.io/) +[![Build](https://github.com/wilhelm-lab/spectrum_io/workflows/Build%20spectrum_io%20Package/badge.svg)](https://github.com/wilhelm-lab/spectrum_io/actions?workflow=Package) +[![Tests](https://github.com/wilhelm-lab/spectrum_io/workflows/Run%20spectrum_io%20Tests/badge.svg)](https://github.com/wilhelm-lab/spectrum_io/actions?workflow=Tests) +[![Codecov](https://codecov.io/gh/wilhelm-lab/spectrum_io/branch/main/graph/badge.svg)](https://codecov.io/gh/wilhelm-lab/spectrum_io) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) diff --git a/docs/_key_contributors.rst b/docs/_key_contributors.rst index 94a0269..4b589da 100644 --- a/docs/_key_contributors.rst +++ b/docs/_key_contributors.rst @@ -1,14 +1,25 @@ .. sidebar:: Key Contributors - * `Mario Picciani `_: developer, maintainer - * `Wassim Gabriel `_: developer, maintainer - * `Matthew The `_: developer, maintainer - * `Ludwig Lautenbacher `_: developer, maintainer - * `Victor-George Giurcoiu `_: developer - * `Omar Shouman `_: developer - * Firas Hamood: developer - * Cecilia Jensen: developer - * Julian Mueller: developer - * `Mostafa Kalhor `_: developer - * `Armin Soleymaniniya `_: developer + Current developers + + * `Mario Picciani `_: lead developer since 2022, maintainer + * `Mostafa Kalhor `_: developer, crosslinking + * `Wassim Gabriel `_: developer, PTMs, neutral losses, GUI + * Arne van den Berg: developer, diverse contributions + * `Victor-George Giurcoiu `_: developer, diverse contributions + * `Ludwig Lautenbacher `_: developer, Koina, GUI + * `Armin Soleymaniniya `_: developer, GUI + * Ayla Schröder: developer, pickedGroupFDR + * Zixuan Xiao: developer, GUI + + Previous developers + + * `Matthew The `_: developer, percolator + * `Omar Shouman `_: developer, diverse contributions + * Firas Hamood: developer, diverse contributions + * Cecilia Jensen: developer, diverse contributions + * Julian Mueller: developer, diverse contributions + + Other roles + * `Mathias Wilhelm `_: advisor and PI of wilhelmlab \ No newline at end of file diff --git a/docs/contributing.rst b/docs/contributing.rst index 78d4b97..69d543d 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -14,7 +14,7 @@ Here is a list of important resources for contributors: .. _MIT license: https://opensource.org/licenses/MIT .. _Source Code: https://github.com/wilhelm-lab/spectrum_io -.. _Documentation: https://spectrum_io.readthedocs.io/ +.. _Documentation: https://spectrum-io.readthedocs.io/ .. _Issue Tracker: https://github.com/wilhelm-lab/spectrum_io/issues How to report a bug diff --git a/pyproject.toml b/pyproject.toml index 255f092..6b464b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ license = "MIT" readme = "README.rst" homepage = "https://github.com/wilhelm-lab/spectrum_io" repository = "https://github.com/wilhelm-lab/spectrum_io" -documentation = "https://spectrum_io.readthedocs.io" +documentation = "https://spectrum-io.readthedocs.io" packages = [ { include = "spectrum_io" }, ] From ce752a3e915b047b5a6184961302e39efb2df9fa Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Thu, 1 Aug 2024 21:21:03 +0200 Subject: [PATCH 17/31] fixed and cleaned up unit tests --- spectrum_io/search_result/maxquant.py | 148 +++++++---------- spectrum_io/search_result/msfragger.py | 146 ++++++++--------- spectrum_io/search_result/sage.py | 105 ++++++------ spectrum_io/search_result/search_results.py | 60 ++++++- spectrum_io/spectral_library/dlib.py | 13 +- spectrum_io/spectral_library/msp.py | 11 +- .../spectral_library/spectral_library.py | 16 +- spectrum_io/spectral_library/spectronaut.py | 11 +- tests/unit_tests/data/msms.txt | 10 ++ tests/unit_tests/data/msms_internal.csv | 10 ++ tests/unit_tests/data/msms_internal_tmt.csv | 10 ++ tests/unit_tests/data/psm_mods.pepXML | 2 +- tests/unit_tests/test_maxquant.py | 155 ++++++------------ tests/unit_tests/test_msfragger.py | 50 ++++-- tests/unit_tests/test_sage.py | 43 ++++- 15 files changed, 420 insertions(+), 370 deletions(-) create mode 100644 tests/unit_tests/data/msms.txt create mode 100644 tests/unit_tests/data/msms_internal.csv create mode 100644 tests/unit_tests/data/msms_internal_tmt.csv diff --git a/spectrum_io/search_result/maxquant.py b/spectrum_io/search_result/maxquant.py index 410102e..a378a1c 100644 --- a/spectrum_io/search_result/maxquant.py +++ b/spectrum_io/search_result/maxquant.py @@ -4,9 +4,9 @@ import pandas as pd import spectrum_fundamentals.constants as c -from spectrum_fundamentals.mod_string import internal_without_mods, maxquant_to_internal +from spectrum_fundamentals.mod_string import internal_without_mods -from .search_results import SearchResults, filter_valid_prosit_sequences +from .search_results import SearchResults, filter_valid_prosit_sequences, parse_mods logger = logging.getLogger(__name__) @@ -43,108 +43,74 @@ def add_tmt_mod(mass: float, seq: str, unimod_tag: str) -> float: def read_result( self, - tmt_labeled: str, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + tmt_label: str = "", + custom_mods: Optional[Dict[str, int]] = None, ) -> pd.DataFrame: """ Function to read a msms txt and perform some basic formatting. - :param tmt_labeled: tmt label as str - :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass + :param tmt_label: optional tmt label as str + :param custom_mods: optional dictionary mapping MaxQuant-specific mod pattern to UNIMOD IDs. + If None, static carbamidomethylation of cytein and variable oxidation of methionine + are mapped automatically. To avoid this, explicitely provide an empty dictionary. :return: pd.DataFrame with the formatted data """ - logger.info("Reading msms.txt file") - df = pd.read_csv( - self.path / "msms.txt", - usecols=lambda x: x.upper() - in [ - "RAW FILE", - "SCAN NUMBER", - "MODIFIED SEQUENCE", - "CHARGE", - "SCAN EVENT NUMBER", - "LABELING STATE", - "MASS", # = Calculated Precursor mass; TODO get column with experimental Precursor mass instead - "SCORE", - "REVERSE", - "PROTEINS", - ], - sep="\t", - ) - logger.info("Finished reading msms.txt file") - - # Standardize column names - df.columns = df.columns.str.upper() - df.columns = df.columns.str.replace(" ", "_") + if custom_mods is None: + custom_mods = { + "C": 4, + "M(ox)": 35, + "M(Oxidation (M))": 35, + } + parsed_mods = parse_mods(custom_mods) + if tmt_label: + unimod_tag = c.TMT_MODS[tmt_label] + parsed_mods["K"] = f"K{unimod_tag}" + parsed_mods["^_"] = f"_{unimod_tag}-" - stat_mods: Dict[str, str] = {} - var_mods: Dict[str, str] = {} + logger.info("Reading msms.txt file") + self.results = pd.read_csv(self.path / "msms.txt", sep="\t") - if custom_mods is not None: - stat_mods = {key: value[0] for key, value in (custom_mods.get("stat_mods") or {}).items()} - var_mods = {key: value[0] for key, value in (custom_mods.get("var_mods") or {}).items()} + logger.info("Finished reading msms.txt file") - df = MaxQuant.update_columns_for_prosit(df, tmt_labeled, stat_mods, var_mods) - return filter_valid_prosit_sequences(df) + self.convert_to_internal(mods=parsed_mods) + return filter_valid_prosit_sequences(self.results) - @staticmethod - def update_columns_for_prosit( - df: pd.DataFrame, - tmt_labeled: str, - stat_mods: Optional[Dict[str, str]] = None, - var_mods: Optional[Dict[str, str]] = None, - ) -> pd.DataFrame: + def convert_to_internal(self, mods: Dict[str, str]) -> pd.DataFrame: """ - Update columns of df to work with Prosit. + Convert all columns in the MaxQuant output to the internal format used by Oktoberfest. - :param df: df to modify - :param tmt_labeled: True if tmt labeled - :param var_mods: dict with custom variable identifier and respecitve internal equivalent - :param stat_mods: dict with custom static identifier and respecitve internal equivalent - :return: modified df as pd.DataFrame + :param mods: dictionary mapping MaxQuant-specific mod patterns (keys) to ProForma standard (values) """ - df.rename(columns={"CHARGE": "PRECURSOR_CHARGE"}, inplace=True) - - mods = {**(c.MAXQUANT_VAR_MODS), **(stat_mods or {}), **(var_mods or {})} - - df["REVERSE"].fillna(False, inplace=True) - df["REVERSE"].replace("+", True, inplace=True) - logger.info("Converting MaxQuant peptide sequence to internal format") - if tmt_labeled != "": - unimod_tag = c.TMT_MODS[tmt_labeled] - logger.info("Adding TMT fixed modifications") - df["MODIFIED_SEQUENCE"] = maxquant_to_internal( - df["MODIFIED_SEQUENCE"].to_numpy(), - mods={**{"C": "C[UNIMOD:4]", "^_": f"_{unimod_tag}-", "K": f"K{unimod_tag}"}, **mods}, - ) - df["MASS"] = df.apply(lambda x: MaxQuant.add_tmt_mod(x.MASS, x.MODIFIED_SEQUENCE, unimod_tag), axis=1) - if "msa" in tmt_labeled: - logger.info("Replacing phospho by dehydration for Phospho-MSA") - df["MODIFIED_SEQUENCE_MSA"] = df["MODIFIED_SEQUENCE"].str.replace( - "[UNIMOD:21]", "[UNIMOD:23]", regex=False - ) - elif "LABELING_STATE" in df.columns: - logger.info("Adding SILAC fixed modifications") - - df.loc[df["LABELING_STATE"] == 1, "MODIFIED_SEQUENCE"] = maxquant_to_internal( - df[df["LABELING_STATE"] == 1]["MODIFIED_SEQUENCE"].to_numpy(), - mods={**{"C": "C[UNIMOD:4]", "K": "K[UNIMOD:259]", "R": "R[UNIMOD:267]"}, **mods}, - ) - df.loc[df["LABELING_STATE"] != 1, "MODIFIED_SEQUENCE"] = maxquant_to_internal( - df[df["LABELING_STATE"] != 1]["MODIFIED_SEQUENCE"].to_numpy(), mods={**{"C": "C[UNIMOD:4]"}, **mods} - ) - df["MASS"] = df.apply(lambda x: MaxQuant.add_tmt_mod(x.MASS, x.MODIFIED_SEQUENCE, "[UNIMOD:259]"), axis=1) - df["MASS"] = df.apply(lambda x: MaxQuant.add_tmt_mod(x.MASS, x.MODIFIED_SEQUENCE, "[UNIMOD:267]"), axis=1) - df.drop(columns=["LABELING_STATE"], inplace=True) - else: - df["MODIFIED_SEQUENCE"] = maxquant_to_internal( - df["MODIFIED_SEQUENCE"].to_numpy(), mods={**{"C": "C[UNIMOD:4]"}, **mods} - ) - df["SEQUENCE"] = internal_without_mods(df["MODIFIED_SEQUENCE"]) - df["PEPTIDE_LENGTH"] = df["SEQUENCE"].apply(lambda x: len(x)) - df["PROTEINS"].fillna("UNKNOWN", inplace=True) - - return df + df = self.results + # Standardize column names + # df.columns = df.columns.str.upper() + # df.columns = df.columns.str.replace(" ", "_") + # df.rename(columns={"CHARGE": "PRECURSOR_CHARGE"}, inplace=True) + + mods["_"] = "" + + df.fillna({"Reverse": "", "Proteins": "UNKNOWN"}, inplace=True) + df["Reverse"] = df["Reverse"].astype(bool) + df.replace({"Modified sequence": mods}, regex=True, inplace=True) + + df["Sequence"] = internal_without_mods(df["Modified sequence"]) + df["PEPTIDE_LENGTH"] = df["Sequence"].str.len() + + df.rename( + columns={ + "Reverse": "REVERSE", + "Sequence": "SEQUENCE", + "Modified sequence": "MODIFIED_SEQUENCE", + "Proteins": "PROTEINS", + "Charge": "PRECURSOR_CHARGE", + "Raw file": "RAW_FILE", + "Scan number": "SCAN_NUMBER", + "Scan event number": "SCAN_EVENT_NUMBER", + "Mass": "MASS", + "Score": "SCORE", + }, + inplace=True, + ) def generate_internal_timstof_metadata(self): """ diff --git a/spectrum_io/search_result/msfragger.py b/spectrum_io/search_result/msfragger.py index 3911700..aa9032b 100644 --- a/spectrum_io/search_result/msfragger.py +++ b/spectrum_io/search_result/msfragger.py @@ -6,10 +6,10 @@ import spectrum_fundamentals.constants as c from pyteomics import pepxml from spectrum_fundamentals.constants import MSFRAGGER_VAR_MODS -from spectrum_fundamentals.mod_string import internal_without_mods, msfragger_to_internal +from spectrum_fundamentals.mod_string import internal_without_mods from tqdm import tqdm -from .search_results import SearchResults, filter_valid_prosit_sequences +from .search_results import SearchResults, filter_valid_prosit_sequences, parse_mods logger = logging.getLogger(__name__) @@ -19,17 +19,26 @@ class MSFragger(SearchResults): def read_result( self, - tmt_labeled: str, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + tmt_label: str = "", + custom_mods: Optional[Dict[str, int]] = None, ) -> pd.DataFrame: """ Function to read a msms txt and perform some basic formatting. - :param tmt_labeled: tmt label as str - :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass + :param tmt_label: optional tmt label as str + :param custom_mods: optional dictionary mapping MSFragger-specific mod pattern to UNIMOD IDs. + If None, static carbamidomethylation of cytein and variable oxidation of methionine + are mapped automatically. To avoid this, explicitely provide an empty dictionary. :raises FileNotFoundError: in case the given path is neither a file, nor a directory. :return: pd.DataFrame with the formatted data """ + if custom_mods is None: + custom_mods = {"C": 4, "M[147]": 35} + parsed_mods = parse_mods(custom_mods) + if tmt_label: + unimod_tag = c.TMT_MODS[tmt_label] + parsed_mods["K"] = f"K{unimod_tag}" + parsed_mods[r"^n\[\d+\]"] = f"{unimod_tag}-" if self.path.is_file(): file_list = [self.path] elif self.path.is_dir(): @@ -41,76 +50,57 @@ def read_result( for pep_xml_file in tqdm(file_list): ms_frag_results.append(pepxml.DataFrame(str(pep_xml_file))) - df = pd.concat(ms_frag_results) - - stat_mods: Dict[str, str] = {} - var_mods: Dict[str, str] = {} - - if custom_mods is not None: - stat_mods = {key: value[0] for key, value in (custom_mods.get("stat_mods") or {}).items()} - var_mods = {key: value[0] for key, value in (custom_mods.get("var_mods") or {}).items()} - - df = update_columns_for_prosit(df, tmt_labeled, stat_mods=stat_mods, var_mods=var_mods) - return filter_valid_prosit_sequences(df) - - -def update_columns_for_prosit( - df, tmt_labeled: str, stat_mods: Optional[Dict[str, str]] = None, var_mods: Optional[Dict[str, str]] = None -) -> pd.DataFrame: - """ - Update columns of df to work with Prosit. - - :param df: df to modify - :param tmt_labeled: True if tmt labeled - :param var_mods: dict with custom variable identifier and respecitve internal equivalent - :param stat_mods: dict with custom static identifier and respecitve internal equivalent - :return: modified df as pd.DataFrame - """ - df["PROTEINS"] = df["protein"] - df["PROTEINS"].fillna("UNKNOWN", inplace=True) - df["REVERSE"] = df["protein"].apply(lambda x: "rev" in str(x)) - df["RAW_FILE"] = df["spectrum"].apply(lambda x: x.split(".")[0]) - df["MASS"] = df["precursor_neutral_mass"] - df["PEPTIDE_LENGTH"] = df["peptide"].apply(lambda x: len(x)) - - mods = {**(MSFRAGGER_VAR_MODS), **(stat_mods or {}), **(var_mods or {})} - - if tmt_labeled != "": - unimod_tag = c.TMT_MODS[tmt_labeled] - logger.info("Adding TMT fixed modifications") - mods = {**{"C": "C[UNIMOD:4]", r"n[\d+]": f"{unimod_tag}-", "K": f"K{unimod_tag}"}, **mods} - df["MODIFIED_SEQUENCE"] = msfragger_to_internal(df["modified_peptide"].to_list(), mods=mods) - else: - # By default, i.e. if nothing is supplied to fixed_mods, carbamidomethylation on cystein will be included - # in the fixed modifications. If you want to have no fixed modifictions at all, supply fixed_mods={} - mods = {**{"C": "C[UNIMOD:4]"}, **mods} - df["MODIFIED_SEQUENCE"] = msfragger_to_internal(df["modified_peptide"].to_list(), mods=mods) - - df.rename( - columns={ - "assumed_charge": "PRECURSOR_CHARGE", - "index": "SCAN_EVENT_NUMBER", - "peptide": "SEQUENCE", - "start_scan": "SCAN_NUMBER", - "hyperscore": "SCORE", - }, - inplace=True, - ) - df["SEQUENCE"] = internal_without_mods(df["MODIFIED_SEQUENCE"]) - df["PROTEINS"] = df["PROTEINS"].apply(lambda x: ";".join(x)) - - return df[ - [ - "RAW_FILE", - "SCAN_NUMBER", - "MODIFIED_SEQUENCE", - "PRECURSOR_CHARGE", - "SCAN_EVENT_NUMBER", - "MASS", - "SCORE", - "REVERSE", - "SEQUENCE", - "PEPTIDE_LENGTH", - "PROTEINS", + self.results = pd.concat(ms_frag_results) + + self.convert_to_internal(mods=parsed_mods) + return filter_valid_prosit_sequences(self.results) + + def convert_to_internal(self, mods: Dict[str, str]) -> pd.DataFrame: + """ + Convert all columns in the MSFragger output to the internal format used by Oktoberfest. + + :param mods: dictionary mapping MSFragger-specific mod patterns (keys) to ProForma standard (values) + """ + df = self.results + df["protein"] = df["protein"].fillna("UNKNOWN").apply(lambda x: ";".join(x)) + + df["REVERSE"] = df["protein"].apply(lambda x: "rev" in str(x)) + df["spectrum"] = df["spectrum"].str.split(pat=".", n=1).str[0] + df["PEPTIDE_LENGTH"] = df["peptide"].str.len() + + df.replace({"modified_peptide": mods}, regex=True, inplace=True) + df["peptide"] = internal_without_mods(df["modified_peptide"]) + + df.rename( + columns={ + "assumed_charge": "PRECURSOR_CHARGE", + "index": "SCAN_EVENT_NUMBER", + "peptide": "SEQUENCE", + "start_scan": "SCAN_NUMBER", + "hyperscore": "SCORE", + "modified_peptide": "MODIFIED_SEQUENCE", + "protein": "PROTEINS", + "peptide": "SEQUENCE", + "precursor_neutral_mass": "MASS", + "spectrum": "RAW_FILE", + }, + inplace=True, + ) + + """ + return df[ + [ + "RAW_FILE", + "SCAN_NUMBER", + "MODIFIED_SEQUENCE", + "PRECURSOR_CHARGE", + "SCAN_EVENT_NUMBER", + "MASS", + "SCORE", + "REVERSE", + "SEQUENCE", + "PEPTIDE_LENGTH", + "PROTEINS", + ] ] - ] + """ diff --git a/spectrum_io/search_result/sage.py b/spectrum_io/search_result/sage.py index 50438b9..2451efe 100644 --- a/spectrum_io/search_result/sage.py +++ b/spectrum_io/search_result/sage.py @@ -3,10 +3,10 @@ from typing import Dict, Optional, Tuple, Union import pandas as pd -from spectrum_fundamentals.constants import MOD_MASSES_SAGE -from spectrum_fundamentals.mod_string import sage_to_internal +import spectrum_fundamentals.constants as c +from spectrum_fundamentals.mod_string import internal_without_mods -from .search_results import SearchResults, filter_valid_prosit_sequences +from .search_results import SearchResults, filter_valid_prosit_sequences, parse_mods logger = logging.getLogger(__name__) @@ -16,79 +16,68 @@ class Sage(SearchResults): def read_result( self, - tmt_labeled: str = "", - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + tmt_label: str = "", + custom_mods: Optional[Dict[str, int]] = None, ) -> pd.DataFrame: """ Function to read a msms tsv and perform some basic formatting. - :param tmt_labeled: tmt label as str - :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass + :param tmt_label: optional tmt label as str + :param custom_mods: optional dictionary mapping Sage-specific mod pattern to UNIMOD IDs. + If None, static carbamidomethylation of cytein and variable oxidation of methionine + are mapped automatically. To avoid this, explicitely provide an empty dictionary. :return: pd.DataFrame with the formatted data """ + if custom_mods is None: + custom_mods = { + "C[+57.0215]": 4, + "M[+15.9949]": 35, + "M[+15.994]": 35, + } + parsed_mods = parse_mods(custom_mods) + if tmt_label: + unimod_tag = c.TMT_MODS[tmt_label] + parsed_mods[r"K\[\+\d+\.\d+\]"] = f"K{unimod_tag}" + parsed_mods[r"^\[\+\d+\.\d+\]"] = f"{unimod_tag}" + logger.info(f"Reading {self.path}") - df = pd.read_csv( + self.results = pd.read_csv( self.path, usecols=["filename", "scannr", "peptide", "charge", "hyperscore", "calcmass", "label", "proteins"], sep="\t", ) logger.info(f"Finished reading {self.path}") - # Standardize column names - df.columns = df.columns.str.upper() - df.columns = df.columns.str.replace(" ", "_") - - stat_mods: Dict[str, str] = {} - var_mods: Dict[str, str] = {} + self.convert_to_internal(mods=parsed_mods) + print(parsed_mods, self.results) + return filter_valid_prosit_sequences(self.results) - if custom_mods is not None: - stat_mods = {key: value[0] for key, value in (custom_mods.get("stat_mods") or {}).items()} - var_mods = {key: value[0] for key, value in (custom_mods.get("var_mods") or {}).items()} - - df = Sage.update_columns_for_prosit(df, tmt_labeled, stat_mods=stat_mods, var_mods=var_mods) - return filter_valid_prosit_sequences(df) - - @staticmethod - def update_columns_for_prosit( - df: pd.DataFrame, - tmt_labeled: str, - stat_mods: Optional[Dict[str, str]] = None, - var_mods: Optional[Dict[str, str]] = None, - ) -> pd.DataFrame: + def convert_to_internal(self, mods: Dict[str, str]) -> pd.DataFrame: """ - Update columns of df to work with Prosit. + Convert all columns in the Sage output to the internal format used by Oktoberfest. - :param df: df to modify - :param tmt_labeled: True if tmt labeled, ignored - :param var_mods: Variable modifications with custom identifiers and their respective internal equivalents - :param stat_mods: Static modifications with custom identifiers and their respective internal equivalents - :return: modified df as pd.DataFrame + :param mods: dictionary mapping Sage-specific mod patterns (keys) to ProForma standard (values) """ - df = df.rename( - columns={ - "FILENAME": "RAW_FILE", - "SCANNR": "SCAN_NUMBER", - "PEPTIDE": "MODIFIED_SEQUENCE", - "CHARGE": "PRECURSOR_CHARGE", - "CALCMASS": "MASS", - "HYPERSCORE": "SCORE", - "LABEL": "REVERSE", - } - ) - mods = {**(MOD_MASSES_SAGE), **(stat_mods or {}), **(var_mods or {})} + df = self.results # removing .mzML - df["RAW_FILE"] = df["RAW_FILE"].str.replace(r"\.mz[M|m][l|L]", "", regex=True) - # extracting only the scan number - df["SCAN_NUMBER"] = [int(x.rsplit("=", 1)[-1]) for x in df["SCAN_NUMBER"]] - # creating a column of decoys and targets - df["REVERSE"] = df["REVERSE"] < 0 - # removing modification to create the unmodified sequences - df["SEQUENCE"] = df["MODIFIED_SEQUENCE"].str.replace(r"\-|\[.*?\]", "", regex=True) - # length of the peptide + df.fillna({"proteins": "UNKNOWN"}, inplace=True) + df.replace({"filename": {r"\.mz[M|m][l|L]": ""}, "peptide": mods}, regex=True, inplace=True) + df["scannr"] = df["scannr"].str.rsplit(pat="=", n=1).str[1].astype(int) + df["label"] = df["label"] < 0 + df["SEQUENCE"] = internal_without_mods(df["peptide"]) df["PEPTIDE_LENGTH"] = df["SEQUENCE"].str.len() - # converting sage to unimod - df["MODIFIED_SEQUENCE"] = sage_to_internal(df["MODIFIED_SEQUENCE"], mods=mods) - df["PROTEINS"].fillna("UNKNOWN", inplace=True) - return df + df.rename( + columns={ + "filename": "RAW_FILE", + "scannr": "SCAN_NUMBER", + "peptide": "MODIFIED_SEQUENCE", + "charge": "PRECURSOR_CHARGE", + "calcmass": "MASS", + "hyperscore": "SCORE", + "label": "REVERSE", + "proteins": "PROTEINS", + }, + inplace=True, + ) diff --git a/spectrum_io/search_result/search_results.py b/spectrum_io/search_result/search_results.py index 0d9c476..4c7619a 100644 --- a/spectrum_io/search_result/search_results.py +++ b/spectrum_io/search_result/search_results.py @@ -34,6 +34,51 @@ def filter_valid_prosit_sequences(df: pd.DataFrame) -> pd.DataFrame: return df +def parse_mods(mods: Dict[str, int]) -> Dict[str, str]: + """ + Parse provided mapping of custom modification pattern to ProForma standard. + + This function takes a dictionary mapping custom modification pattern for specific aminoacids (keys) to a + UNIMOD ID (values). The pattern is translated to ProForma standard and a new dictionary mapping the custom + modification patterns to the ProForma standard is returned. + The pattern for the custom modifications must start with the one-letter code for an aminoacid or '^' / '$', + to describe n- / c-terminal modifications, respectively, followed by an optional pattern (which can be + empty). + This means that 'X' or 'X(custom_pattern)', is both mapped to 'X[UNIMOD:#]'. + For the n-terminus, an additional dash will be added automatically, which maps 'X(custom_pattern)' to + 'X[UNIMOD:#]-'. If the sequence to apply the transformation on already contains the dash, it needs to be part + of the custom_pattern (i.e. 'X(custom_pattern)-'), to avoid adding an additional dash. + + :param mods: Dictionary mapping custom modification patterns (keys) to UNIMOD IDs (values) + :raises TypeError: if keys are not strings or values are not integers + :raises ValueError: if the keys do not start with [A-Z,a-z,^,$] + :return: A dictionary mapping custom modification patterns (keys) to the ProForma standard (values) + """ + key_pattern = ( + "'X' or 'X' where X is either the one-letter code of an aminoacid or '^' / '$' defining the" + " n- or c-terminus, respectively, followed by an optional pattern identifying a specific modification." + ) + unimod_regex_map = {} + for k, v in mods.items(): + if not isinstance(v, int): + raise TypeError(f"UNIMOD id {v} for replacement {k} not understood. UNIMOD IDs must be integers.") + if not isinstance(k, str): + raise TypeError( + f"Replacement {k} not understood. Replacements must be strings and follow " f"the pattern {key_pattern}" + ) + if k[0].isalpha(): + unimod_regex_map[re.escape(k)] = f"{k[0]}[UNIMOD:{v}]" + continue + if k[0] == "^": + unimod_regex_map[f"^{re.escape(k[1:])}"] = f"[UNIMOD:{v}]-" + continue + raise ValueError( + f"Replacement {k} not understood. {k[0]} is not a valid aminoacid. " + f"Replacements most follow the pattern {key_pattern}" + ) + return unimod_regex_map + + class SearchResults: """Handle search results from different software.""" @@ -53,12 +98,12 @@ def __init__(self, path: Union[str, Path]): @abstractmethod def read_result( self, - tmt_labeled: str, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + tmt_label: str = "", + custom_mods: Optional[Dict[str, int]] = None, ): """Read result. - :param tmt_labeled: tmt label as str + :param tmt_label: tmt label as str :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass """ raise NotImplementedError @@ -102,3 +147,12 @@ def read_internal(self) -> pd.DataFrame: :return: dataframe after reading the file """ return csv.read_file(self.path) + + @abstractmethod + def convert_to_internal(self, mods: Dict[str, int]): + """ + Convert all columns in the search engine-specific output to the internal format used by Oktoberfest. + + :param mods: dictionary mapping search engine-specific mod patterns (keys) to ProForma standard (values) + """ + raise NotImplementedError diff --git a/spectrum_io/spectral_library/dlib.py b/spectrum_io/spectral_library/dlib.py index ba9558c..205bda8 100644 --- a/spectrum_io/spectral_library/dlib.py +++ b/spectrum_io/spectral_library/dlib.py @@ -1,7 +1,7 @@ import sqlite3 import zlib from pathlib import Path -from typing import IO, Dict, Union, Tuple, Optional +from typing import IO, Dict, Optional, Tuple, Union import numpy as np import pandas as pd @@ -125,12 +125,17 @@ def _create_database(conn: sqlite3.Connection): c.execute(sql_insert_meta, ["staleProteinMapping", "true"]) conn.commit() - def _write(self, out: Union[IO, sqlite3.Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None): + def _write( + self, + out: Union[IO, sqlite3.Connection], + data: Dict[str, np.ndarray], + metadata: pd.DataFrame, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + ): if isinstance(out, IO): raise TypeError("Not supported. Use msp/spectronaut if you want to write a text file.") seqs = metadata["SEQUENCE"] - modseqs = metadata["MODIFIED_SEQUENCE"] + modseqs = metadata["MODIFIED_SEQUENCE"] mass_mod_sequences = internal_to_mod_mass(modseqs, custom_mods) p_charges = metadata["PRECURSOR_CHARGE"] diff --git a/spectrum_io/spectral_library/msp.py b/spectrum_io/spectral_library/msp.py index 1412375..a83fa7c 100644 --- a/spectrum_io/spectral_library/msp.py +++ b/spectrum_io/spectral_library/msp.py @@ -1,5 +1,5 @@ from sqlite3 import Connection -from typing import IO, Dict, Union, Tuple, Optional +from typing import IO, Dict, Optional, Tuple, Union import numpy as np import pandas as pd @@ -17,8 +17,13 @@ def _assemble_fragment_string(f_mz: float, f_int: float, f_a: bytes): annot = f_a[:-2].decode() if f_a.endswith(b"1") else f_a.replace(b"+", b"^").decode() return f'{f_mz:.8f}\t{f_int:.4f}\t"{annot}/0.0ppm"\n' - def _write(self, out: Union[IO, Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None): + def _write( + self, + out: Union[IO, Connection], + data: Dict[str, np.ndarray], + metadata: pd.DataFrame, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + ): # prepare metadata if isinstance(out, Connection): raise TypeError("Not supported. Use DLib if you want to write a database file.") diff --git a/spectrum_io/spectral_library/spectral_library.py b/spectrum_io/spectral_library/spectral_library.py index b037c14..9abf0f6 100644 --- a/spectrum_io/spectral_library/spectral_library.py +++ b/spectrum_io/spectral_library/spectral_library.py @@ -3,7 +3,7 @@ from multiprocessing.managers import ValueProxy from pathlib import Path from sqlite3 import Connection -from typing import IO, Dict, Optional, Union, Tuple +from typing import IO, Dict, Optional, Tuple, Union import numpy as np import pandas as pd @@ -52,8 +52,9 @@ def write(self, *args, **kwargs): def _get_handle(self): return open(self.out_path, self.mode) - def async_write(self, queue: Queue, progress: ValueProxy, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None): + def async_write( + self, queue: Queue, progress: ValueProxy, custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None + ): """ Asynchronously write content to the output file from a queue. @@ -88,8 +89,13 @@ def _fragment_filter_passed( return (f_mz != -1) & (f_int >= self.min_intensity_threshold) @abstractmethod - def _write(self, out: Union[IO, Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None): + def _write( + self, + out: Union[IO, Connection], + data: Dict[str, np.ndarray], + metadata: pd.DataFrame, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + ): """ Internal writer function. diff --git a/spectrum_io/spectral_library/spectronaut.py b/spectrum_io/spectral_library/spectronaut.py index c4632f3..59ca248 100644 --- a/spectrum_io/spectral_library/spectronaut.py +++ b/spectrum_io/spectral_library/spectronaut.py @@ -2,7 +2,7 @@ import re from itertools import chain, cycle from sqlite3 import Connection -from typing import IO, Dict, Tuple, Union, Optional +from typing import IO, Dict, Optional, Tuple, Union import numpy as np import pandas as pd @@ -26,8 +26,13 @@ def _assemble_fragment_string(f_int: float, f_mz: float, f_annot: bytes): f"{f_int:.4f},{f_mz:.8f},{m.group(2)},{m.group(1)},{m.group(3)},{m.group(4) if m.group(4) else 'noloss'}\n" ) - def _write(self, out: Union[IO, Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None): + def _write( + self, + out: Union[IO, Connection], + data: Dict[str, np.ndarray], + metadata: pd.DataFrame, + custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + ): # prepare metadata if isinstance(out, Connection): raise TypeError("Not supported. Use DLib if you want to write a database file.") diff --git a/tests/unit_tests/data/msms.txt b/tests/unit_tests/data/msms.txt new file mode 100644 index 0000000..083aaec --- /dev/null +++ b/tests/unit_tests/data/msms.txt @@ -0,0 +1,10 @@ +Raw file Scan number Scan index Sequence Length Missed cleavages Modifications Modified sequence Oxidation (M) Probabilities Oxidation (M) Score diffs Oxidation (M) Proteins Charge Fragmentation Mass analyzer Type Scan event number Isotope index m/z Mass Mass error [ppm] Mass error [Da] Simple mass error [ppm] Retention time PEP Score Delta score Score diff Localization prob Combinatorics PIF Fraction of total spectrum Base peak fraction Precursor full scan number Precursor Intensity Precursor apex fraction Precursor apex offset Precursor apex offset time Matches Intensities Mass deviations [Da] Mass deviations [ppm] Masses Number of matches Intensity coverage Peak coverage Unfragmented precursor intensity Unfragmented precursor fraction Neutral loss level ETD identification type Reverse All scores All sequences All modified sequences MS3 scan numbers Reporter PIF Reporter fraction id Protein group IDs Peptide ID Mod. peptide ID Evidence ID Oxidation (M) site IDs Mass deficit +GN20170722_SK_HLA_G0103_R1_02 39581 34737 AAAAAVAGVGRGG 13 Unmodified _AAAAAVAGVGRGG_ 0 uc009yqv.3;uc001ogi.3;C11orf68_p.V135L_uc001ogi.2|C11orf68 2 CID FTMS MULTI-MSMS 8 0 514.2858 1026.557 3.036 0.0015614 8.3832641 88.186 0.71744 13.77 3.3555 NaN NaN 1 0 0 0 39573 1384891.5 0.7223182599737116 -3 0.08632659912109375 y5;y7;a2;b9 2905.48046875;9943.1416015625;3013.589599609375;37873.2109375 -0.002829233181444124;0.008368573916527566;-0.00031301558594520884;-0.00275202985596934 -6.354192112149343;14.597148465958854;-2.7198193653715848;-4.0329222465724435 445.2545865011814;573.3019662054834;115.08690243568594;682.391002779256 4 0.016147311455613267 0.04395604395604396 0 0 None Unknown 13.769603755808198;10.41414173872871;9.986874898151301 AAAAAVAGVGRGG;RGLQQPVVM;PLFPVAGVPM _AAAAAVAGVGRGG_;_RGLQQPVVM_;_PLFPVAGVPM_ 0 153 0 0 0 0.044824929062770025 +GN20170722_SK_HLA_G0103_R1_01 24282 21318 AAADRNLIYVLK 12 Unmodified _AAADRNLIYVLK_ 0 2 CID FTMS MULTI-MSMS 8 1 673.89317 1345.7718 -4.268 -0.0028761 747.2514 52.702 0.56055 28.727 0.32818 NaN NaN 1 0 0 0 24274 4397484 0.3726964352547448 10 -0.23571395874023438 y1;y2;y3;y4;y5;y7;y2-NH3;a2 3799.669677734375;138293.265625;18070.681640625;58923.94140625;107806.1171875;70635.7734375;15442.98046875;9986.8359375 -0.000463241690255245;0.00019436417716178767;0.003219772849433866;0.0019772452006918684;0.0012221122285609454;0.002896620233173053;0.0009968129016613148;-0.000993683999936934 -3.148877721252655;0.7469894765873476;8.962184397850063;3.785457364047471;1.9233399457992681;3.358257103880474;4.099254348751434;-8.634154729256231 147.11326741229024;260.1966737868229;359.26206229435064;522.3266333602993;635.4114524736714;862.5367693932668;243.1693222365984;115.08758310409993 8 0.06633611121645898 0.07407407407407407 0 0 None Unknown + 28.726836482416193;28.398655567304367;27.254056396965822 AAADRNLIYVLK;LVRGIAHIFSPH;LVYQEINLARK _AAADRNLIYVLK_;_LVRGIAHIFSPH_;_LVYQEINLARK_ 1 6213 1 1 1 0.11272994931368885 +GN20170722_SK_HLA_G0103_R1_01 32608 28449 AAAGRIAIPGL 11 Unmodified _AAAGRIAIPGL_ 0 uc002lpr.2;uc002lpq.2;uc002lpp.2 2 CID FTMS MSMS 11 505.31128 1008.608 NaN NaN 9.1541616 72.138 0.35461 15.662 1.8867 NaN NaN 1 0 0 0 32597 334279.59375 1 0 0 y1;y4;y6;a2;b2;b7;b10 17585.08984375;3773.285888671875;47387.72265625;14307.5595703125;3126.1455078125;103400.8515625;2367.97900390625 0.0001248233497790352;-0.0018376640455812776;0.009915978956996696;-0.00043868453276729724;-0.0012951289365901175;-0.004575538846552263;0.004011688101854816 0.9449028581307712;-4.602651610884071;16.997710143135873;-3.8117634975199977;-9.051604693874186;-7.484112246043633;4.566433773179205 132.10178030995021;399.2620343533456;583.3714584785429;115.08702810463276;143.0827991711366;611.3669458887465;878.5166502177981 7 0.06293662075192183 0.045454545454545456 0 0 None Unknown 15.66199446558733;13.775330524044264;13.64772730687463 AAAGRIAIPGL;PVARLFPPL;VPVGRLQGAL _AAAGRIAIPGL_;_PVARLFPPL_;_VPVGRLQGAL_ 2 16295 2 2 2 0.1040544195111579 +GN20170722_SK_HLA_G0103_R1_01 35464 30971 AAAIVFLVDRF 11 Unmodified _AAAIVFLVDRF_ 0 uc011cfx.2;uc003iap.4;uc003ian.4 2 CID FTMS MSMS 3 611.35315 1220.6917 NaN NaN 7.2936771 78.767 0.35461 15.662 1.4552 NaN NaN 1 0 0 0 35461 1150588.5 0.46417705227480194 -2 0.02997589111328125 y5;a2;b2;b4;b5 2324.119140625;7897.48388671875;3402.477783203125;8944.435546875;3646.345458984375 0.00016820457972244185;-0.0002067135477687998;-0.0006781696607163212;0.001769698386226537;-0.0026612948673232495 0.2590286824841407;-1.7961534660218355;-4.739721258319645;5.408598572673599;-6.243159057969467 649.3666188212202;115.08679613364777;143.08218221186073;327.2009121120137;426.2737570214673 5 0.018596876451864083 0.05 0 0 None Unknown 15.66199446558733;14.20677841292237;11.49006305901108 AAAIVFLVDRF;VGAVGHKAANVAK;GRRRGGPPVNR _AAAIVFLVDRF_;_VGAVGHKAANVAK_;_GRRRGGPPVNR_ 3 18307 3 3 3 0.09022553328168215 +GN20170722_SK_HLA_G0103_R2_01 26762 22942 AAALGAVVRLA 11 Unmodified _AAALGAVVRLA_ 0 2 CID FTMS MSMS 3 506.31911 1010.6237 NaN NaN -2.2315064 60.764 0.357 14.865 0.089257 NaN NaN 1 0 0 0 -1 NaN NaN 0 NaN y6;y9;y6-NH3;y9-NH3;b9 6704.11572265625;3121.10546875;5720.6767578125;36383.8828125;2903.078125 -7.786020262301463E-05;0.004498815625538555;-0.003963494129493483;-0.012215085613661358;-0.006804483999644617 -0.1238995059129184;5.173715335129975;-6.482743414813657;-14.327833916408876;-8.40572395662594 628.4141494296026;869.5522142455745;611.3914859620295;852.5423790453137;809.5060026662998 5 0.006509061445123882 0.035211267605633804 0 0 None Unknown + 14.864876125193954;14.775619335231177;14.535294575441029 AAALGAVVRLA;LSGIIKRQP;AAIQILRNL _AAALGAVVRLA_;_LSGIIKRQP_;_AAIQILRNL_ 4 5820 4 4 4 0.1187772846816415 +GN20170722_SK_HLA_G0103_R1_02 36957 32348 AAALLGPSAQVKPS 14 Unmodified _AAALLGPSAQVKPS_ 0 2 CID FTMS MSMS 12 655.37735 1308.7402 NaN NaN 7.953341 82.433 0.44365 16.632 5.1418 NaN NaN 1 0 0 0 36945 2145926.75 0.8411612144806966 5 -0.1116790771484375 y8;a2;b2;b4;b10 4655.591796875;16715.123046875;2262.689453125;5398.7060546875;4745.7470703125 -0.007113766089901219;-0.0003434307455876251;0.0001157588298212886;0.0013808909956765092;-0.004194096411310966 -8.745140500668365;-2.9840985164902825;0.8090418412213772;4.220310224306376;-4.763350700971752 813.4536076758899;115.08693285084559;143.0813882833702;327.2013009194043;880.4928871719113 5 0.0204413445189944 0.03496503496503497 0 0 None Unknown + 16.631834798470333;11.49006305901108;10.82951774543324 AAALLGPSAQVKPS;ILRNHVMVRVG;VGGLVILAMPQVP _AAALLGPSAQVKPS_;_ILRNHVM(Oxidation (M))VRVG_;_VGGLVILAM(Oxidation (M))PQVP_ 5 7349 5 5 5 0.09813002177429553 +GN20170722_SK_HLA_G0103_R1_01 35853 31312 AAALVFFVTA 10 Unmodified _AAALVFFVTA_ 0 tr|A0A097I0R1|A0A097I0R1_HHV3;tr|A0A097I0Y1|A0A097I0Y1_HHV3;tr|G9IXM9|G9IXM9_HHV3;tr|G9IX13|G9IX13_HHV3;tr|Q0QA15|Q0QA15_HHV3;tr|Q0QA88|Q0QA88_HHV3;tr|Q2PJ42|Q2PJ42_HHV3;tr|R4P4T3|R4P4T3_HHV3;tr|G9IXV1|G9IXV1_HHV3;tr|A0A1C9CWW4|A0A1C9CWW4_HHV3;tr|Q0Q9E6|Q0Q9E6_HHV3;tr|Q0Q973|Q0Q973_HHV3;tr|G9IUZ3|G9IUZ3_HHV3;tr|A0A0F7GK62|A0A0F7GK62_HHV3;tr|A0A0F7CV33|A0A0F7CV33_HHV3;tr|A0A0F7CVA6|A0A0F7CVA6_HHV3;tr|A0A0F7CVQ2|A0A0F7CVQ2_HHV3;tr|A0A0F7CW33|A0A0F7CW33_HHV3;tr|Q0Q9L9|Q0Q9L9_HHV3;sp|P09278|LTP_VZVD;tr|I2CNP0|I2CNP0_HHV3;tr|A0A0F7GJA5|A0A0F7GJA5_HHV3;tr|Q6QCN3|Q6QCN3_HHV3;tr|W5RSJ9|W5RSJ9_HHV3;tr|Q0Q9U2|Q0Q9U2_HHV3;tr|Q0Q858|Q0Q858_HHV3;tr|A0A1B1JF83|A0A1B1JF83_HHV3;tr|G0ZLC3|G0ZLC3_HHV3;tr|Q6QCV5|Q6QCV5_HHV3;tr|A8I3I4|A8I3I4_HHV3;tr|G9IUC7|G9IUC7_HHV3;tr|G9IVD7|G9IVD7_HHV3;tr|G9IW03|G9IW03_HHV3;tr|G9IWE7|G9IWE7_HHV3;tr|G9IWL9|G9IWL9_HHV3;tr|G9IXF7|G9IXF7_HHV3;tr|L7X8T0|L7X8T0_HHV3;tr|A0A0F7GIU8|A0A0F7GIU8_HHV3;tr|A0A0F7GKY0|A0A0F7GKY0_HHV3;tr|A0A1C9CX67|A0A1C9CX67_HHV3;tr|U5NQF8|U5NQF8_HHV3;tr|U5NT66|U5NT66_HHV3;tr|U5NPW9|U5NPW9_HHV3;tr|A0A1B1JGR2|A0A1B1JGR2_HHV3;tr|Q0Q8D1|Q0Q8D1_HHV3;tr|A0A075X7J7|A0A075X7J7_HHV3;tr|A0A076N2D1|A0A076N2D1_HHV3;tr|Q0Q8S7|Q0Q8S7_HHV3;tr|A0A1B1JGW3|A0A1B1JGW3_HHV3;tr|W6EHL9|W6EHL9_HHV3;tr|B0CMS9|B0CMS9_HHV3;tr|A0A1B1JFX5|A0A1B1JFX5_HHV3;tr|A0A1B1JG34|A0A1B1JG34_HHV3;tr|A0A075X1N3|A0A075X1N3_HHV3;tr|G9IY23|G9IY23_HHV3;tr|A4GE96|A4GE96_HHV3;tr|U5NSY8|U5NSY8_HHV3;tr|A0A0F7GLI9|A0A0F7GLI9_HHV3;tr|G9IU55|G9IU55_HHV3;tr|A0A0F7GQA2|A0A0F7GQA2_HHV3;tr|U5NTP5|U5NTP5_HHV3;tr|A0A0F7GLZ1|A0A0F7GLZ1_HHV3;sp|Q4JQX9|LTP_VZVO;tr|A0A0F7GNC3|A0A0F7GNC3_HHV3;tr|A0A0F7GNZ4|A0A0F7GNZ4_HHV3;tr|A0A0F7GPS9|A0A0F7GPS9_HHV3;tr|I7D980|I7D980_HHV3;tr|U5NUP5|U5NUP5_HHV3;tr|G9IW75|G9IW75_HHV3;tr|Q0Q8K4|Q0Q8K4_HHV3;tr|A6XEB1|A6XEB1_HHV3;tr|I7DJA6|I7DJA6_HHV3;tr|W6E6K8|W6E6K8_HHV3;tr|W6E684|W6E684_HHV3;tr|Q0Q900|Q0Q900_HHV3 2 CID FTMS MULTI-MSMS 3 0 505.28949 1008.5644 2.236 0.0011298 4.7881027 79.666 0.62222 15.381 0.60553 NaN NaN 1 0 0 0 35850 15369293 1 0 0 y4;y6;y4-H2O;b4 8194.3076171875;9210.5302734375;12286.7236328125;9231.583984375 -0.008737849023532362;-0.006874988596337062;0.0027794625577257648;0.005002444408432893 -19.983727872620598;-10.060225299391472;6.6299842599590635;15.28875271403542 437.2481990962236;683.3831640681964;419.2261170983423;327.1976793659915 4 0.005030056466088641 0.05263157894736842 0 0 None Unknown 15.381154005585476;14.775619335231177;12.988381952877914 AAALVFFVTA;VPLSPPWLT;PTKLYKLM _AAALVFFVTA_;_VPLSPPWLT_;_PTKLYKLM(Oxidation (M))_ 6 11912 6 6 6 0.06047832453987212 +GN20170722_SK_HLA_G0103_R1_01 37465 32769 AAAMAFG 7 Unmodified _AAAMAFG_ 0 tr|U5NU36|U5NU36_HHV3;tr|Q0Q9Y9|Q0Q9Y9_HHV3;tr|I7EGL3|I7EGL3_HHV3;tr|I2CNR6|I2CNR6_HHV3;tr|G9IXB0|G9IXB0_HHV3;tr|G9IVV6|G9IVV6_HHV3;tr|G9IVG2|G9IVG2_HHV3;tr|G9IUM4|G9IUM4_HHV3;tr|B0CMV6|B0CMV6_HHV3;tr|A0A1C9CX38|A0A1C9CX38_HHV3;tr|A0A0F7GMU7|A0A0F7GMU7_HHV3;tr|A0A0F7GKV3|A0A0F7GKV3_HHV3;tr|A0A0F7GJZ8|A0A0F7GJZ8_HHV3;sp|Q4JQS7|AN_VZVO;sp|P09253|AN_VZVD 1 CID FTMS MULTI-MSMS 5 0 638.29666 637.28938 -2.6899 -0.0017169 2.2618452 83.465 0.69237 3.3758 3.3758 NaN NaN 1 0 0 0 37460 49799916 0.6104119988864497 -6 0.15149688720703125 y4 32493.693359375 0.00040581233241709924 0.9544372849576236 425.18491137436763 1 0.00043692510291909703 0.01020408163265306 0 0 None Unknown 3.3758226685180976;0;0 AAAMAFG;PFFGGGG;GFGPFGG _AAAMAFG_;_PFFGGGG_;_GFGPFGG_ 7 11602 7 7 7 -0.0437710322582916 +GN20170722_SK_HLA_G0103_R1_01 4878 3972 AAAMLRK 7 Unmodified _AAAMLRK_ 0 uc001vne.3;uc010tik.1;uc010til.1;uc001vnf.1 2 CID FTMS MSMS 5 380.72854 759.44253 NaN NaN -0.89752058 11.884 1.0478 38.202 10.885 NaN NaN 1 0 0 0 4873 3145282 1 0 0 y3;y4;y3-NH3;y4-NH3;b3 92125.1015625;475564.0625;5908.86328125;26057.03515625;47402.09765625 -0.00042149807143232465;-0.00030228005061871954;-0.0030104841815727923;0.0005637190507741252;-5.349210823624162E-06 -1.012490249173898;-0.5522723208365405;-7.539887044452489;1.0629963883454507;-0.024982464132262953 416.29840067717146;547.3387660653506;399.2744405617816;530.3113509647492;214.11862317921083 5 0.20388849272384799 0.0625 0 0 None Unknown 38.20205643361177;27.3166592096155;27.3166592096155 AAAMLRK;GGVRMLK;GGVLRMK _AAAMLRK_;_GGVRMLK_;_GGVLRMK_ 8 14949 8 8 8 0.05318511890629907 diff --git a/tests/unit_tests/data/msms_internal.csv b/tests/unit_tests/data/msms_internal.csv new file mode 100644 index 0000000..0baf93d --- /dev/null +++ b/tests/unit_tests/data/msms_internal.csv @@ -0,0 +1,10 @@ +RAW_FILE,SCAN_NUMBER,Scan index,SEQUENCE,Length,Missed cleavages,Modifications,MODIFIED_SEQUENCE,Oxidation (M) Probabilities,Oxidation (M) Score diffs,Oxidation (M),PROTEINS,PRECURSOR_CHARGE,Fragmentation,Mass analyzer,Type,SCAN_EVENT_NUMBER,Isotope index,m/z,MASS,Mass error [ppm],Mass error [Da],Simple mass error [ppm],Retention time,PEP,SCORE,Delta score,Score diff,Localization prob,Combinatorics,PIF,Fraction of total spectrum,Base peak fraction,Precursor full scan number,Precursor Intensity,Precursor apex fraction,Precursor apex offset,Precursor apex offset time,Matches,Intensities,Mass deviations [Da],Mass deviations [ppm],Masses,Number of matches,Intensity coverage,Peak coverage,Unfragmented precursor intensity,Unfragmented precursor fraction,Neutral loss level,ETD identification type,REVERSE,All scores,All sequences,All modified sequences,MS3 scan numbers,Reporter PIF,Reporter fraction,id,Protein group IDs,Peptide ID,Mod. peptide ID,Evidence ID,Oxidation (M) site IDs,Mass deficit,PEPTIDE_LENGTH +GN20170722_SK_HLA_G0103_R1_02,39581,34737,AAAAAVAGVGRGG,13,,Unmodified,AAAAAVAGVGRGG,,,0,uc009yqv.3;uc001ogi.3;C11orf68_p.V135L_uc001ogi.2|C11orf68,2,CID,FTMS,MULTI-MSMS,8,0.0,514.2858,1026.557,3.036,0.0015614,8.3832641,88.186,0.71744,13.77,3.3555,,,1,0,0,0,39573,1384891.5,0.7223182599737116,-3,0.0863265991210937,y5;y7;a2;b9,2905.48046875;9943.1416015625;3013.589599609375;37873.2109375,-0.002829233181444124;0.008368573916527566;-0.00031301558594520884;-0.00275202985596934,-6.354192112149343;14.597148465958854;-2.7198193653715848;-4.0329222465724435,445.2545865011814;573.3019662054834;115.08690243568594;682.391002779256,4,0.0161473114556132,0.0439560439560439,0,0,,Unknown,False,13.769603755808198;10.41414173872871;9.986874898151301,AAAAAVAGVGRGG;RGLQQPVVM;PLFPVAGVPM,_AAAAAVAGVGRGG_;_RGLQQPVVM_;_PLFPVAGVPM_,,,,0,153,0,0,0,,0.04482492906277,13 +GN20170722_SK_HLA_G0103_R1_01,24282,21318,AAADRNLIYVLK,12,,Unmodified,AAADRNLIYVLK,,,0,UNKNOWN,2,CID,FTMS,MULTI-MSMS,8,1.0,673.89317,1345.7718,-4.268,-0.0028761,747.2514,52.702,0.56055,28.727,0.32818,,,1,0,0,0,24274,4397484.0,0.3726964352547448,10,-0.2357139587402343,y1;y2;y3;y4;y5;y7;y2-NH3;a2,3799.669677734375;138293.265625;18070.681640625;58923.94140625;107806.1171875;70635.7734375;15442.98046875;9986.8359375,-0.000463241690255245;0.00019436417716178767;0.003219772849433866;0.0019772452006918684;0.0012221122285609454;0.002896620233173053;0.0009968129016613148;-0.000993683999936934,-3.148877721252655;0.7469894765873476;8.962184397850063;3.785457364047471;1.9233399457992681;3.358257103880474;4.099254348751434;-8.634154729256231,147.11326741229024;260.1966737868229;359.26206229435064;522.3266333602993;635.4114524736714;862.5367693932668;243.1693222365984;115.08758310409993,8,0.0663361112164589,0.074074074074074,0,0,,Unknown,True,28.726836482416193;28.398655567304367;27.254056396965822,AAADRNLIYVLK;LVRGIAHIFSPH;LVYQEINLARK,_AAADRNLIYVLK_;_LVRGIAHIFSPH_;_LVYQEINLARK_,,,,1,6213,1,1,1,,0.1127299493136888,12 +GN20170722_SK_HLA_G0103_R1_01,32608,28449,AAAGRIAIPGL,11,,Unmodified,AAAGRIAIPGL,,,0,uc002lpr.2;uc002lpq.2;uc002lpp.2,2,CID,FTMS,MSMS,11,,505.31128,1008.608,,,9.1541616,72.138,0.35461,15.662,1.8867,,,1,0,0,0,32597,334279.59375,1.0,0,0.0,y1;y4;y6;a2;b2;b7;b10,17585.08984375;3773.285888671875;47387.72265625;14307.5595703125;3126.1455078125;103400.8515625;2367.97900390625,0.0001248233497790352;-0.0018376640455812776;0.009915978956996696;-0.00043868453276729724;-0.0012951289365901175;-0.004575538846552263;0.004011688101854816,0.9449028581307712;-4.602651610884071;16.997710143135873;-3.8117634975199977;-9.051604693874186;-7.484112246043633;4.566433773179205,132.10178030995021;399.2620343533456;583.3714584785429;115.08702810463276;143.0827991711366;611.3669458887465;878.5166502177981,7,0.0629366207519218,0.0454545454545454,0,0,,Unknown,False,15.66199446558733;13.775330524044264;13.64772730687463,AAAGRIAIPGL;PVARLFPPL;VPVGRLQGAL,_AAAGRIAIPGL_;_PVARLFPPL_;_VPVGRLQGAL_,,,,2,16295,2,2,2,,0.1040544195111579,11 +GN20170722_SK_HLA_G0103_R1_01,35464,30971,AAAIVFLVDRF,11,,Unmodified,AAAIVFLVDRF,,,0,uc011cfx.2;uc003iap.4;uc003ian.4,2,CID,FTMS,MSMS,3,,611.35315,1220.6917,,,7.2936771,78.767,0.35461,15.662,1.4552,,,1,0,0,0,35461,1150588.5,0.4641770522748019,-2,0.0299758911132812,y5;a2;b2;b4;b5,2324.119140625;7897.48388671875;3402.477783203125;8944.435546875;3646.345458984375,0.00016820457972244185;-0.0002067135477687998;-0.0006781696607163212;0.001769698386226537;-0.0026612948673232495,0.2590286824841407;-1.7961534660218355;-4.739721258319645;5.408598572673599;-6.243159057969467,649.3666188212202;115.08679613364777;143.08218221186073;327.2009121120137;426.2737570214673,5,0.018596876451864,0.05,0,0,,Unknown,False,15.66199446558733;14.20677841292237;11.49006305901108,AAAIVFLVDRF;VGAVGHKAANVAK;GRRRGGPPVNR,_AAAIVFLVDRF_;_VGAVGHKAANVAK_;_GRRRGGPPVNR_,,,,3,18307,3,3,3,,0.0902255332816821,11 +GN20170722_SK_HLA_G0103_R2_01,26762,22942,AAALGAVVRLA,11,,Unmodified,AAALGAVVRLA,,,0,UNKNOWN,2,CID,FTMS,MSMS,3,,506.31911,1010.6237,,,-2.2315064,60.764,0.357,14.865,0.089257,,,1,0,0,0,-1,,,0,,y6;y9;y6-NH3;y9-NH3;b9,6704.11572265625;3121.10546875;5720.6767578125;36383.8828125;2903.078125,-7.786020262301463E-05;0.004498815625538555;-0.003963494129493483;-0.012215085613661358;-0.006804483999644617,-0.1238995059129184;5.173715335129975;-6.482743414813657;-14.327833916408876;-8.40572395662594,628.4141494296026;869.5522142455745;611.3914859620295;852.5423790453137;809.5060026662998,5,0.0065090614451238,0.0352112676056338,0,0,,Unknown,True,14.864876125193954;14.775619335231177;14.535294575441029,AAALGAVVRLA;LSGIIKRQP;AAIQILRNL,_AAALGAVVRLA_;_LSGIIKRQP_;_AAIQILRNL_,,,,4,5820,4,4,4,,0.1187772846816415,11 +GN20170722_SK_HLA_G0103_R1_02,36957,32348,AAALLGPSAQVKPS,14,,Unmodified,AAALLGPSAQVKPS,,,0,UNKNOWN,2,CID,FTMS,MSMS,12,,655.37735,1308.7402,,,7.953341,82.433,0.44365,16.632,5.1418,,,1,0,0,0,36945,2145926.75,0.8411612144806966,5,-0.1116790771484375,y8;a2;b2;b4;b10,4655.591796875;16715.123046875;2262.689453125;5398.7060546875;4745.7470703125,-0.007113766089901219;-0.0003434307455876251;0.0001157588298212886;0.0013808909956765092;-0.004194096411310966,-8.745140500668365;-2.9840985164902825;0.8090418412213772;4.220310224306376;-4.763350700971752,813.4536076758899;115.08693285084559;143.0813882833702;327.2013009194043;880.4928871719113,5,0.0204413445189944,0.0349650349650349,0,0,,Unknown,True,16.631834798470333;11.49006305901108;10.82951774543324,AAALLGPSAQVKPS;ILRNHVMVRVG;VGGLVILAMPQVP,_AAALLGPSAQVKPS_;_ILRNHVM(Oxidation (M))VRVG_;_VGGLVILAM(Oxidation (M))PQVP_,,,,5,7349,5,5,5,,0.0981300217742955,14 +GN20170722_SK_HLA_G0103_R1_01,35853,31312,AAALVFFVTA,10,,Unmodified,AAALVFFVTA,,,0,tr|A0A097I0R1|A0A097I0R1_HHV3;tr|A0A097I0Y1|A0A097I0Y1_HHV3;tr|G9IXM9|G9IXM9_HHV3;tr|G9IX13|G9IX13_HHV3;tr|Q0QA15|Q0QA15_HHV3;tr|Q0QA88|Q0QA88_HHV3;tr|Q2PJ42|Q2PJ42_HHV3;tr|R4P4T3|R4P4T3_HHV3;tr|G9IXV1|G9IXV1_HHV3;tr|A0A1C9CWW4|A0A1C9CWW4_HHV3;tr|Q0Q9E6|Q0Q9E6_HHV3;tr|Q0Q973|Q0Q973_HHV3;tr|G9IUZ3|G9IUZ3_HHV3;tr|A0A0F7GK62|A0A0F7GK62_HHV3;tr|A0A0F7CV33|A0A0F7CV33_HHV3;tr|A0A0F7CVA6|A0A0F7CVA6_HHV3;tr|A0A0F7CVQ2|A0A0F7CVQ2_HHV3;tr|A0A0F7CW33|A0A0F7CW33_HHV3;tr|Q0Q9L9|Q0Q9L9_HHV3;sp|P09278|LTP_VZVD;tr|I2CNP0|I2CNP0_HHV3;tr|A0A0F7GJA5|A0A0F7GJA5_HHV3;tr|Q6QCN3|Q6QCN3_HHV3;tr|W5RSJ9|W5RSJ9_HHV3;tr|Q0Q9U2|Q0Q9U2_HHV3;tr|Q0Q858|Q0Q858_HHV3;tr|A0A1B1JF83|A0A1B1JF83_HHV3;tr|G0ZLC3|G0ZLC3_HHV3;tr|Q6QCV5|Q6QCV5_HHV3;tr|A8I3I4|A8I3I4_HHV3;tr|G9IUC7|G9IUC7_HHV3;tr|G9IVD7|G9IVD7_HHV3;tr|G9IW03|G9IW03_HHV3;tr|G9IWE7|G9IWE7_HHV3;tr|G9IWL9|G9IWL9_HHV3;tr|G9IXF7|G9IXF7_HHV3;tr|L7X8T0|L7X8T0_HHV3;tr|A0A0F7GIU8|A0A0F7GIU8_HHV3;tr|A0A0F7GKY0|A0A0F7GKY0_HHV3;tr|A0A1C9CX67|A0A1C9CX67_HHV3;tr|U5NQF8|U5NQF8_HHV3;tr|U5NT66|U5NT66_HHV3;tr|U5NPW9|U5NPW9_HHV3;tr|A0A1B1JGR2|A0A1B1JGR2_HHV3;tr|Q0Q8D1|Q0Q8D1_HHV3;tr|A0A075X7J7|A0A075X7J7_HHV3;tr|A0A076N2D1|A0A076N2D1_HHV3;tr|Q0Q8S7|Q0Q8S7_HHV3;tr|A0A1B1JGW3|A0A1B1JGW3_HHV3;tr|W6EHL9|W6EHL9_HHV3;tr|B0CMS9|B0CMS9_HHV3;tr|A0A1B1JFX5|A0A1B1JFX5_HHV3;tr|A0A1B1JG34|A0A1B1JG34_HHV3;tr|A0A075X1N3|A0A075X1N3_HHV3;tr|G9IY23|G9IY23_HHV3;tr|A4GE96|A4GE96_HHV3;tr|U5NSY8|U5NSY8_HHV3;tr|A0A0F7GLI9|A0A0F7GLI9_HHV3;tr|G9IU55|G9IU55_HHV3;tr|A0A0F7GQA2|A0A0F7GQA2_HHV3;tr|U5NTP5|U5NTP5_HHV3;tr|A0A0F7GLZ1|A0A0F7GLZ1_HHV3;sp|Q4JQX9|LTP_VZVO;tr|A0A0F7GNC3|A0A0F7GNC3_HHV3;tr|A0A0F7GNZ4|A0A0F7GNZ4_HHV3;tr|A0A0F7GPS9|A0A0F7GPS9_HHV3;tr|I7D980|I7D980_HHV3;tr|U5NUP5|U5NUP5_HHV3;tr|G9IW75|G9IW75_HHV3;tr|Q0Q8K4|Q0Q8K4_HHV3;tr|A6XEB1|A6XEB1_HHV3;tr|I7DJA6|I7DJA6_HHV3;tr|W6E6K8|W6E6K8_HHV3;tr|W6E684|W6E684_HHV3;tr|Q0Q900|Q0Q900_HHV3,2,CID,FTMS,MULTI-MSMS,3,0.0,505.28949,1008.5644,2.236,0.0011298,4.7881027,79.666,0.62222,15.381,0.60553,,,1,0,0,0,35850,15369293.0,1.0,0,0.0,y4;y6;y4-H2O;b4,8194.3076171875;9210.5302734375;12286.7236328125;9231.583984375,-0.008737849023532362;-0.006874988596337062;0.0027794625577257648;0.005002444408432893,-19.983727872620598;-10.060225299391472;6.6299842599590635;15.28875271403542,437.2481990962236;683.3831640681964;419.2261170983423;327.1976793659915,4,0.0050300564660886,0.0526315789473684,0,0,,Unknown,False,15.381154005585476;14.775619335231177;12.988381952877914,AAALVFFVTA;VPLSPPWLT;PTKLYKLM,_AAALVFFVTA_;_VPLSPPWLT_;_PTKLYKLM(Oxidation (M))_,,,,6,11912,6,6,6,,0.0604783245398721,10 +GN20170722_SK_HLA_G0103_R1_01,37465,32769,AAAMAFG,7,,Unmodified,AAAMAFG,,,0,tr|U5NU36|U5NU36_HHV3;tr|Q0Q9Y9|Q0Q9Y9_HHV3;tr|I7EGL3|I7EGL3_HHV3;tr|I2CNR6|I2CNR6_HHV3;tr|G9IXB0|G9IXB0_HHV3;tr|G9IVV6|G9IVV6_HHV3;tr|G9IVG2|G9IVG2_HHV3;tr|G9IUM4|G9IUM4_HHV3;tr|B0CMV6|B0CMV6_HHV3;tr|A0A1C9CX38|A0A1C9CX38_HHV3;tr|A0A0F7GMU7|A0A0F7GMU7_HHV3;tr|A0A0F7GKV3|A0A0F7GKV3_HHV3;tr|A0A0F7GJZ8|A0A0F7GJZ8_HHV3;sp|Q4JQS7|AN_VZVO;sp|P09253|AN_VZVD,1,CID,FTMS,MULTI-MSMS,5,0.0,638.29666,637.28938,-2.6899,-0.0017169,2.2618452,83.465,0.69237,3.3758,3.3758,,,1,0,0,0,37460,49799916.0,0.6104119988864497,-6,0.1514968872070312,y4,32493.693359375,0.00040581233241709924,0.9544372849576236,425.18491137436763,1,0.000436925102919,0.010204081632653,0,0,,Unknown,False,3.3758226685180976;0;0,AAAMAFG;PFFGGGG;GFGPFGG,_AAAMAFG_;_PFFGGGG_;_GFGPFGG_,,,,7,11602,7,7,7,,-0.0437710322582916,7 +GN20170722_SK_HLA_G0103_R1_01,4878,3972,AAAMLRK,7,,Unmodified,AAAMLRK,,,0,uc001vne.3;uc010tik.1;uc010til.1;uc001vnf.1,2,CID,FTMS,MSMS,5,,380.72854,759.44253,,,-0.89752058,11.884,1.0478,38.202,10.885,,,1,0,0,0,4873,3145282.0,1.0,0,0.0,y3;y4;y3-NH3;y4-NH3;b3,92125.1015625;475564.0625;5908.86328125;26057.03515625;47402.09765625,-0.00042149807143232465;-0.00030228005061871954;-0.0030104841815727923;0.0005637190507741252;-5.349210823624162E-06,-1.012490249173898;-0.5522723208365405;-7.539887044452489;1.0629963883454507;-0.024982464132262953,416.29840067717146;547.3387660653506;399.2744405617816;530.3113509647492;214.11862317921083,5,0.2038884927238479,0.0625,0,0,,Unknown,False,38.20205643361177;27.3166592096155;27.3166592096155,AAAMLRK;GGVRMLK;GGVLRMK,_AAAMLRK_;_GGVRMLK_;_GGVLRMK_,,,,8,14949,8,8,8,,0.053185118906299,7 diff --git a/tests/unit_tests/data/msms_internal_tmt.csv b/tests/unit_tests/data/msms_internal_tmt.csv new file mode 100644 index 0000000..ba520ac --- /dev/null +++ b/tests/unit_tests/data/msms_internal_tmt.csv @@ -0,0 +1,10 @@ +RAW_FILE,SCAN_NUMBER,Scan index,SEQUENCE,Length,Missed cleavages,Modifications,MODIFIED_SEQUENCE,Oxidation (M) Probabilities,Oxidation (M) Score diffs,Oxidation (M),PROTEINS,PRECURSOR_CHARGE,Fragmentation,Mass analyzer,Type,SCAN_EVENT_NUMBER,Isotope index,m/z,MASS,Mass error [ppm],Mass error [Da],Simple mass error [ppm],Retention time,PEP,SCORE,Delta score,Score diff,Localization prob,Combinatorics,PIF,Fraction of total spectrum,Base peak fraction,Precursor full scan number,Precursor Intensity,Precursor apex fraction,Precursor apex offset,Precursor apex offset time,Matches,Intensities,Mass deviations [Da],Mass deviations [ppm],Masses,Number of matches,Intensity coverage,Peak coverage,Unfragmented precursor intensity,Unfragmented precursor fraction,Neutral loss level,ETD identification type,REVERSE,All scores,All sequences,All modified sequences,MS3 scan numbers,Reporter PIF,Reporter fraction,id,Protein group IDs,Peptide ID,Mod. peptide ID,Evidence ID,Oxidation (M) site IDs,Mass deficit,PEPTIDE_LENGTH +GN20170722_SK_HLA_G0103_R1_02,39581,34737,AAAAAVAGVGRGG,13,,Unmodified,[UNIMOD:2016]-AAAAAVAGVGRGG,,,0,uc009yqv.3;uc001ogi.3;C11orf68_p.V135L_uc001ogi.2|C11orf68,2,CID,FTMS,MULTI-MSMS,8,0.0,514.2858,1026.557,3.036,0.0015614,8.3832641,88.186,0.71744,13.77,3.3555,,,1,0,0,0,39573,1384891.5,0.7223182599737116,-3,0.0863265991210937,y5;y7;a2;b9,2905.48046875;9943.1416015625;3013.589599609375;37873.2109375,-0.002829233181444124;0.008368573916527566;-0.00031301558594520884;-0.00275202985596934,-6.354192112149343;14.597148465958854;-2.7198193653715848;-4.0329222465724435,445.2545865011814;573.3019662054834;115.08690243568594;682.391002779256,4,0.0161473114556132,0.0439560439560439,0,0,,Unknown,False,13.769603755808198;10.41414173872871;9.986874898151301,AAAAAVAGVGRGG;RGLQQPVVM;PLFPVAGVPM,_AAAAAVAGVGRGG_;_RGLQQPVVM_;_PLFPVAGVPM_,,,,0,153,0,0,0,,0.04482492906277,13 +GN20170722_SK_HLA_G0103_R1_01,24282,21318,AAADRNLIYVLK,12,,Unmodified,[UNIMOD:2016]-AAADRNLIYVLK[UNIMOD:2016],,,0,UNKNOWN,2,CID,FTMS,MULTI-MSMS,8,1.0,673.89317,1345.7718,-4.268,-0.0028761,747.2514,52.702,0.56055,28.727,0.32818,,,1,0,0,0,24274,4397484.0,0.3726964352547448,10,-0.2357139587402343,y1;y2;y3;y4;y5;y7;y2-NH3;a2,3799.669677734375;138293.265625;18070.681640625;58923.94140625;107806.1171875;70635.7734375;15442.98046875;9986.8359375,-0.000463241690255245;0.00019436417716178767;0.003219772849433866;0.0019772452006918684;0.0012221122285609454;0.002896620233173053;0.0009968129016613148;-0.000993683999936934,-3.148877721252655;0.7469894765873476;8.962184397850063;3.785457364047471;1.9233399457992681;3.358257103880474;4.099254348751434;-8.634154729256231,147.11326741229024;260.1966737868229;359.26206229435064;522.3266333602993;635.4114524736714;862.5367693932668;243.1693222365984;115.08758310409993,8,0.0663361112164589,0.074074074074074,0,0,,Unknown,True,28.726836482416193;28.398655567304367;27.254056396965822,AAADRNLIYVLK;LVRGIAHIFSPH;LVYQEINLARK,_AAADRNLIYVLK_;_LVRGIAHIFSPH_;_LVYQEINLARK_,,,,1,6213,1,1,1,,0.1127299493136888,12 +GN20170722_SK_HLA_G0103_R1_01,32608,28449,AAAGRIAIPGL,11,,Unmodified,[UNIMOD:2016]-AAAGRIAIPGL,,,0,uc002lpr.2;uc002lpq.2;uc002lpp.2,2,CID,FTMS,MSMS,11,,505.31128,1008.608,,,9.1541616,72.138,0.35461,15.662,1.8867,,,1,0,0,0,32597,334279.59375,1.0,0,0.0,y1;y4;y6;a2;b2;b7;b10,17585.08984375;3773.285888671875;47387.72265625;14307.5595703125;3126.1455078125;103400.8515625;2367.97900390625,0.0001248233497790352;-0.0018376640455812776;0.009915978956996696;-0.00043868453276729724;-0.0012951289365901175;-0.004575538846552263;0.004011688101854816,0.9449028581307712;-4.602651610884071;16.997710143135873;-3.8117634975199977;-9.051604693874186;-7.484112246043633;4.566433773179205,132.10178030995021;399.2620343533456;583.3714584785429;115.08702810463276;143.0827991711366;611.3669458887465;878.5166502177981,7,0.0629366207519218,0.0454545454545454,0,0,,Unknown,False,15.66199446558733;13.775330524044264;13.64772730687463,AAAGRIAIPGL;PVARLFPPL;VPVGRLQGAL,_AAAGRIAIPGL_;_PVARLFPPL_;_VPVGRLQGAL_,,,,2,16295,2,2,2,,0.1040544195111579,11 +GN20170722_SK_HLA_G0103_R1_01,35464,30971,AAAIVFLVDRF,11,,Unmodified,[UNIMOD:2016]-AAAIVFLVDRF,,,0,uc011cfx.2;uc003iap.4;uc003ian.4,2,CID,FTMS,MSMS,3,,611.35315,1220.6917,,,7.2936771,78.767,0.35461,15.662,1.4552,,,1,0,0,0,35461,1150588.5,0.4641770522748019,-2,0.0299758911132812,y5;a2;b2;b4;b5,2324.119140625;7897.48388671875;3402.477783203125;8944.435546875;3646.345458984375,0.00016820457972244185;-0.0002067135477687998;-0.0006781696607163212;0.001769698386226537;-0.0026612948673232495,0.2590286824841407;-1.7961534660218355;-4.739721258319645;5.408598572673599;-6.243159057969467,649.3666188212202;115.08679613364777;143.08218221186073;327.2009121120137;426.2737570214673,5,0.018596876451864,0.05,0,0,,Unknown,False,15.66199446558733;14.20677841292237;11.49006305901108,AAAIVFLVDRF;VGAVGHKAANVAK;GRRRGGPPVNR,_AAAIVFLVDRF_;_VGAVGHKAANVAK_;_GRRRGGPPVNR_,,,,3,18307,3,3,3,,0.0902255332816821,11 +GN20170722_SK_HLA_G0103_R2_01,26762,22942,AAALGAVVRLA,11,,Unmodified,[UNIMOD:2016]-AAALGAVVRLA,,,0,UNKNOWN,2,CID,FTMS,MSMS,3,,506.31911,1010.6237,,,-2.2315064,60.764,0.357,14.865,0.089257,,,1,0,0,0,-1,,,0,,y6;y9;y6-NH3;y9-NH3;b9,6704.11572265625;3121.10546875;5720.6767578125;36383.8828125;2903.078125,-7.786020262301463E-05;0.004498815625538555;-0.003963494129493483;-0.012215085613661358;-0.006804483999644617,-0.1238995059129184;5.173715335129975;-6.482743414813657;-14.327833916408876;-8.40572395662594,628.4141494296026;869.5522142455745;611.3914859620295;852.5423790453137;809.5060026662998,5,0.0065090614451238,0.0352112676056338,0,0,,Unknown,True,14.864876125193954;14.775619335231177;14.535294575441029,AAALGAVVRLA;LSGIIKRQP;AAIQILRNL,_AAALGAVVRLA_;_LSGIIKRQP_;_AAIQILRNL_,,,,4,5820,4,4,4,,0.1187772846816415,11 +GN20170722_SK_HLA_G0103_R1_02,36957,32348,AAALLGPSAQVKPS,14,,Unmodified,[UNIMOD:2016]-AAALLGPSAQVK[UNIMOD:2016]PS,,,0,UNKNOWN,2,CID,FTMS,MSMS,12,,655.37735,1308.7402,,,7.953341,82.433,0.44365,16.632,5.1418,,,1,0,0,0,36945,2145926.75,0.8411612144806966,5,-0.1116790771484375,y8;a2;b2;b4;b10,4655.591796875;16715.123046875;2262.689453125;5398.7060546875;4745.7470703125,-0.007113766089901219;-0.0003434307455876251;0.0001157588298212886;0.0013808909956765092;-0.004194096411310966,-8.745140500668365;-2.9840985164902825;0.8090418412213772;4.220310224306376;-4.763350700971752,813.4536076758899;115.08693285084559;143.0813882833702;327.2013009194043;880.4928871719113,5,0.0204413445189944,0.0349650349650349,0,0,,Unknown,True,16.631834798470333;11.49006305901108;10.82951774543324,AAALLGPSAQVKPS;ILRNHVMVRVG;VGGLVILAMPQVP,_AAALLGPSAQVKPS_;_ILRNHVM(Oxidation (M))VRVG_;_VGGLVILAM(Oxidation (M))PQVP_,,,,5,7349,5,5,5,,0.0981300217742955,14 +GN20170722_SK_HLA_G0103_R1_01,35853,31312,AAALVFFVTA,10,,Unmodified,[UNIMOD:2016]-AAALVFFVTA,,,0,tr|A0A097I0R1|A0A097I0R1_HHV3;tr|A0A097I0Y1|A0A097I0Y1_HHV3;tr|G9IXM9|G9IXM9_HHV3;tr|G9IX13|G9IX13_HHV3;tr|Q0QA15|Q0QA15_HHV3;tr|Q0QA88|Q0QA88_HHV3;tr|Q2PJ42|Q2PJ42_HHV3;tr|R4P4T3|R4P4T3_HHV3;tr|G9IXV1|G9IXV1_HHV3;tr|A0A1C9CWW4|A0A1C9CWW4_HHV3;tr|Q0Q9E6|Q0Q9E6_HHV3;tr|Q0Q973|Q0Q973_HHV3;tr|G9IUZ3|G9IUZ3_HHV3;tr|A0A0F7GK62|A0A0F7GK62_HHV3;tr|A0A0F7CV33|A0A0F7CV33_HHV3;tr|A0A0F7CVA6|A0A0F7CVA6_HHV3;tr|A0A0F7CVQ2|A0A0F7CVQ2_HHV3;tr|A0A0F7CW33|A0A0F7CW33_HHV3;tr|Q0Q9L9|Q0Q9L9_HHV3;sp|P09278|LTP_VZVD;tr|I2CNP0|I2CNP0_HHV3;tr|A0A0F7GJA5|A0A0F7GJA5_HHV3;tr|Q6QCN3|Q6QCN3_HHV3;tr|W5RSJ9|W5RSJ9_HHV3;tr|Q0Q9U2|Q0Q9U2_HHV3;tr|Q0Q858|Q0Q858_HHV3;tr|A0A1B1JF83|A0A1B1JF83_HHV3;tr|G0ZLC3|G0ZLC3_HHV3;tr|Q6QCV5|Q6QCV5_HHV3;tr|A8I3I4|A8I3I4_HHV3;tr|G9IUC7|G9IUC7_HHV3;tr|G9IVD7|G9IVD7_HHV3;tr|G9IW03|G9IW03_HHV3;tr|G9IWE7|G9IWE7_HHV3;tr|G9IWL9|G9IWL9_HHV3;tr|G9IXF7|G9IXF7_HHV3;tr|L7X8T0|L7X8T0_HHV3;tr|A0A0F7GIU8|A0A0F7GIU8_HHV3;tr|A0A0F7GKY0|A0A0F7GKY0_HHV3;tr|A0A1C9CX67|A0A1C9CX67_HHV3;tr|U5NQF8|U5NQF8_HHV3;tr|U5NT66|U5NT66_HHV3;tr|U5NPW9|U5NPW9_HHV3;tr|A0A1B1JGR2|A0A1B1JGR2_HHV3;tr|Q0Q8D1|Q0Q8D1_HHV3;tr|A0A075X7J7|A0A075X7J7_HHV3;tr|A0A076N2D1|A0A076N2D1_HHV3;tr|Q0Q8S7|Q0Q8S7_HHV3;tr|A0A1B1JGW3|A0A1B1JGW3_HHV3;tr|W6EHL9|W6EHL9_HHV3;tr|B0CMS9|B0CMS9_HHV3;tr|A0A1B1JFX5|A0A1B1JFX5_HHV3;tr|A0A1B1JG34|A0A1B1JG34_HHV3;tr|A0A075X1N3|A0A075X1N3_HHV3;tr|G9IY23|G9IY23_HHV3;tr|A4GE96|A4GE96_HHV3;tr|U5NSY8|U5NSY8_HHV3;tr|A0A0F7GLI9|A0A0F7GLI9_HHV3;tr|G9IU55|G9IU55_HHV3;tr|A0A0F7GQA2|A0A0F7GQA2_HHV3;tr|U5NTP5|U5NTP5_HHV3;tr|A0A0F7GLZ1|A0A0F7GLZ1_HHV3;sp|Q4JQX9|LTP_VZVO;tr|A0A0F7GNC3|A0A0F7GNC3_HHV3;tr|A0A0F7GNZ4|A0A0F7GNZ4_HHV3;tr|A0A0F7GPS9|A0A0F7GPS9_HHV3;tr|I7D980|I7D980_HHV3;tr|U5NUP5|U5NUP5_HHV3;tr|G9IW75|G9IW75_HHV3;tr|Q0Q8K4|Q0Q8K4_HHV3;tr|A6XEB1|A6XEB1_HHV3;tr|I7DJA6|I7DJA6_HHV3;tr|W6E6K8|W6E6K8_HHV3;tr|W6E684|W6E684_HHV3;tr|Q0Q900|Q0Q900_HHV3,2,CID,FTMS,MULTI-MSMS,3,0.0,505.28949,1008.5644,2.236,0.0011298,4.7881027,79.666,0.62222,15.381,0.60553,,,1,0,0,0,35850,15369293.0,1.0,0,0.0,y4;y6;y4-H2O;b4,8194.3076171875;9210.5302734375;12286.7236328125;9231.583984375,-0.008737849023532362;-0.006874988596337062;0.0027794625577257648;0.005002444408432893,-19.983727872620598;-10.060225299391472;6.6299842599590635;15.28875271403542,437.2481990962236;683.3831640681964;419.2261170983423;327.1976793659915,4,0.0050300564660886,0.0526315789473684,0,0,,Unknown,False,15.381154005585476;14.775619335231177;12.988381952877914,AAALVFFVTA;VPLSPPWLT;PTKLYKLM,_AAALVFFVTA_;_VPLSPPWLT_;_PTKLYKLM(Oxidation (M))_,,,,6,11912,6,6,6,,0.0604783245398721,10 +GN20170722_SK_HLA_G0103_R1_01,37465,32769,AAAMAFG,7,,Unmodified,[UNIMOD:2016]-AAAMAFG,,,0,tr|U5NU36|U5NU36_HHV3;tr|Q0Q9Y9|Q0Q9Y9_HHV3;tr|I7EGL3|I7EGL3_HHV3;tr|I2CNR6|I2CNR6_HHV3;tr|G9IXB0|G9IXB0_HHV3;tr|G9IVV6|G9IVV6_HHV3;tr|G9IVG2|G9IVG2_HHV3;tr|G9IUM4|G9IUM4_HHV3;tr|B0CMV6|B0CMV6_HHV3;tr|A0A1C9CX38|A0A1C9CX38_HHV3;tr|A0A0F7GMU7|A0A0F7GMU7_HHV3;tr|A0A0F7GKV3|A0A0F7GKV3_HHV3;tr|A0A0F7GJZ8|A0A0F7GJZ8_HHV3;sp|Q4JQS7|AN_VZVO;sp|P09253|AN_VZVD,1,CID,FTMS,MULTI-MSMS,5,0.0,638.29666,637.28938,-2.6899,-0.0017169,2.2618452,83.465,0.69237,3.3758,3.3758,,,1,0,0,0,37460,49799916.0,0.6104119988864497,-6,0.1514968872070312,y4,32493.693359375,0.00040581233241709924,0.9544372849576236,425.18491137436763,1,0.000436925102919,0.010204081632653,0,0,,Unknown,False,3.3758226685180976;0;0,AAAMAFG;PFFGGGG;GFGPFGG,_AAAMAFG_;_PFFGGGG_;_GFGPFGG_,,,,7,11602,7,7,7,,-0.0437710322582916,7 +GN20170722_SK_HLA_G0103_R1_01,4878,3972,AAAMLRK,7,,Unmodified,[UNIMOD:2016]-AAAMLRK[UNIMOD:2016],,,0,uc001vne.3;uc010tik.1;uc010til.1;uc001vnf.1,2,CID,FTMS,MSMS,5,,380.72854,759.44253,,,-0.89752058,11.884,1.0478,38.202,10.885,,,1,0,0,0,4873,3145282.0,1.0,0,0.0,y3;y4;y3-NH3;y4-NH3;b3,92125.1015625;475564.0625;5908.86328125;26057.03515625;47402.09765625,-0.00042149807143232465;-0.00030228005061871954;-0.0030104841815727923;0.0005637190507741252;-5.349210823624162E-06,-1.012490249173898;-0.5522723208365405;-7.539887044452489;1.0629963883454507;-0.024982464132262953,416.29840067717146;547.3387660653506;399.2744405617816;530.3113509647492;214.11862317921083,5,0.2038884927238479,0.0625,0,0,,Unknown,False,38.20205643361177;27.3166592096155;27.3166592096155,AAAMLRK;GGVRMLK;GGVLRMK,_AAAMLRK_;_GGVRMLK_;_GGVLRMK_,,,,8,14949,8,8,8,,0.053185118906299,7 diff --git a/tests/unit_tests/data/psm_mods.pepXML b/tests/unit_tests/data/psm_mods.pepXML index b2a5ca5..a33aed5 100644 --- a/tests/unit_tests/data/psm_mods.pepXML +++ b/tests/unit_tests/data/psm_mods.pepXML @@ -127,7 +127,7 @@ - + diff --git a/tests/unit_tests/test_maxquant.py b/tests/unit_tests/test_maxquant.py index 4bb4783..03cb6cf 100644 --- a/tests/unit_tests/test_maxquant.py +++ b/tests/unit_tests/test_maxquant.py @@ -1,12 +1,28 @@ import io +import unittest +from pathlib import Path import numpy as np import pandas as pd import pytest -import spectrum_io.search_result.maxquant as mq +from spectrum_io.search_result.maxquant import MaxQuant from spectrum_io.search_result.search_results import filter_valid_prosit_sequences +COLUMNS = [ + "RAW_FILE", + "SCAN_NUMBER", + "MODIFIED_SEQUENCE", + "PRECURSOR_CHARGE", + "SCAN_EVENT_NUMBER", + "MASS", + "SCORE", + "REVERSE", + "SEQUENCE", + "PEPTIDE_LENGTH", + "PROTEINS", +] + class TestAddTMTMod: """Class to test tmt modification addition.""" @@ -14,115 +30,48 @@ class TestAddTMTMod: def test_add_tmt_mod(self): """Test addition of tmt modification.""" assert ( - mq.MaxQuant.add_tmt_mod(1.0, "[UNIMOD:2016]ABC[UNIMOD:4]K[UNIMOD:2016]", "[UNIMOD:2016]") + MaxQuant.add_tmt_mod(1.0, "[UNIMOD:2016]ABC[UNIMOD:4]K[UNIMOD:2016]", "[UNIMOD:2016]") == 1.0 + 2 * 304.207146 ) -class TestUpdateColumns: - """Class to test update columns.""" - - def test_update_columns(self, maxquant_df: pd.DataFrame): - """ - Test column update. - - :param maxquant_df: maxquant df as pd.DataFrame - """ - prosit_df = mq.MaxQuant.update_columns_for_prosit(maxquant_df, tmt_labeled="") - assert not prosit_df["REVERSE"][0] - assert prosit_df["REVERSE"][3] - - assert prosit_df["MODIFIED_SEQUENCE"][0] == "DS[UNIMOD:21]DS[UNIMOD:21]WDADAFSVEDPVRK" - assert prosit_df["MODIFIED_SEQUENCE"][3] == "SS[UNIMOD:21]PTPES[UNIMOD:21]PTMLTK" - - assert prosit_df["SEQUENCE"][0] == "DSDSWDADAFSVEDPVRK" - assert prosit_df["SEQUENCE"][3] == "SSPTPESPTMLTK" - - assert prosit_df["PEPTIDE_LENGTH"][0] == 18 - assert prosit_df["PEPTIDE_LENGTH"][3] == 13 - - assert prosit_df["PROTEINS"][0] == "P12345" - assert prosit_df["PROTEINS"][3] == "Q67890" - - def test_update_columns_silac(self, maxquant_df: pd.DataFrame): - """ - Test column update silac. +class TestMaxQuant(unittest.TestCase): + """Class to test MSFragger.""" - :param maxquant_df: maxquant df as pd.DataFrame - """ - maxquant_df["LABELING_STATE"] = [1, 1, 1, 2, 2] - prosit_df = mq.MaxQuant.update_columns_for_prosit(maxquant_df, tmt_labeled="") - assert prosit_df["MODIFIED_SEQUENCE"][0] == "DS[UNIMOD:21]DS[UNIMOD:21]WDADAFSVEDPVR[UNIMOD:267]K[UNIMOD:259]" - assert prosit_df["MODIFIED_SEQUENCE"][3] == "SS[UNIMOD:21]PTPES[UNIMOD:21]PTMLTK" + def test_read_maxquant(self): + """Test function for reading msfragger results and transforming to Prosit format.""" + expected_df_path = Path(__file__).parent / "data" / "msms_internal.csv" - assert prosit_df["MASS"][0] == 1.0 + 8.014199 + 10.008269 - assert prosit_df["MASS"][3] == 2.0 + internal_search_results_df = MaxQuant(Path(__file__).parent / "data" / "msms.txt").read_result() + expected_df = pd.read_csv(expected_df_path) - def test_update_columns_tmt(self, maxquant_df: pd.DataFrame): - """ - Test column update tmt. + pd.testing.assert_frame_equal(internal_search_results_df[COLUMNS], expected_df[COLUMNS]) - :param maxquant_df: maxquant df as pd.DataFrame - """ - prosit_df = mq.MaxQuant.update_columns_for_prosit(maxquant_df, tmt_labeled="tmt") - assert prosit_df["MODIFIED_SEQUENCE"][0] == "[UNIMOD:737]-DS[UNIMOD:21]DS[UNIMOD:21]WDADAFSVEDPVRK[UNIMOD:737]" - assert prosit_df["MODIFIED_SEQUENCE"][3] == "[UNIMOD:737]-SS[UNIMOD:21]PTPES[UNIMOD:21]PTMLTK[UNIMOD:737]" - - assert prosit_df["MASS"][0] == 1.0 + 2 * 229.162932 - assert prosit_df["MASS"][3] == 2.0 + 2 * 229.162932 - - def test_update_columns_tmt_msa(self, maxquant_df: pd.DataFrame): - """ - Test column update tmt msa. - - :param maxquant_df: maxquant df as pd.DataFrame - """ - prosit_df = mq.MaxQuant.update_columns_for_prosit(maxquant_df, tmt_labeled="tmt_msa") - assert ( - prosit_df["MODIFIED_SEQUENCE_MSA"][0] == "[UNIMOD:737]-DS[UNIMOD:23]DS[UNIMOD:23]WDADAFSVEDPVRK[UNIMOD:737]" + def test_read_maxquant_with_custom_mods(self): + """Test function for reading msfragger results and transforming to Prosit format with custom mods.""" + expected_df_path = Path(__file__).parent / "data" / "msms_internal.csv" + custom_mods = {"M(Oxidation (M)": 35, "C": 4, "S(Phospho (STY))": 21} + internal_search_results_df = MaxQuant(Path(__file__).parent / "data" / "msms.txt").read_result( + custom_mods=custom_mods ) - assert prosit_df["MODIFIED_SEQUENCE_MSA"][3] == "[UNIMOD:737]-SS[UNIMOD:23]PTPES[UNIMOD:23]PTMLTK[UNIMOD:737]" - - def test_filter_valid_prosit_sequences(self, invalid_df: pd.DataFrame): - """Test filter_valid_prosit_sequences.""" - filtered_df = filter_valid_prosit_sequences(invalid_df) - assert filtered_df["MODIFIED_SEQUENCE"][0] == "ABCDEFG" - assert len(filtered_df) == 1 - assert "(ac)" not in filtered_df["MODIFIED_SEQUENCE"] - assert "(Acetyl (Protein N-term))" not in filtered_df["MODIFIED_SEQUENCE"] - assert "U" not in filtered_df["SEQUENCE"] - assert filtered_df["PEPTIDE_LENGTH"].min() >= 7 - assert filtered_df["PRECURSOR_CHARGE"].max() <= 6 - - -@pytest.fixture -def maxquant_df(): - """Create dataframes from strings: https://towardsdatascience.com/67b0c2b71e6a.""" - df_string = """ MODIFIED_SEQUENCE; REVERSE; MASS; PROTEINS; -_DS(Phospho (STY))DS(Phospho (STY))WDADAFSVEDPVRK_; ; 1.0; P12345; -_DS(Phospho (STY))DS(Phospho (STY))WDADAFSVEDPVRK_; ; 1.0; P12345; -_DS(Phospho (STY))DSWDADAFS(Phospho (STY))VEDPVRK_; ; 1.0; P12345; - _SS(Phospho (STY))PTPES(Phospho (STY))PTMLTK_; +; 2.0; Q67890; - _SS(Phospho (STY))PTPES(Phospho (STY))PTMLTK_; +; 2.0; Q67890;""" - df = pd.read_csv(io.StringIO(df_string), delimiter=";", skipinitialspace=True) - df["Charge"] = 2 - return df - - -@pytest.fixture -def invalid_df(): - """Create invalid df.""" - df = pd.DataFrame( - { - "PEPTIDE_LENGTH": [7, 7, 6, 32], - "MODIFIED_SEQUENCE": [ - "ABCDEFG", - "GHD(ac)IJKL", - "MN(Acetyl (Protein N-term))OPQR", - "STUVWDEFSTUVWDEFSTUVWDEFSTUVWDEF", - ], - "SEQUENCE": ["ABCDEFG", "GHDIJKL", "MNOPQR", "STUVWDEFSTUVWDEFSTUVWDEFSTUVWDEF"], - "PRECURSOR_CHARGE": [2, 5, 7, 6], + expected_df = pd.read_csv(expected_df_path) + + pd.testing.assert_frame_equal(internal_search_results_df[COLUMNS], expected_df[COLUMNS]) + + def test_read_maxquant_with_custom_mods_with_tmt(self): + """Test function for reading msfragger results and transforming to Prosit format with custom mods.""" + expected_df_path = Path(__file__).parent / "data" / "msms_internal_tmt.csv" + internal_search_results_df = MaxQuant(Path(__file__).parent / "data" / "msms.txt").read_result(tmt_label="") + custom_mods = { + "M(Oxidation (M)": 35, + "C": 4, + "K": 2016, + "^": 2016, } - ) - return df + + internal_search_results_df = MaxQuant(Path(__file__).parent / "data" / "msms.txt").read_result( + custom_mods=custom_mods + ) + expected_df = pd.read_csv(expected_df_path) + + pd.testing.assert_frame_equal(internal_search_results_df[COLUMNS], expected_df[COLUMNS]) diff --git a/tests/unit_tests/test_msfragger.py b/tests/unit_tests/test_msfragger.py index 86be885..e07c4ac 100644 --- a/tests/unit_tests/test_msfragger.py +++ b/tests/unit_tests/test_msfragger.py @@ -5,6 +5,20 @@ from spectrum_io.search_result.msfragger import MSFragger +COLUMNS = [ + "RAW_FILE", + "SCAN_NUMBER", + "MODIFIED_SEQUENCE", + "PRECURSOR_CHARGE", + "SCAN_EVENT_NUMBER", + "MASS", + "SCORE", + "REVERSE", + "SEQUENCE", + "PEPTIDE_LENGTH", + "PROTEINS", +] + class TestMSFragger(unittest.TestCase): """Class to test MSFragger.""" @@ -31,25 +45,35 @@ def test_read_msfragger(self): expected_msfragger_internal_path = Path(__file__).parent / "data" / "psm_tmt_internal.csv" internal_search_results_df = MSFragger(Path(__file__).parent / "data" / "psm_tmt.pepXML").read_result( - tmt_labeled="tmtpro" + tmt_label="tmtpro" ) expected_df = pd.read_csv(expected_msfragger_internal_path, index_col=0) - print("Internal Search Results Columns:", internal_search_results_df.columns) - print("Expected Columns:", expected_df.columns) - pd.testing.assert_frame_equal(internal_search_results_df, expected_df) + pd.testing.assert_frame_equal(internal_search_results_df[COLUMNS], expected_df[COLUMNS]) - def test_read_msfragger_mods(self): + def test_read_msfragger_with_custom_mods(self): """Test function for reading msfragger results and transforming to Prosit format with custom mods.""" - expected_msfragger_internal_path = Path(__file__).parent / "data" / "psm_tmt_internal_mods.csv" - stat_mod = {"M[35]": "[UNIMOD:35]"} - var_mod = {"[41]": "[UNIMOD:41]"} + expected_msfragger_internal_path = Path(__file__).parent / "data" / "psm_tmt_internal.csv" + custom_mods = { + "M[147]": 35, + "C": 4, + } + + internal_search_results_df = MSFragger(Path(__file__).parent / "data" / "psm_tmt.pepXML").read_result( + tmt_label="tmtpro", custom_mods=custom_mods + ) + expected_df = pd.read_csv(expected_msfragger_internal_path, index_col=0) + + pd.testing.assert_frame_equal(internal_search_results_df[COLUMNS], expected_df[COLUMNS]) - internal_search_results_df = MSFragger(Path(__file__).parent / "data" / "psm_mods.pepXML").read_result( - tmt_labeled="tmtpro", stat_mods=stat_mod, var_mods=var_mod + def test_read_msfragger_with_custom_mods_with_tmt(self): + """Test function for reading msfragger results and transforming to Prosit format with custom mods and explicit TMT.""" + expected_msfragger_internal_path = Path(__file__).parent / "data" / "psm_tmt_internal.csv" + custom_mods = {"M[147]": 35, "C": 4, "^n[305]": 2016, "K": 2016} + + internal_search_results_df = MSFragger(Path(__file__).parent / "data" / "psm_tmt.pepXML").read_result( + custom_mods=custom_mods ) expected_df = pd.read_csv(expected_msfragger_internal_path, index_col=0) - print("Internal Search Results Columns:", internal_search_results_df.columns) - print("Expected Columns:", expected_df.columns) - pd.testing.assert_frame_equal(internal_search_results_df, expected_df) + pd.testing.assert_frame_equal(internal_search_results_df[COLUMNS], expected_df[COLUMNS]) diff --git a/tests/unit_tests/test_sage.py b/tests/unit_tests/test_sage.py index f571923..0169777 100644 --- a/tests/unit_tests/test_sage.py +++ b/tests/unit_tests/test_sage.py @@ -5,25 +5,52 @@ from spectrum_io.search_result import Sage +COLUMNS = [ + "RAW_FILE", + "SCAN_NUMBER", + "MODIFIED_SEQUENCE", + "PRECURSOR_CHARGE", + "MASS", + "SCORE", + "REVERSE", + "SEQUENCE", + "PEPTIDE_LENGTH", + "PROTEINS", +] + class TestSage(unittest.TestCase): - """Test vlass to check Sage search result processing.""" + """Test class to check Sage search result processing.""" def test_read_sage(self): """Test function for reading sage results and transforming to Prosit format.""" expected_sage_internal_path = Path(__file__).parent / "data" / "sage_output_internal.csv" - internal_search_results_df = ( - Sage(Path(__file__).parent / "data" / "sage_output.tsv").read_result().reset_index(drop=True) + internal_search_results_df = Sage(Path(__file__).parent / "data" / "sage_output.tsv").read_result( + tmt_label="tmt" + ) + expected_df = pd.read_csv(expected_sage_internal_path) + pd.testing.assert_frame_equal(internal_search_results_df[COLUMNS], expected_df[COLUMNS]) + + def test_read_msfragger_with_custom_mods(self): + """Test function for reading sage results with custom mods and transforming to Prosit format .""" + custom_mods = { + "C[+57.0215]": 4, + "M[+15.9948]": 35, + "M[+15.994]": 35, + } + expected_sage_internal_path = Path(__file__).parent / "data" / "sage_output_internal_mods.csv" + internal_search_results_df = Sage(Path(__file__).parent / "data" / "sage_output_mods.tsv").read_result( + custom_mods=custom_mods, tmt_label="tmt" ) expected_df = pd.read_csv(expected_sage_internal_path) pd.testing.assert_frame_equal(internal_search_results_df, expected_df) - def test_read_sage_custom(self): + def test_read_msfragger_with_custom_mods_with_tmt(self): """Test function for reading sage results with custom mods and transforming to Prosit format .""" - stat_mods = {"15.9948": "[UNIMOD:35]"} - expected_sage_internal_path = Path.cwd() / "data" / "sage_output_internal_mods.csv" - internal_search_results_df = ( - Sage(Path.cwd() / "data" / "sage_output_mods.tsv").read_result(stat_mods=stat_mods).reset_index(drop=True) + custom_mods = {"C[+57.0215]": 4, "M[+15.9948]": 35, "M[+15.994]": 35, "K[+229.1629]": 737, "^[+229.1629]-": 737} + expected_sage_internal_path = Path(__file__).parent / "data" / "sage_output_internal_mods.csv" + internal_search_results_df = Sage(Path(__file__).parent / "data" / "sage_output_mods.tsv").read_result( + custom_mods=custom_mods ) expected_df = pd.read_csv(expected_sage_internal_path) pd.testing.assert_frame_equal(internal_search_results_df, expected_df) From 7b7033cec2b434cf062a096fbf66f907846faa3a Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Thu, 1 Aug 2024 21:27:58 +0200 Subject: [PATCH 18/31] Bump version from 0.5.0 to 0.6.0 --- .cookietemple.yml | 2 +- .github/release-drafter.yml | 4 +- cookietemple.cfg | 2 +- docs/conf.py | 4 +- poetry.lock | 617 ++++++++++++++++++------------------ pyproject.toml | 4 +- spectrum_io/__init__.py | 2 +- spectrum_io/__main__.py | 2 +- 8 files changed, 318 insertions(+), 319 deletions(-) diff --git a/.cookietemple.yml b/.cookietemple.yml index cfa79f4..7dfbf33 100644 --- a/.cookietemple.yml +++ b/.cookietemple.yml @@ -15,5 +15,5 @@ full_name: Mario Picciani email: mario.picciani@tum.de project_name: spectrum_io project_short_description: IO related functionalities for oktoberfest. -version: 0.5.0 +version: 0.6.0 license: MIT diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 2696532..8f8af9b 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,5 +1,5 @@ -name-template: "0.5.0 🌈" # <> -tag-template: 0.5.0 # <> +name-template: "0.6.0 🌈" # <> +tag-template: 0.6.0 # <> exclude-labels: - "skip-changelog" diff --git a/cookietemple.cfg b/cookietemple.cfg index e9ec0aa..bd1dee7 100644 --- a/cookietemple.cfg +++ b/cookietemple.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.5.0 +current_version = 0.6.0 [bumpversion_files_whitelisted] init_file = spectrum_io/__init__.py diff --git a/docs/conf.py b/docs/conf.py index c9f78d2..82a9175 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -53,9 +53,9 @@ # the built documents. # # The short X.Y version. -version = "0.5.0" +version = "0.6.0" # The full version, including alpha/beta/rc tags. -release = "0.5.0" +release = "0.6.0" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/poetry.lock b/poetry.lock index 1c4506e..eab4f30 100644 --- a/poetry.lock +++ b/poetry.lock @@ -465,63 +465,63 @@ test-no-images = ["pytest", "pytest-cov", "pytest-xdist", "wurlitzer"] [[package]] name = "coverage" -version = "7.5.4" +version = "7.6.0" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.8" files = [ - {file = "coverage-7.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6cfb5a4f556bb51aba274588200a46e4dd6b505fb1a5f8c5ae408222eb416f99"}, - {file = "coverage-7.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2174e7c23e0a454ffe12267a10732c273243b4f2d50d07544a91198f05c48f47"}, - {file = "coverage-7.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2214ee920787d85db1b6a0bd9da5f8503ccc8fcd5814d90796c2f2493a2f4d2e"}, - {file = "coverage-7.5.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1137f46adb28e3813dec8c01fefadcb8c614f33576f672962e323b5128d9a68d"}, - {file = "coverage-7.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b385d49609f8e9efc885790a5a0e89f2e3ae042cdf12958b6034cc442de428d3"}, - {file = "coverage-7.5.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:b4a474f799456e0eb46d78ab07303286a84a3140e9700b9e154cfebc8f527016"}, - {file = "coverage-7.5.4-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:5cd64adedf3be66f8ccee418473c2916492d53cbafbfcff851cbec5a8454b136"}, - {file = "coverage-7.5.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e564c2cf45d2f44a9da56f4e3a26b2236504a496eb4cb0ca7221cd4cc7a9aca9"}, - {file = "coverage-7.5.4-cp310-cp310-win32.whl", hash = "sha256:7076b4b3a5f6d2b5d7f1185fde25b1e54eb66e647a1dfef0e2c2bfaf9b4c88c8"}, - {file = "coverage-7.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:018a12985185038a5b2bcafab04ab833a9a0f2c59995b3cec07e10074c78635f"}, - {file = "coverage-7.5.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:db14f552ac38f10758ad14dd7b983dbab424e731588d300c7db25b6f89e335b5"}, - {file = "coverage-7.5.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3257fdd8e574805f27bb5342b77bc65578e98cbc004a92232106344053f319ba"}, - {file = "coverage-7.5.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a6612c99081d8d6134005b1354191e103ec9705d7ba2754e848211ac8cacc6b"}, - {file = "coverage-7.5.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d45d3cbd94159c468b9b8c5a556e3f6b81a8d1af2a92b77320e887c3e7a5d080"}, - {file = "coverage-7.5.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed550e7442f278af76d9d65af48069f1fb84c9f745ae249c1a183c1e9d1b025c"}, - {file = "coverage-7.5.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7a892be37ca35eb5019ec85402c3371b0f7cda5ab5056023a7f13da0961e60da"}, - {file = "coverage-7.5.4-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8192794d120167e2a64721d88dbd688584675e86e15d0569599257566dec9bf0"}, - {file = "coverage-7.5.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:820bc841faa502e727a48311948e0461132a9c8baa42f6b2b84a29ced24cc078"}, - {file = "coverage-7.5.4-cp311-cp311-win32.whl", hash = "sha256:6aae5cce399a0f065da65c7bb1e8abd5c7a3043da9dceb429ebe1b289bc07806"}, - {file = "coverage-7.5.4-cp311-cp311-win_amd64.whl", hash = "sha256:d2e344d6adc8ef81c5a233d3a57b3c7d5181f40e79e05e1c143da143ccb6377d"}, - {file = "coverage-7.5.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:54317c2b806354cbb2dc7ac27e2b93f97096912cc16b18289c5d4e44fc663233"}, - {file = "coverage-7.5.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:042183de01f8b6d531e10c197f7f0315a61e8d805ab29c5f7b51a01d62782747"}, - {file = "coverage-7.5.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a6bb74ed465d5fb204b2ec41d79bcd28afccf817de721e8a807d5141c3426638"}, - {file = "coverage-7.5.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3d45ff86efb129c599a3b287ae2e44c1e281ae0f9a9bad0edc202179bcc3a2e"}, - {file = "coverage-7.5.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5013ed890dc917cef2c9f765c4c6a8ae9df983cd60dbb635df8ed9f4ebc9f555"}, - {file = "coverage-7.5.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1014fbf665fef86cdfd6cb5b7371496ce35e4d2a00cda501cf9f5b9e6fced69f"}, - {file = "coverage-7.5.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3684bc2ff328f935981847082ba4fdc950d58906a40eafa93510d1b54c08a66c"}, - {file = "coverage-7.5.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:581ea96f92bf71a5ec0974001f900db495488434a6928a2ca7f01eee20c23805"}, - {file = "coverage-7.5.4-cp312-cp312-win32.whl", hash = "sha256:73ca8fbc5bc622e54627314c1a6f1dfdd8db69788f3443e752c215f29fa87a0b"}, - {file = "coverage-7.5.4-cp312-cp312-win_amd64.whl", hash = "sha256:cef4649ec906ea7ea5e9e796e68b987f83fa9a718514fe147f538cfeda76d7a7"}, - {file = "coverage-7.5.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cdd31315fc20868c194130de9ee6bfd99755cc9565edff98ecc12585b90be882"}, - {file = "coverage-7.5.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:02ff6e898197cc1e9fa375581382b72498eb2e6d5fc0b53f03e496cfee3fac6d"}, - {file = "coverage-7.5.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d05c16cf4b4c2fc880cb12ba4c9b526e9e5d5bb1d81313d4d732a5b9fe2b9d53"}, - {file = "coverage-7.5.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c5986ee7ea0795a4095ac4d113cbb3448601efca7f158ec7f7087a6c705304e4"}, - {file = "coverage-7.5.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5df54843b88901fdc2f598ac06737f03d71168fd1175728054c8f5a2739ac3e4"}, - {file = "coverage-7.5.4-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:ab73b35e8d109bffbda9a3e91c64e29fe26e03e49addf5b43d85fc426dde11f9"}, - {file = "coverage-7.5.4-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:aea072a941b033813f5e4814541fc265a5c12ed9720daef11ca516aeacd3bd7f"}, - {file = "coverage-7.5.4-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:16852febd96acd953b0d55fc842ce2dac1710f26729b31c80b940b9afcd9896f"}, - {file = "coverage-7.5.4-cp38-cp38-win32.whl", hash = "sha256:8f894208794b164e6bd4bba61fc98bf6b06be4d390cf2daacfa6eca0a6d2bb4f"}, - {file = "coverage-7.5.4-cp38-cp38-win_amd64.whl", hash = "sha256:e2afe743289273209c992075a5a4913e8d007d569a406ffed0bd080ea02b0633"}, - {file = "coverage-7.5.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b95c3a8cb0463ba9f77383d0fa8c9194cf91f64445a63fc26fb2327e1e1eb088"}, - {file = "coverage-7.5.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3d7564cc09dd91b5a6001754a5b3c6ecc4aba6323baf33a12bd751036c998be4"}, - {file = "coverage-7.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:44da56a2589b684813f86d07597fdf8a9c6ce77f58976727329272f5a01f99f7"}, - {file = "coverage-7.5.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e16f3d6b491c48c5ae726308e6ab1e18ee830b4cdd6913f2d7f77354b33f91c8"}, - {file = "coverage-7.5.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dbc5958cb471e5a5af41b0ddaea96a37e74ed289535e8deca404811f6cb0bc3d"}, - {file = "coverage-7.5.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:a04e990a2a41740b02d6182b498ee9796cf60eefe40cf859b016650147908029"}, - {file = "coverage-7.5.4-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:ddbd2f9713a79e8e7242d7c51f1929611e991d855f414ca9996c20e44a895f7c"}, - {file = "coverage-7.5.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b1ccf5e728ccf83acd313c89f07c22d70d6c375a9c6f339233dcf792094bcbf7"}, - {file = "coverage-7.5.4-cp39-cp39-win32.whl", hash = "sha256:56b4eafa21c6c175b3ede004ca12c653a88b6f922494b023aeb1e836df953ace"}, - {file = "coverage-7.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:65e528e2e921ba8fd67d9055e6b9f9e34b21ebd6768ae1c1723f4ea6ace1234d"}, - {file = "coverage-7.5.4-pp38.pp39.pp310-none-any.whl", hash = "sha256:79b356f3dd5b26f3ad23b35c75dbdaf1f9e2450b6bcefc6d0825ea0aa3f86ca5"}, - {file = "coverage-7.5.4.tar.gz", hash = "sha256:a44963520b069e12789d0faea4e9fdb1e410cdc4aab89d94f7f55cbb7fef0353"}, + {file = "coverage-7.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dff044f661f59dace805eedb4a7404c573b6ff0cdba4a524141bc63d7be5c7fd"}, + {file = "coverage-7.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a8659fd33ee9e6ca03950cfdcdf271d645cf681609153f218826dd9805ab585c"}, + {file = "coverage-7.6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7792f0ab20df8071d669d929c75c97fecfa6bcab82c10ee4adb91c7a54055463"}, + {file = "coverage-7.6.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d4b3cd1ca7cd73d229487fa5caca9e4bc1f0bca96526b922d61053ea751fe791"}, + {file = "coverage-7.6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e7e128f85c0b419907d1f38e616c4f1e9f1d1b37a7949f44df9a73d5da5cd53c"}, + {file = "coverage-7.6.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a94925102c89247530ae1dab7dc02c690942566f22e189cbd53579b0693c0783"}, + {file = "coverage-7.6.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:dcd070b5b585b50e6617e8972f3fbbee786afca71b1936ac06257f7e178f00f6"}, + {file = "coverage-7.6.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:d50a252b23b9b4dfeefc1f663c568a221092cbaded20a05a11665d0dbec9b8fb"}, + {file = "coverage-7.6.0-cp310-cp310-win32.whl", hash = "sha256:0e7b27d04131c46e6894f23a4ae186a6a2207209a05df5b6ad4caee6d54a222c"}, + {file = "coverage-7.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:54dece71673b3187c86226c3ca793c5f891f9fc3d8aa183f2e3653da18566169"}, + {file = "coverage-7.6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c7b525ab52ce18c57ae232ba6f7010297a87ced82a2383b1afd238849c1ff933"}, + {file = "coverage-7.6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bea27c4269234e06f621f3fac3925f56ff34bc14521484b8f66a580aacc2e7d"}, + {file = "coverage-7.6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed8d1d1821ba5fc88d4a4f45387b65de52382fa3ef1f0115a4f7a20cdfab0e94"}, + {file = "coverage-7.6.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01c322ef2bbe15057bc4bf132b525b7e3f7206f071799eb8aa6ad1940bcf5fb1"}, + {file = "coverage-7.6.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03cafe82c1b32b770a29fd6de923625ccac3185a54a5e66606da26d105f37dac"}, + {file = "coverage-7.6.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0d1b923fc4a40c5832be4f35a5dab0e5ff89cddf83bb4174499e02ea089daf57"}, + {file = "coverage-7.6.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4b03741e70fb811d1a9a1d75355cf391f274ed85847f4b78e35459899f57af4d"}, + {file = "coverage-7.6.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a73d18625f6a8a1cbb11eadc1d03929f9510f4131879288e3f7922097a429f63"}, + {file = "coverage-7.6.0-cp311-cp311-win32.whl", hash = "sha256:65fa405b837060db569a61ec368b74688f429b32fa47a8929a7a2f9b47183713"}, + {file = "coverage-7.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:6379688fb4cfa921ae349c76eb1a9ab26b65f32b03d46bb0eed841fd4cb6afb1"}, + {file = "coverage-7.6.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f7db0b6ae1f96ae41afe626095149ecd1b212b424626175a6633c2999eaad45b"}, + {file = "coverage-7.6.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bbdf9a72403110a3bdae77948b8011f644571311c2fb35ee15f0f10a8fc082e8"}, + {file = "coverage-7.6.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cc44bf0315268e253bf563f3560e6c004efe38f76db03a1558274a6e04bf5d5"}, + {file = "coverage-7.6.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:da8549d17489cd52f85a9829d0e1d91059359b3c54a26f28bec2c5d369524807"}, + {file = "coverage-7.6.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0086cd4fc71b7d485ac93ca4239c8f75732c2ae3ba83f6be1c9be59d9e2c6382"}, + {file = "coverage-7.6.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1fad32ee9b27350687035cb5fdf9145bc9cf0a094a9577d43e909948ebcfa27b"}, + {file = "coverage-7.6.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:044a0985a4f25b335882b0966625270a8d9db3d3409ddc49a4eb00b0ef5e8cee"}, + {file = "coverage-7.6.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:76d5f82213aa78098b9b964ea89de4617e70e0d43e97900c2778a50856dac605"}, + {file = "coverage-7.6.0-cp312-cp312-win32.whl", hash = "sha256:3c59105f8d58ce500f348c5b56163a4113a440dad6daa2294b5052a10db866da"}, + {file = "coverage-7.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:ca5d79cfdae420a1d52bf177de4bc2289c321d6c961ae321503b2ca59c17ae67"}, + {file = "coverage-7.6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d39bd10f0ae453554798b125d2f39884290c480f56e8a02ba7a6ed552005243b"}, + {file = "coverage-7.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:beb08e8508e53a568811016e59f3234d29c2583f6b6e28572f0954a6b4f7e03d"}, + {file = "coverage-7.6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2e16f4cd2bc4d88ba30ca2d3bbf2f21f00f382cf4e1ce3b1ddc96c634bc48ca"}, + {file = "coverage-7.6.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6616d1c9bf1e3faea78711ee42a8b972367d82ceae233ec0ac61cc7fec09fa6b"}, + {file = "coverage-7.6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad4567d6c334c46046d1c4c20024de2a1c3abc626817ae21ae3da600f5779b44"}, + {file = "coverage-7.6.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:d17c6a415d68cfe1091d3296ba5749d3d8696e42c37fca5d4860c5bf7b729f03"}, + {file = "coverage-7.6.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:9146579352d7b5f6412735d0f203bbd8d00113a680b66565e205bc605ef81bc6"}, + {file = "coverage-7.6.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:cdab02a0a941af190df8782aafc591ef3ad08824f97850b015c8c6a8b3877b0b"}, + {file = "coverage-7.6.0-cp38-cp38-win32.whl", hash = "sha256:df423f351b162a702c053d5dddc0fc0ef9a9e27ea3f449781ace5f906b664428"}, + {file = "coverage-7.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:f2501d60d7497fd55e391f423f965bbe9e650e9ffc3c627d5f0ac516026000b8"}, + {file = "coverage-7.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7221f9ac9dad9492cecab6f676b3eaf9185141539d5c9689d13fd6b0d7de840c"}, + {file = "coverage-7.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ddaaa91bfc4477d2871442bbf30a125e8fe6b05da8a0015507bfbf4718228ab2"}, + {file = "coverage-7.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4cbe651f3904e28f3a55d6f371203049034b4ddbce65a54527a3f189ca3b390"}, + {file = "coverage-7.6.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:831b476d79408ab6ccfadaaf199906c833f02fdb32c9ab907b1d4aa0713cfa3b"}, + {file = "coverage-7.6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46c3d091059ad0b9c59d1034de74a7f36dcfa7f6d3bde782c49deb42438f2450"}, + {file = "coverage-7.6.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4d5fae0a22dc86259dee66f2cc6c1d3e490c4a1214d7daa2a93d07491c5c04b6"}, + {file = "coverage-7.6.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:07ed352205574aad067482e53dd606926afebcb5590653121063fbf4e2175166"}, + {file = "coverage-7.6.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:49c76cdfa13015c4560702574bad67f0e15ca5a2872c6a125f6327ead2b731dd"}, + {file = "coverage-7.6.0-cp39-cp39-win32.whl", hash = "sha256:482855914928c8175735a2a59c8dc5806cf7d8f032e4820d52e845d1f731dca2"}, + {file = "coverage-7.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:543ef9179bc55edfd895154a51792b01c017c87af0ebaae092720152e19e42ca"}, + {file = "coverage-7.6.0-pp38.pp39.pp310-none-any.whl", hash = "sha256:6fe885135c8a479d3e37a7aae61cbd3a0fb2deccb4dda3c25f92a49189f766d6"}, + {file = "coverage-7.6.0.tar.gz", hash = "sha256:289cc803fa1dc901f84701ac10c9ee873619320f2f9aff38794db4a4a0268d51"}, ] [package.dependencies] @@ -532,43 +532,38 @@ toml = ["tomli"] [[package]] name = "cryptography" -version = "42.0.8" +version = "43.0.0" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = ">=3.7" files = [ - {file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:81d8a521705787afe7a18d5bfb47ea9d9cc068206270aad0b96a725022e18d2e"}, - {file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:961e61cefdcb06e0c6d7e3a1b22ebe8b996eb2bf50614e89384be54c48c6b63d"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e3ec3672626e1b9e55afd0df6d774ff0e953452886e06e0f1eb7eb0c832e8902"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e599b53fd95357d92304510fb7bda8523ed1f79ca98dce2f43c115950aa78801"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:5226d5d21ab681f432a9c1cf8b658c0cb02533eece706b155e5fbd8a0cdd3949"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:6b7c4f03ce01afd3b76cf69a5455caa9cfa3de8c8f493e0d3ab7d20611c8dae9"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:2346b911eb349ab547076f47f2e035fc8ff2c02380a7cbbf8d87114fa0f1c583"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:ad803773e9df0b92e0a817d22fd8a3675493f690b96130a5e24f1b8fabbea9c7"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2f66d9cd9147ee495a8374a45ca445819f8929a3efcd2e3df6428e46c3cbb10b"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:d45b940883a03e19e944456a558b67a41160e367a719833c53de6911cabba2b7"}, - {file = "cryptography-42.0.8-cp37-abi3-win32.whl", hash = "sha256:a0c5b2b0585b6af82d7e385f55a8bc568abff8923af147ee3c07bd8b42cda8b2"}, - {file = "cryptography-42.0.8-cp37-abi3-win_amd64.whl", hash = "sha256:57080dee41209e556a9a4ce60d229244f7a66ef52750f813bfbe18959770cfba"}, - {file = "cryptography-42.0.8-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:dea567d1b0e8bc5764b9443858b673b734100c2871dc93163f58c46a97a83d28"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4783183f7cb757b73b2ae9aed6599b96338eb957233c58ca8f49a49cc32fd5e"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0608251135d0e03111152e41f0cc2392d1e74e35703960d4190b2e0f4ca9c70"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:dc0fdf6787f37b1c6b08e6dfc892d9d068b5bdb671198c72072828b80bd5fe4c"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:9c0c1716c8447ee7dbf08d6db2e5c41c688544c61074b54fc4564196f55c25a7"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:fff12c88a672ab9c9c1cf7b0c80e3ad9e2ebd9d828d955c126be4fd3e5578c9e"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:cafb92b2bc622cd1aa6a1dce4b93307792633f4c5fe1f46c6b97cf67073ec961"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:31f721658a29331f895a5a54e7e82075554ccfb8b163a18719d342f5ffe5ecb1"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b297f90c5723d04bcc8265fc2a0f86d4ea2e0f7ab4b6994459548d3a6b992a14"}, - {file = "cryptography-42.0.8-cp39-abi3-win32.whl", hash = "sha256:2f88d197e66c65be5e42cd72e5c18afbfae3f741742070e3019ac8f4ac57262c"}, - {file = "cryptography-42.0.8-cp39-abi3-win_amd64.whl", hash = "sha256:fa76fbb7596cc5839320000cdd5d0955313696d9511debab7ee7278fc8b5c84a"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ba4f0a211697362e89ad822e667d8d340b4d8d55fae72cdd619389fb5912eefe"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:81884c4d096c272f00aeb1f11cf62ccd39763581645b0812e99a91505fa48e0c"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c9bb2ae11bfbab395bdd072985abde58ea9860ed84e59dbc0463a5d0159f5b71"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7016f837e15b0a1c119d27ecd89b3515f01f90a8615ed5e9427e30d9cdbfed3d"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5a94eccb2a81a309806027e1670a358b99b8fe8bfe9f8d329f27d72c094dde8c"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:dec9b018df185f08483f294cae6ccac29e7a6e0678996587363dc352dc65c842"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:343728aac38decfdeecf55ecab3264b015be68fc2816ca800db649607aeee648"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:013629ae70b40af70c9a7a5db40abe5d9054e6f4380e50ce769947b73bf3caad"}, - {file = "cryptography-42.0.8.tar.gz", hash = "sha256:8d09d05439ce7baa8e9e95b07ec5b6c886f548deb7e0f69ef25f64b3bce842f2"}, + {file = "cryptography-43.0.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:64c3f16e2a4fc51c0d06af28441881f98c5d91009b8caaff40cf3548089e9c74"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3dcdedae5c7710b9f97ac6bba7e1052b95c7083c9d0e9df96e02a1932e777895"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d9a1eca329405219b605fac09ecfc09ac09e595d6def650a437523fcd08dd22"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ea9e57f8ea880eeea38ab5abf9fbe39f923544d7884228ec67d666abd60f5a47"}, + {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:9a8d6802e0825767476f62aafed40532bd435e8a5f7d23bd8b4f5fd04cc80ecf"}, + {file = "cryptography-43.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:cc70b4b581f28d0a254d006f26949245e3657d40d8857066c2ae22a61222ef55"}, + {file = "cryptography-43.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:4a997df8c1c2aae1e1e5ac49c2e4f610ad037fc5a3aadc7b64e39dea42249431"}, + {file = "cryptography-43.0.0-cp37-abi3-win32.whl", hash = "sha256:6e2b11c55d260d03a8cf29ac9b5e0608d35f08077d8c087be96287f43af3ccdc"}, + {file = "cryptography-43.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:31e44a986ceccec3d0498e16f3d27b2ee5fdf69ce2ab89b52eaad1d2f33d8778"}, + {file = "cryptography-43.0.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:7b3f5fe74a5ca32d4d0f302ffe6680fcc5c28f8ef0dc0ae8f40c0f3a1b4fca66"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac1955ce000cb29ab40def14fd1bbfa7af2017cca696ee696925615cafd0dce5"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:299d3da8e00b7e2b54bb02ef58d73cd5f55fb31f33ebbf33bd00d9aa6807df7e"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ee0c405832ade84d4de74b9029bedb7b31200600fa524d218fc29bfa371e97f5"}, + {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:cb013933d4c127349b3948aa8aaf2f12c0353ad0eccd715ca789c8a0f671646f"}, + {file = "cryptography-43.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fdcb265de28585de5b859ae13e3846a8e805268a823a12a4da2597f1f5afc9f0"}, + {file = "cryptography-43.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:2905ccf93a8a2a416f3ec01b1a7911c3fe4073ef35640e7ee5296754e30b762b"}, + {file = "cryptography-43.0.0-cp39-abi3-win32.whl", hash = "sha256:47ca71115e545954e6c1d207dd13461ab81f4eccfcb1345eac874828b5e3eaaf"}, + {file = "cryptography-43.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:0663585d02f76929792470451a5ba64424acc3cd5227b03921dab0e2f27b1709"}, + {file = "cryptography-43.0.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:2c6d112bf61c5ef44042c253e4859b3cbbb50df2f78fa8fae6747a7814484a70"}, + {file = "cryptography-43.0.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:844b6d608374e7d08f4f6e6f9f7b951f9256db41421917dfb2d003dde4cd6b66"}, + {file = "cryptography-43.0.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:51956cf8730665e2bdf8ddb8da0056f699c1a5715648c1b0144670c1ba00b48f"}, + {file = "cryptography-43.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:aae4d918f6b180a8ab8bf6511a419473d107df4dbb4225c7b48c5c9602c38c7f"}, + {file = "cryptography-43.0.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:232ce02943a579095a339ac4b390fbbe97f5b5d5d107f8a08260ea2768be8cc2"}, + {file = "cryptography-43.0.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:5bcb8a5620008a8034d39bce21dc3e23735dfdb6a33a06974739bfa04f853947"}, + {file = "cryptography-43.0.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:08a24a7070b2b6804c1940ff0f910ff728932a9d0e80e7814234269f9d46d069"}, + {file = "cryptography-43.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:e9c5266c432a1e23738d178e51c2c7a5e2ddf790f248be939448c0ba2021f9d1"}, + {file = "cryptography-43.0.0.tar.gz", hash = "sha256:b88075ada2d51aa9f18283532c9f60e72170041bba88d7f37e49cbb10275299e"}, ] [package.dependencies] @@ -581,7 +576,7 @@ nox = ["nox"] pep8test = ["check-sdist", "click", "mypy", "ruff"] sdist = ["build"] ssh = ["bcrypt (>=3.1.5)"] -test = ["certifi", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] +test = ["certifi", "cryptography-vectors (==43.0.0)", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] test-randomorder = ["pytest-randomly"] [[package]] @@ -655,13 +650,13 @@ poetry = ["poetry"] [[package]] name = "exceptiongroup" -version = "1.2.1" +version = "1.2.2" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, - {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, + {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, + {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, ] [package.extras] @@ -913,13 +908,13 @@ files = [ [[package]] name = "importlib-metadata" -version = "8.0.0" +version = "8.2.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-8.0.0-py3-none-any.whl", hash = "sha256:15584cf2b1bf449d98ff8a6ff1abef57bf20f3ac6454f431736cd3e660921b2f"}, - {file = "importlib_metadata-8.0.0.tar.gz", hash = "sha256:188bd24e4c346d3f0a933f275c2fec67050326a856b9a359881d7c2a697e8812"}, + {file = "importlib_metadata-8.2.0-py3-none-any.whl", hash = "sha256:11901fa0c2f97919b288679932bb64febaeacf289d18ac84dd68cb2e74213369"}, + {file = "importlib_metadata-8.2.0.tar.gz", hash = "sha256:72e8d4399996132204f9a16dcc751af254a48f8d1b20b9ff0f98d4a8f901e73d"}, ] [package.dependencies] @@ -1500,44 +1495,44 @@ research = ["entsoe-py (>=0.3.2)", "lxml (>=4.6.2)", "python-dotenv (>=0.15.0)", [[package]] name = "mypy" -version = "1.10.1" +version = "1.11.1" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e36f229acfe250dc660790840916eb49726c928e8ce10fbdf90715090fe4ae02"}, - {file = "mypy-1.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:51a46974340baaa4145363b9e051812a2446cf583dfaeba124af966fa44593f7"}, - {file = "mypy-1.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:901c89c2d67bba57aaaca91ccdb659aa3a312de67f23b9dfb059727cce2e2e0a"}, - {file = "mypy-1.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0cd62192a4a32b77ceb31272d9e74d23cd88c8060c34d1d3622db3267679a5d9"}, - {file = "mypy-1.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:a2cbc68cb9e943ac0814c13e2452d2046c2f2b23ff0278e26599224cf164e78d"}, - {file = "mypy-1.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bd6f629b67bb43dc0d9211ee98b96d8dabc97b1ad38b9b25f5e4c4d7569a0c6a"}, - {file = "mypy-1.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a1bbb3a6f5ff319d2b9d40b4080d46cd639abe3516d5a62c070cf0114a457d84"}, - {file = "mypy-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8edd4e9bbbc9d7b79502eb9592cab808585516ae1bcc1446eb9122656c6066f"}, - {file = "mypy-1.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6166a88b15f1759f94a46fa474c7b1b05d134b1b61fca627dd7335454cc9aa6b"}, - {file = "mypy-1.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:5bb9cd11c01c8606a9d0b83ffa91d0b236a0e91bc4126d9ba9ce62906ada868e"}, - {file = "mypy-1.10.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d8681909f7b44d0b7b86e653ca152d6dff0eb5eb41694e163c6092124f8246d7"}, - {file = "mypy-1.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:378c03f53f10bbdd55ca94e46ec3ba255279706a6aacaecac52ad248f98205d3"}, - {file = "mypy-1.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bacf8f3a3d7d849f40ca6caea5c055122efe70e81480c8328ad29c55c69e93e"}, - {file = "mypy-1.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:701b5f71413f1e9855566a34d6e9d12624e9e0a8818a5704d74d6b0402e66c04"}, - {file = "mypy-1.10.1-cp312-cp312-win_amd64.whl", hash = "sha256:3c4c2992f6ea46ff7fce0072642cfb62af7a2484efe69017ed8b095f7b39ef31"}, - {file = "mypy-1.10.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:604282c886497645ffb87b8f35a57ec773a4a2721161e709a4422c1636ddde5c"}, - {file = "mypy-1.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37fd87cab83f09842653f08de066ee68f1182b9b5282e4634cdb4b407266bade"}, - {file = "mypy-1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8addf6313777dbb92e9564c5d32ec122bf2c6c39d683ea64de6a1fd98b90fe37"}, - {file = "mypy-1.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5cc3ca0a244eb9a5249c7c583ad9a7e881aa5d7b73c35652296ddcdb33b2b9c7"}, - {file = "mypy-1.10.1-cp38-cp38-win_amd64.whl", hash = "sha256:1b3a2ffce52cc4dbaeee4df762f20a2905aa171ef157b82192f2e2f368eec05d"}, - {file = "mypy-1.10.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fe85ed6836165d52ae8b88f99527d3d1b2362e0cb90b005409b8bed90e9059b3"}, - {file = "mypy-1.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c2ae450d60d7d020d67ab440c6e3fae375809988119817214440033f26ddf7bf"}, - {file = "mypy-1.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6be84c06e6abd72f960ba9a71561c14137a583093ffcf9bbfaf5e613d63fa531"}, - {file = "mypy-1.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2189ff1e39db399f08205e22a797383613ce1cb0cb3b13d8bcf0170e45b96cc3"}, - {file = "mypy-1.10.1-cp39-cp39-win_amd64.whl", hash = "sha256:97a131ee36ac37ce9581f4220311247ab6cba896b4395b9c87af0675a13a755f"}, - {file = "mypy-1.10.1-py3-none-any.whl", hash = "sha256:71d8ac0b906354ebda8ef1673e5fde785936ac1f29ff6987c7483cfbd5a4235a"}, - {file = "mypy-1.10.1.tar.gz", hash = "sha256:1f8f492d7db9e3593ef42d4f115f04e556130f2819ad33ab84551403e97dd4c0"}, + {file = "mypy-1.11.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a32fc80b63de4b5b3e65f4be82b4cfa362a46702672aa6a0f443b4689af7008c"}, + {file = "mypy-1.11.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c1952f5ea8a5a959b05ed5f16452fddadbaae48b5d39235ab4c3fc444d5fd411"}, + {file = "mypy-1.11.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e1e30dc3bfa4e157e53c1d17a0dad20f89dc433393e7702b813c10e200843b03"}, + {file = "mypy-1.11.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2c63350af88f43a66d3dfeeeb8d77af34a4f07d760b9eb3a8697f0386c7590b4"}, + {file = "mypy-1.11.1-cp310-cp310-win_amd64.whl", hash = "sha256:a831671bad47186603872a3abc19634f3011d7f83b083762c942442d51c58d58"}, + {file = "mypy-1.11.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7b6343d338390bb946d449677726edf60102a1c96079b4f002dedff375953fc5"}, + {file = "mypy-1.11.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e4fe9f4e5e521b458d8feb52547f4bade7ef8c93238dfb5bbc790d9ff2d770ca"}, + {file = "mypy-1.11.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:886c9dbecc87b9516eff294541bf7f3655722bf22bb898ee06985cd7269898de"}, + {file = "mypy-1.11.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fca4a60e1dd9fd0193ae0067eaeeb962f2d79e0d9f0f66223a0682f26ffcc809"}, + {file = "mypy-1.11.1-cp311-cp311-win_amd64.whl", hash = "sha256:0bd53faf56de9643336aeea1c925012837432b5faf1701ccca7fde70166ccf72"}, + {file = "mypy-1.11.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f39918a50f74dc5969807dcfaecafa804fa7f90c9d60506835036cc1bc891dc8"}, + {file = "mypy-1.11.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0bc71d1fb27a428139dd78621953effe0d208aed9857cb08d002280b0422003a"}, + {file = "mypy-1.11.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b868d3bcff720dd7217c383474008ddabaf048fad8d78ed948bb4b624870a417"}, + {file = "mypy-1.11.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a707ec1527ffcdd1c784d0924bf5cb15cd7f22683b919668a04d2b9c34549d2e"}, + {file = "mypy-1.11.1-cp312-cp312-win_amd64.whl", hash = "sha256:64f4a90e3ea07f590c5bcf9029035cf0efeae5ba8be511a8caada1a4893f5525"}, + {file = "mypy-1.11.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:749fd3213916f1751fff995fccf20c6195cae941dc968f3aaadf9bb4e430e5a2"}, + {file = "mypy-1.11.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b639dce63a0b19085213ec5fdd8cffd1d81988f47a2dec7100e93564f3e8fb3b"}, + {file = "mypy-1.11.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c956b49c5d865394d62941b109728c5c596a415e9c5b2be663dd26a1ff07bc0"}, + {file = "mypy-1.11.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:45df906e8b6804ef4b666af29a87ad9f5921aad091c79cc38e12198e220beabd"}, + {file = "mypy-1.11.1-cp38-cp38-win_amd64.whl", hash = "sha256:d44be7551689d9d47b7abc27c71257adfdb53f03880841a5db15ddb22dc63edb"}, + {file = "mypy-1.11.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2684d3f693073ab89d76da8e3921883019ea8a3ec20fa5d8ecca6a2db4c54bbe"}, + {file = "mypy-1.11.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:79c07eb282cb457473add5052b63925e5cc97dfab9812ee65a7c7ab5e3cb551c"}, + {file = "mypy-1.11.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11965c2f571ded6239977b14deebd3f4c3abd9a92398712d6da3a772974fad69"}, + {file = "mypy-1.11.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a2b43895a0f8154df6519706d9bca8280cda52d3d9d1514b2d9c3e26792a0b74"}, + {file = "mypy-1.11.1-cp39-cp39-win_amd64.whl", hash = "sha256:1a81cf05975fd61aec5ae16501a091cfb9f605dc3e3c878c0da32f250b74760b"}, + {file = "mypy-1.11.1-py3-none-any.whl", hash = "sha256:0624bdb940255d2dd24e829d99a13cfeb72e4e9031f9492148f410ed30bcab54"}, + {file = "mypy-1.11.1.tar.gz", hash = "sha256:f404a0b069709f18bbdb702eb3dcfe51910602995de00bd39cea3050b5772d08"}, ] [package.dependencies] mypy-extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = ">=4.1.0" +typing-extensions = ">=4.6.0" [package.extras] dmypy = ["psutil (>=4.0)"] @@ -1862,13 +1857,13 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "3.7.1" +version = "3.8.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false python-versions = ">=3.9" files = [ - {file = "pre_commit-3.7.1-py2.py3-none-any.whl", hash = "sha256:fae36fd1d7ad7d6a5a1c0b0d5adb2ed1a3bda5a21bf6c3e5372073d7a11cd4c5"}, - {file = "pre_commit-3.7.1.tar.gz", hash = "sha256:8ca3ad567bc78a4972a3f1a477e94a79d4597e8140a6e0b651c5e33899c3654a"}, + {file = "pre_commit-3.8.0-py2.py3-none-any.whl", hash = "sha256:9a90a53bf82fdd8778d58085faf8d83df56e40dfe18f45b19446e26bf1b3a63f"}, + {file = "pre_commit-3.8.0.tar.gz", hash = "sha256:8bb6494d4a20423842e198980c9ecf9f96607a07ea29549e180eef9ae80fe7af"}, ] [package.dependencies] @@ -1924,52 +1919,55 @@ test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] [[package]] name = "pyarrow" -version = "16.1.0" +version = "17.0.0" description = "Python library for Apache Arrow" optional = false python-versions = ">=3.8" files = [ - {file = "pyarrow-16.1.0-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:17e23b9a65a70cc733d8b738baa6ad3722298fa0c81d88f63ff94bf25eaa77b9"}, - {file = "pyarrow-16.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4740cc41e2ba5d641071d0ab5e9ef9b5e6e8c7611351a5cb7c1d175eaf43674a"}, - {file = "pyarrow-16.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:98100e0268d04e0eec47b73f20b39c45b4006f3c4233719c3848aa27a03c1aef"}, - {file = "pyarrow-16.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f68f409e7b283c085f2da014f9ef81e885d90dcd733bd648cfba3ef265961848"}, - {file = "pyarrow-16.1.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:a8914cd176f448e09746037b0c6b3a9d7688cef451ec5735094055116857580c"}, - {file = "pyarrow-16.1.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:48be160782c0556156d91adbdd5a4a7e719f8d407cb46ae3bb4eaee09b3111bd"}, - {file = "pyarrow-16.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:9cf389d444b0f41d9fe1444b70650fea31e9d52cfcb5f818b7888b91b586efff"}, - {file = "pyarrow-16.1.0-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:d0ebea336b535b37eee9eee31761813086d33ed06de9ab6fc6aaa0bace7b250c"}, - {file = "pyarrow-16.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2e73cfc4a99e796727919c5541c65bb88b973377501e39b9842ea71401ca6c1c"}, - {file = "pyarrow-16.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf9251264247ecfe93e5f5a0cd43b8ae834f1e61d1abca22da55b20c788417f6"}, - {file = "pyarrow-16.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ddf5aace92d520d3d2a20031d8b0ec27b4395cab9f74e07cc95edf42a5cc0147"}, - {file = "pyarrow-16.1.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:25233642583bf658f629eb230b9bb79d9af4d9f9229890b3c878699c82f7d11e"}, - {file = "pyarrow-16.1.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:a33a64576fddfbec0a44112eaf844c20853647ca833e9a647bfae0582b2ff94b"}, - {file = "pyarrow-16.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:185d121b50836379fe012753cf15c4ba9638bda9645183ab36246923875f8d1b"}, - {file = "pyarrow-16.1.0-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:2e51ca1d6ed7f2e9d5c3c83decf27b0d17bb207a7dea986e8dc3e24f80ff7d6f"}, - {file = "pyarrow-16.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:06ebccb6f8cb7357de85f60d5da50e83507954af617d7b05f48af1621d331c9a"}, - {file = "pyarrow-16.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b04707f1979815f5e49824ce52d1dceb46e2f12909a48a6a753fe7cafbc44a0c"}, - {file = "pyarrow-16.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d32000693deff8dc5df444b032b5985a48592c0697cb6e3071a5d59888714e2"}, - {file = "pyarrow-16.1.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:8785bb10d5d6fd5e15d718ee1d1f914fe768bf8b4d1e5e9bf253de8a26cb1628"}, - {file = "pyarrow-16.1.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:e1369af39587b794873b8a307cc6623a3b1194e69399af0efd05bb202195a5a7"}, - {file = "pyarrow-16.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:febde33305f1498f6df85e8020bca496d0e9ebf2093bab9e0f65e2b4ae2b3444"}, - {file = "pyarrow-16.1.0-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:b5f5705ab977947a43ac83b52ade3b881eb6e95fcc02d76f501d549a210ba77f"}, - {file = "pyarrow-16.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0d27bf89dfc2576f6206e9cd6cf7a107c9c06dc13d53bbc25b0bd4556f19cf5f"}, - {file = "pyarrow-16.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d07de3ee730647a600037bc1d7b7994067ed64d0eba797ac74b2bc77384f4c2"}, - {file = "pyarrow-16.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fbef391b63f708e103df99fbaa3acf9f671d77a183a07546ba2f2c297b361e83"}, - {file = "pyarrow-16.1.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:19741c4dbbbc986d38856ee7ddfdd6a00fc3b0fc2d928795b95410d38bb97d15"}, - {file = "pyarrow-16.1.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:f2c5fb249caa17b94e2b9278b36a05ce03d3180e6da0c4c3b3ce5b2788f30eed"}, - {file = "pyarrow-16.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:e6b6d3cd35fbb93b70ade1336022cc1147b95ec6af7d36906ca7fe432eb09710"}, - {file = "pyarrow-16.1.0-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:18da9b76a36a954665ccca8aa6bd9f46c1145f79c0bb8f4f244f5f8e799bca55"}, - {file = "pyarrow-16.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:99f7549779b6e434467d2aa43ab2b7224dd9e41bdde486020bae198978c9e05e"}, - {file = "pyarrow-16.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f07fdffe4fd5b15f5ec15c8b64584868d063bc22b86b46c9695624ca3505b7b4"}, - {file = "pyarrow-16.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ddfe389a08ea374972bd4065d5f25d14e36b43ebc22fc75f7b951f24378bf0b5"}, - {file = "pyarrow-16.1.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:3b20bd67c94b3a2ea0a749d2a5712fc845a69cb5d52e78e6449bbd295611f3aa"}, - {file = "pyarrow-16.1.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:ba8ac20693c0bb0bf4b238751d4409e62852004a8cf031c73b0e0962b03e45e3"}, - {file = "pyarrow-16.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:31a1851751433d89a986616015841977e0a188662fcffd1a5677453f1df2de0a"}, - {file = "pyarrow-16.1.0.tar.gz", hash = "sha256:15fbb22ea96d11f0b5768504a3f961edab25eaf4197c341720c4a387f6c60315"}, + {file = "pyarrow-17.0.0-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:a5c8b238d47e48812ee577ee20c9a2779e6a5904f1708ae240f53ecbee7c9f07"}, + {file = "pyarrow-17.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:db023dc4c6cae1015de9e198d41250688383c3f9af8f565370ab2b4cb5f62655"}, + {file = "pyarrow-17.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da1e060b3876faa11cee287839f9cc7cdc00649f475714b8680a05fd9071d545"}, + {file = "pyarrow-17.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75c06d4624c0ad6674364bb46ef38c3132768139ddec1c56582dbac54f2663e2"}, + {file = "pyarrow-17.0.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:fa3c246cc58cb5a4a5cb407a18f193354ea47dd0648194e6265bd24177982fe8"}, + {file = "pyarrow-17.0.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:f7ae2de664e0b158d1607699a16a488de3d008ba99b3a7aa5de1cbc13574d047"}, + {file = "pyarrow-17.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:5984f416552eea15fd9cee03da53542bf4cddaef5afecefb9aa8d1010c335087"}, + {file = "pyarrow-17.0.0-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:1c8856e2ef09eb87ecf937104aacfa0708f22dfeb039c363ec99735190ffb977"}, + {file = "pyarrow-17.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2e19f569567efcbbd42084e87f948778eb371d308e137a0f97afe19bb860ccb3"}, + {file = "pyarrow-17.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b244dc8e08a23b3e352899a006a26ae7b4d0da7bb636872fa8f5884e70acf15"}, + {file = "pyarrow-17.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b72e87fe3e1db343995562f7fff8aee354b55ee83d13afba65400c178ab2597"}, + {file = "pyarrow-17.0.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:dc5c31c37409dfbc5d014047817cb4ccd8c1ea25d19576acf1a001fe07f5b420"}, + {file = "pyarrow-17.0.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:e3343cb1e88bc2ea605986d4b94948716edc7a8d14afd4e2c097232f729758b4"}, + {file = "pyarrow-17.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:a27532c38f3de9eb3e90ecab63dfda948a8ca859a66e3a47f5f42d1e403c4d03"}, + {file = "pyarrow-17.0.0-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:9b8a823cea605221e61f34859dcc03207e52e409ccf6354634143e23af7c8d22"}, + {file = "pyarrow-17.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f1e70de6cb5790a50b01d2b686d54aaf73da01266850b05e3af2a1bc89e16053"}, + {file = "pyarrow-17.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0071ce35788c6f9077ff9ecba4858108eebe2ea5a3f7cf2cf55ebc1dbc6ee24a"}, + {file = "pyarrow-17.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:757074882f844411fcca735e39aae74248a1531367a7c80799b4266390ae51cc"}, + {file = "pyarrow-17.0.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:9ba11c4f16976e89146781a83833df7f82077cdab7dc6232c897789343f7891a"}, + {file = "pyarrow-17.0.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:b0c6ac301093b42d34410b187bba560b17c0330f64907bfa4f7f7f2444b0cf9b"}, + {file = "pyarrow-17.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:392bc9feabc647338e6c89267635e111d71edad5fcffba204425a7c8d13610d7"}, + {file = "pyarrow-17.0.0-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:af5ff82a04b2171415f1410cff7ebb79861afc5dae50be73ce06d6e870615204"}, + {file = "pyarrow-17.0.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:edca18eaca89cd6382dfbcff3dd2d87633433043650c07375d095cd3517561d8"}, + {file = "pyarrow-17.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7c7916bff914ac5d4a8fe25b7a25e432ff921e72f6f2b7547d1e325c1ad9d155"}, + {file = "pyarrow-17.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f553ca691b9e94b202ff741bdd40f6ccb70cdd5fbf65c187af132f1317de6145"}, + {file = "pyarrow-17.0.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:0cdb0e627c86c373205a2f94a510ac4376fdc523f8bb36beab2e7f204416163c"}, + {file = "pyarrow-17.0.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:d7d192305d9d8bc9082d10f361fc70a73590a4c65cf31c3e6926cd72b76bc35c"}, + {file = "pyarrow-17.0.0-cp38-cp38-win_amd64.whl", hash = "sha256:02dae06ce212d8b3244dd3e7d12d9c4d3046945a5933d28026598e9dbbda1fca"}, + {file = "pyarrow-17.0.0-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:13d7a460b412f31e4c0efa1148e1d29bdf18ad1411eb6757d38f8fbdcc8645fb"}, + {file = "pyarrow-17.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9b564a51fbccfab5a04a80453e5ac6c9954a9c5ef2890d1bcf63741909c3f8df"}, + {file = "pyarrow-17.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:32503827abbc5aadedfa235f5ece8c4f8f8b0a3cf01066bc8d29de7539532687"}, + {file = "pyarrow-17.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a155acc7f154b9ffcc85497509bcd0d43efb80d6f733b0dc3bb14e281f131c8b"}, + {file = "pyarrow-17.0.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:dec8d129254d0188a49f8a1fc99e0560dc1b85f60af729f47de4046015f9b0a5"}, + {file = "pyarrow-17.0.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:a48ddf5c3c6a6c505904545c25a4ae13646ae1f8ba703c4df4a1bfe4f4006bda"}, + {file = "pyarrow-17.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:42bf93249a083aca230ba7e2786c5f673507fa97bbd9725a1e2754715151a204"}, + {file = "pyarrow-17.0.0.tar.gz", hash = "sha256:4beca9521ed2c0921c1023e68d097d0299b62c362639ea315572a58f3f50fd28"}, ] [package.dependencies] numpy = ">=1.16.6" +[package.extras] +test = ["cffi", "hypothesis", "pandas", "pytest", "pytz"] + [[package]] name = "pycodestyle" version = "2.12.0" @@ -2191,13 +2189,13 @@ diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pyteomics" -version = "4.7.2" +version = "4.7.3" description = "A framework for proteomics data analysis." optional = false python-versions = "*" files = [ - {file = "pyteomics-4.7.2-py2.py3-none-any.whl", hash = "sha256:fa3b47a35af632002235824e2cfc87f9c4a049598760dfa790113970c0bf01c7"}, - {file = "pyteomics-4.7.2.tar.gz", hash = "sha256:9c2cc22f0e45574c62a8e8628a8412d7b5688ccdd679b2f6ddc6fbbee2abb26d"}, + {file = "pyteomics-4.7.3-py2.py3-none-any.whl", hash = "sha256:e0984dbafd5d545c15ed05f1c6565f76a1f61a56adc76a8a842d4427b3a0388a"}, + {file = "pyteomics-4.7.3.tar.gz", hash = "sha256:ae87f6ba02ee735b06ae56e1ac85a37051aa503e0c9dbfee650c8a7107d08f57"}, ] [package.extras] @@ -2213,13 +2211,13 @@ xml = ["lxml", "numpy"] [[package]] name = "pytest" -version = "8.2.2" +version = "8.3.2" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.2.2-py3-none-any.whl", hash = "sha256:c434598117762e2bd304e526244f67bf66bbd7b5d6cf22138be51ff661980343"}, - {file = "pytest-8.2.2.tar.gz", hash = "sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977"}, + {file = "pytest-8.3.2-py3-none-any.whl", hash = "sha256:4ba08f9ae7dcf84ded419494d229b48d0903ea6407b030eaec46df5e6a73bba5"}, + {file = "pytest-8.3.2.tar.gz", hash = "sha256:c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce"}, ] [package.dependencies] @@ -2227,7 +2225,7 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.5,<2.0" +pluggy = ">=1.5,<2" tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] @@ -2260,13 +2258,13 @@ files = [ [[package]] name = "pyupgrade" -version = "3.16.0" +version = "3.17.0" description = "A tool to automatically upgrade syntax for newer versions." optional = false -python-versions = ">=3.8.1" +python-versions = ">=3.9" files = [ - {file = "pyupgrade-3.16.0-py2.py3-none-any.whl", hash = "sha256:7a54ee28f3024d027048d49d101e5c702e88c85edc3a1d08b636c50ebef2a97d"}, - {file = "pyupgrade-3.16.0.tar.gz", hash = "sha256:237893a05d5b117259b31b423f23cbae4bce0b7eae57ba9a52c06098c2ddd76f"}, + {file = "pyupgrade-3.17.0-py2.py3-none-any.whl", hash = "sha256:cbc8f67a61d3f4e7ca9c2ef57b9aae67f023d3780ce30c99fccec78401723754"}, + {file = "pyupgrade-3.17.0.tar.gz", hash = "sha256:d5dd1dcaf9a016c31508bb9d3d09fd335d736578092f91df52bb26ac30c37919"}, ] [package.dependencies] @@ -2432,90 +2430,90 @@ files = [ [[package]] name = "regex" -version = "2024.5.15" +version = "2024.7.24" description = "Alternative regular expression module, to replace re." optional = false python-versions = ">=3.8" files = [ - {file = "regex-2024.5.15-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a81e3cfbae20378d75185171587cbf756015ccb14840702944f014e0d93ea09f"}, - {file = "regex-2024.5.15-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7b59138b219ffa8979013be7bc85bb60c6f7b7575df3d56dc1e403a438c7a3f6"}, - {file = "regex-2024.5.15-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a0bd000c6e266927cb7a1bc39d55be95c4b4f65c5be53e659537537e019232b1"}, - {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5eaa7ddaf517aa095fa8da0b5015c44d03da83f5bd49c87961e3c997daed0de7"}, - {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ba68168daedb2c0bab7fd7e00ced5ba90aebf91024dea3c88ad5063c2a562cca"}, - {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6e8d717bca3a6e2064fc3a08df5cbe366369f4b052dcd21b7416e6d71620dca1"}, - {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1337b7dbef9b2f71121cdbf1e97e40de33ff114801263b275aafd75303bd62b5"}, - {file = "regex-2024.5.15-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f9ebd0a36102fcad2f03696e8af4ae682793a5d30b46c647eaf280d6cfb32796"}, - {file = "regex-2024.5.15-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9efa1a32ad3a3ea112224897cdaeb6aa00381627f567179c0314f7b65d354c62"}, - {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:1595f2d10dff3d805e054ebdc41c124753631b6a471b976963c7b28543cf13b0"}, - {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b802512f3e1f480f41ab5f2cfc0e2f761f08a1f41092d6718868082fc0d27143"}, - {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:a0981022dccabca811e8171f913de05720590c915b033b7e601f35ce4ea7019f"}, - {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:19068a6a79cf99a19ccefa44610491e9ca02c2be3305c7760d3831d38a467a6f"}, - {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1b5269484f6126eee5e687785e83c6b60aad7663dafe842b34691157e5083e53"}, - {file = "regex-2024.5.15-cp310-cp310-win32.whl", hash = "sha256:ada150c5adfa8fbcbf321c30c751dc67d2f12f15bd183ffe4ec7cde351d945b3"}, - {file = "regex-2024.5.15-cp310-cp310-win_amd64.whl", hash = "sha256:ac394ff680fc46b97487941f5e6ae49a9f30ea41c6c6804832063f14b2a5a145"}, - {file = "regex-2024.5.15-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f5b1dff3ad008dccf18e652283f5e5339d70bf8ba7c98bf848ac33db10f7bc7a"}, - {file = "regex-2024.5.15-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c6a2b494a76983df8e3d3feea9b9ffdd558b247e60b92f877f93a1ff43d26656"}, - {file = "regex-2024.5.15-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a32b96f15c8ab2e7d27655969a23895eb799de3665fa94349f3b2fbfd547236f"}, - {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:10002e86e6068d9e1c91eae8295ef690f02f913c57db120b58fdd35a6bb1af35"}, - {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ec54d5afa89c19c6dd8541a133be51ee1017a38b412b1321ccb8d6ddbeb4cf7d"}, - {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:10e4ce0dca9ae7a66e6089bb29355d4432caed736acae36fef0fdd7879f0b0cb"}, - {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e507ff1e74373c4d3038195fdd2af30d297b4f0950eeda6f515ae3d84a1770f"}, - {file = "regex-2024.5.15-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1f059a4d795e646e1c37665b9d06062c62d0e8cc3c511fe01315973a6542e40"}, - {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0721931ad5fe0dda45d07f9820b90b2148ccdd8e45bb9e9b42a146cb4f695649"}, - {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:833616ddc75ad595dee848ad984d067f2f31be645d603e4d158bba656bbf516c"}, - {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:287eb7f54fc81546346207c533ad3c2c51a8d61075127d7f6d79aaf96cdee890"}, - {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:19dfb1c504781a136a80ecd1fff9f16dddf5bb43cec6871778c8a907a085bb3d"}, - {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:119af6e56dce35e8dfb5222573b50c89e5508d94d55713c75126b753f834de68"}, - {file = "regex-2024.5.15-cp311-cp311-win32.whl", hash = "sha256:1c1c174d6ec38d6c8a7504087358ce9213d4332f6293a94fbf5249992ba54efa"}, - {file = "regex-2024.5.15-cp311-cp311-win_amd64.whl", hash = "sha256:9e717956dcfd656f5055cc70996ee2cc82ac5149517fc8e1b60261b907740201"}, - {file = "regex-2024.5.15-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:632b01153e5248c134007209b5c6348a544ce96c46005d8456de1d552455b014"}, - {file = "regex-2024.5.15-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e64198f6b856d48192bf921421fdd8ad8eb35e179086e99e99f711957ffedd6e"}, - {file = "regex-2024.5.15-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:68811ab14087b2f6e0fc0c2bae9ad689ea3584cad6917fc57be6a48bbd012c49"}, - {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8ec0c2fea1e886a19c3bee0cd19d862b3aa75dcdfb42ebe8ed30708df64687a"}, - {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d0c0c0003c10f54a591d220997dd27d953cd9ccc1a7294b40a4be5312be8797b"}, - {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2431b9e263af1953c55abbd3e2efca67ca80a3de8a0437cb58e2421f8184717a"}, - {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a605586358893b483976cffc1723fb0f83e526e8f14c6e6614e75919d9862cf"}, - {file = "regex-2024.5.15-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:391d7f7f1e409d192dba8bcd42d3e4cf9e598f3979cdaed6ab11288da88cb9f2"}, - {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9ff11639a8d98969c863d4617595eb5425fd12f7c5ef6621a4b74b71ed8726d5"}, - {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:4eee78a04e6c67e8391edd4dad3279828dd66ac4b79570ec998e2155d2e59fd5"}, - {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8fe45aa3f4aa57faabbc9cb46a93363edd6197cbc43523daea044e9ff2fea83e"}, - {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:d0a3d8d6acf0c78a1fff0e210d224b821081330b8524e3e2bc5a68ef6ab5803d"}, - {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c486b4106066d502495b3025a0a7251bf37ea9540433940a23419461ab9f2a80"}, - {file = "regex-2024.5.15-cp312-cp312-win32.whl", hash = "sha256:c49e15eac7c149f3670b3e27f1f28a2c1ddeccd3a2812cba953e01be2ab9b5fe"}, - {file = "regex-2024.5.15-cp312-cp312-win_amd64.whl", hash = "sha256:673b5a6da4557b975c6c90198588181029c60793835ce02f497ea817ff647cb2"}, - {file = "regex-2024.5.15-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:87e2a9c29e672fc65523fb47a90d429b70ef72b901b4e4b1bd42387caf0d6835"}, - {file = "regex-2024.5.15-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c3bea0ba8b73b71b37ac833a7f3fd53825924165da6a924aec78c13032f20850"}, - {file = "regex-2024.5.15-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:bfc4f82cabe54f1e7f206fd3d30fda143f84a63fe7d64a81558d6e5f2e5aaba9"}, - {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5bb9425fe881d578aeca0b2b4b3d314ec88738706f66f219c194d67179337cb"}, - {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:64c65783e96e563103d641760664125e91bd85d8e49566ee560ded4da0d3e704"}, - {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cf2430df4148b08fb4324b848672514b1385ae3807651f3567871f130a728cc3"}, - {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5397de3219a8b08ae9540c48f602996aa6b0b65d5a61683e233af8605c42b0f2"}, - {file = "regex-2024.5.15-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:455705d34b4154a80ead722f4f185b04c4237e8e8e33f265cd0798d0e44825fa"}, - {file = "regex-2024.5.15-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b2b6f1b3bb6f640c1a92be3bbfbcb18657b125b99ecf141fb3310b5282c7d4ed"}, - {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:3ad070b823ca5890cab606c940522d05d3d22395d432f4aaaf9d5b1653e47ced"}, - {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:5b5467acbfc153847d5adb21e21e29847bcb5870e65c94c9206d20eb4e99a384"}, - {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:e6662686aeb633ad65be2a42b4cb00178b3fbf7b91878f9446075c404ada552f"}, - {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:2b4c884767504c0e2401babe8b5b7aea9148680d2e157fa28f01529d1f7fcf67"}, - {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:3cd7874d57f13bf70078f1ff02b8b0aa48d5b9ed25fc48547516c6aba36f5741"}, - {file = "regex-2024.5.15-cp38-cp38-win32.whl", hash = "sha256:e4682f5ba31f475d58884045c1a97a860a007d44938c4c0895f41d64481edbc9"}, - {file = "regex-2024.5.15-cp38-cp38-win_amd64.whl", hash = "sha256:d99ceffa25ac45d150e30bd9ed14ec6039f2aad0ffa6bb87a5936f5782fc1569"}, - {file = "regex-2024.5.15-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:13cdaf31bed30a1e1c2453ef6015aa0983e1366fad2667657dbcac7b02f67133"}, - {file = "regex-2024.5.15-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cac27dcaa821ca271855a32188aa61d12decb6fe45ffe3e722401fe61e323cd1"}, - {file = "regex-2024.5.15-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7dbe2467273b875ea2de38ded4eba86cbcbc9a1a6d0aa11dcf7bd2e67859c435"}, - {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64f18a9a3513a99c4bef0e3efd4c4a5b11228b48aa80743be822b71e132ae4f5"}, - {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d347a741ea871c2e278fde6c48f85136c96b8659b632fb57a7d1ce1872547600"}, - {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1878b8301ed011704aea4c806a3cadbd76f84dece1ec09cc9e4dc934cfa5d4da"}, - {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4babf07ad476aaf7830d77000874d7611704a7fcf68c9c2ad151f5d94ae4bfc4"}, - {file = "regex-2024.5.15-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:35cb514e137cb3488bce23352af3e12fb0dbedd1ee6e60da053c69fb1b29cc6c"}, - {file = "regex-2024.5.15-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cdd09d47c0b2efee9378679f8510ee6955d329424c659ab3c5e3a6edea696294"}, - {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:72d7a99cd6b8f958e85fc6ca5b37c4303294954eac1376535b03c2a43eb72629"}, - {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:a094801d379ab20c2135529948cb84d417a2169b9bdceda2a36f5f10977ebc16"}, - {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:c0c18345010870e58238790a6779a1219b4d97bd2e77e1140e8ee5d14df071aa"}, - {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:16093f563098448ff6b1fa68170e4acbef94e6b6a4e25e10eae8598bb1694b5d"}, - {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:e38a7d4e8f633a33b4c7350fbd8bad3b70bf81439ac67ac38916c4a86b465456"}, - {file = "regex-2024.5.15-cp39-cp39-win32.whl", hash = "sha256:71a455a3c584a88f654b64feccc1e25876066c4f5ef26cd6dd711308aa538694"}, - {file = "regex-2024.5.15-cp39-cp39-win_amd64.whl", hash = "sha256:cab12877a9bdafde5500206d1020a584355a97884dfd388af3699e9137bf7388"}, - {file = "regex-2024.5.15.tar.gz", hash = "sha256:d3ee02d9e5f482cc8309134a91eeaacbdd2261ba111b0fef3748eeb4913e6a2c"}, + {file = "regex-2024.7.24-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:228b0d3f567fafa0633aee87f08b9276c7062da9616931382993c03808bb68ce"}, + {file = "regex-2024.7.24-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3426de3b91d1bc73249042742f45c2148803c111d1175b283270177fdf669024"}, + {file = "regex-2024.7.24-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f273674b445bcb6e4409bf8d1be67bc4b58e8b46fd0d560055d515b8830063cd"}, + {file = "regex-2024.7.24-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23acc72f0f4e1a9e6e9843d6328177ae3074b4182167e34119ec7233dfeccf53"}, + {file = "regex-2024.7.24-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65fd3d2e228cae024c411c5ccdffae4c315271eee4a8b839291f84f796b34eca"}, + {file = "regex-2024.7.24-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c414cbda77dbf13c3bc88b073a1a9f375c7b0cb5e115e15d4b73ec3a2fbc6f59"}, + {file = "regex-2024.7.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf7a89eef64b5455835f5ed30254ec19bf41f7541cd94f266ab7cbd463f00c41"}, + {file = "regex-2024.7.24-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19c65b00d42804e3fbea9708f0937d157e53429a39b7c61253ff15670ff62cb5"}, + {file = "regex-2024.7.24-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:7a5486ca56c8869070a966321d5ab416ff0f83f30e0e2da1ab48815c8d165d46"}, + {file = "regex-2024.7.24-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6f51f9556785e5a203713f5efd9c085b4a45aecd2a42573e2b5041881b588d1f"}, + {file = "regex-2024.7.24-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:a4997716674d36a82eab3e86f8fa77080a5d8d96a389a61ea1d0e3a94a582cf7"}, + {file = "regex-2024.7.24-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:c0abb5e4e8ce71a61d9446040c1e86d4e6d23f9097275c5bd49ed978755ff0fe"}, + {file = "regex-2024.7.24-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:18300a1d78cf1290fa583cd8b7cde26ecb73e9f5916690cf9d42de569c89b1ce"}, + {file = "regex-2024.7.24-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:416c0e4f56308f34cdb18c3f59849479dde5b19febdcd6e6fa4d04b6c31c9faa"}, + {file = "regex-2024.7.24-cp310-cp310-win32.whl", hash = "sha256:fb168b5924bef397b5ba13aabd8cf5df7d3d93f10218d7b925e360d436863f66"}, + {file = "regex-2024.7.24-cp310-cp310-win_amd64.whl", hash = "sha256:6b9fc7e9cc983e75e2518496ba1afc524227c163e43d706688a6bb9eca41617e"}, + {file = "regex-2024.7.24-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:382281306e3adaaa7b8b9ebbb3ffb43358a7bbf585fa93821300a418bb975281"}, + {file = "regex-2024.7.24-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4fdd1384619f406ad9037fe6b6eaa3de2749e2e12084abc80169e8e075377d3b"}, + {file = "regex-2024.7.24-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3d974d24edb231446f708c455fd08f94c41c1ff4f04bcf06e5f36df5ef50b95a"}, + {file = "regex-2024.7.24-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a2ec4419a3fe6cf8a4795752596dfe0adb4aea40d3683a132bae9c30b81e8d73"}, + {file = "regex-2024.7.24-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eb563dd3aea54c797adf513eeec819c4213d7dbfc311874eb4fd28d10f2ff0f2"}, + {file = "regex-2024.7.24-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:45104baae8b9f67569f0f1dca5e1f1ed77a54ae1cd8b0b07aba89272710db61e"}, + {file = "regex-2024.7.24-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:994448ee01864501912abf2bad9203bffc34158e80fe8bfb5b031f4f8e16da51"}, + {file = "regex-2024.7.24-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3fac296f99283ac232d8125be932c5cd7644084a30748fda013028c815ba3364"}, + {file = "regex-2024.7.24-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7e37e809b9303ec3a179085415cb5f418ecf65ec98cdfe34f6a078b46ef823ee"}, + {file = "regex-2024.7.24-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:01b689e887f612610c869421241e075c02f2e3d1ae93a037cb14f88ab6a8934c"}, + {file = "regex-2024.7.24-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f6442f0f0ff81775eaa5b05af8a0ffa1dda36e9cf6ec1e0d3d245e8564b684ce"}, + {file = "regex-2024.7.24-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:871e3ab2838fbcb4e0865a6e01233975df3a15e6fce93b6f99d75cacbd9862d1"}, + {file = "regex-2024.7.24-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c918b7a1e26b4ab40409820ddccc5d49871a82329640f5005f73572d5eaa9b5e"}, + {file = "regex-2024.7.24-cp311-cp311-win32.whl", hash = "sha256:2dfbb8baf8ba2c2b9aa2807f44ed272f0913eeeba002478c4577b8d29cde215c"}, + {file = "regex-2024.7.24-cp311-cp311-win_amd64.whl", hash = "sha256:538d30cd96ed7d1416d3956f94d54e426a8daf7c14527f6e0d6d425fcb4cca52"}, + {file = "regex-2024.7.24-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:fe4ebef608553aff8deb845c7f4f1d0740ff76fa672c011cc0bacb2a00fbde86"}, + {file = "regex-2024.7.24-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:74007a5b25b7a678459f06559504f1eec2f0f17bca218c9d56f6a0a12bfffdad"}, + {file = "regex-2024.7.24-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7df9ea48641da022c2a3c9c641650cd09f0cd15e8908bf931ad538f5ca7919c9"}, + {file = "regex-2024.7.24-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a1141a1dcc32904c47f6846b040275c6e5de0bf73f17d7a409035d55b76f289"}, + {file = "regex-2024.7.24-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80c811cfcb5c331237d9bad3bea2c391114588cf4131707e84d9493064d267f9"}, + {file = "regex-2024.7.24-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7214477bf9bd195894cf24005b1e7b496f46833337b5dedb7b2a6e33f66d962c"}, + {file = "regex-2024.7.24-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d55588cba7553f0b6ec33130bc3e114b355570b45785cebdc9daed8c637dd440"}, + {file = "regex-2024.7.24-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:558a57cfc32adcf19d3f791f62b5ff564922942e389e3cfdb538a23d65a6b610"}, + {file = "regex-2024.7.24-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a512eed9dfd4117110b1881ba9a59b31433caed0c4101b361f768e7bcbaf93c5"}, + {file = "regex-2024.7.24-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:86b17ba823ea76256b1885652e3a141a99a5c4422f4a869189db328321b73799"}, + {file = "regex-2024.7.24-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5eefee9bfe23f6df09ffb6dfb23809f4d74a78acef004aa904dc7c88b9944b05"}, + {file = "regex-2024.7.24-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:731fcd76bbdbf225e2eb85b7c38da9633ad3073822f5ab32379381e8c3c12e94"}, + {file = "regex-2024.7.24-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:eaef80eac3b4cfbdd6de53c6e108b4c534c21ae055d1dbea2de6b3b8ff3def38"}, + {file = "regex-2024.7.24-cp312-cp312-win32.whl", hash = "sha256:185e029368d6f89f36e526764cf12bf8d6f0e3a2a7737da625a76f594bdfcbfc"}, + {file = "regex-2024.7.24-cp312-cp312-win_amd64.whl", hash = "sha256:2f1baff13cc2521bea83ab2528e7a80cbe0ebb2c6f0bfad15be7da3aed443908"}, + {file = "regex-2024.7.24-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:66b4c0731a5c81921e938dcf1a88e978264e26e6ac4ec96a4d21ae0354581ae0"}, + {file = "regex-2024.7.24-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:88ecc3afd7e776967fa16c80f974cb79399ee8dc6c96423321d6f7d4b881c92b"}, + {file = "regex-2024.7.24-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:64bd50cf16bcc54b274e20235bf8edbb64184a30e1e53873ff8d444e7ac656b2"}, + {file = "regex-2024.7.24-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb462f0e346fcf41a901a126b50f8781e9a474d3927930f3490f38a6e73b6950"}, + {file = "regex-2024.7.24-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a82465ebbc9b1c5c50738536fdfa7cab639a261a99b469c9d4c7dcbb2b3f1e57"}, + {file = "regex-2024.7.24-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:68a8f8c046c6466ac61a36b65bb2395c74451df2ffb8458492ef49900efed293"}, + {file = "regex-2024.7.24-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dac8e84fff5d27420f3c1e879ce9929108e873667ec87e0c8eeb413a5311adfe"}, + {file = "regex-2024.7.24-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ba2537ef2163db9e6ccdbeb6f6424282ae4dea43177402152c67ef869cf3978b"}, + {file = "regex-2024.7.24-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:43affe33137fcd679bdae93fb25924979517e011f9dea99163f80b82eadc7e53"}, + {file = "regex-2024.7.24-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:c9bb87fdf2ab2370f21e4d5636e5317775e5d51ff32ebff2cf389f71b9b13750"}, + {file = "regex-2024.7.24-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:945352286a541406f99b2655c973852da7911b3f4264e010218bbc1cc73168f2"}, + {file = "regex-2024.7.24-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:8bc593dcce679206b60a538c302d03c29b18e3d862609317cb560e18b66d10cf"}, + {file = "regex-2024.7.24-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:3f3b6ca8eae6d6c75a6cff525c8530c60e909a71a15e1b731723233331de4169"}, + {file = "regex-2024.7.24-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:c51edc3541e11fbe83f0c4d9412ef6c79f664a3745fab261457e84465ec9d5a8"}, + {file = "regex-2024.7.24-cp38-cp38-win32.whl", hash = "sha256:d0a07763776188b4db4c9c7fb1b8c494049f84659bb387b71c73bbc07f189e96"}, + {file = "regex-2024.7.24-cp38-cp38-win_amd64.whl", hash = "sha256:8fd5afd101dcf86a270d254364e0e8dddedebe6bd1ab9d5f732f274fa00499a5"}, + {file = "regex-2024.7.24-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:0ffe3f9d430cd37d8fa5632ff6fb36d5b24818c5c986893063b4e5bdb84cdf24"}, + {file = "regex-2024.7.24-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:25419b70ba00a16abc90ee5fce061228206173231f004437730b67ac77323f0d"}, + {file = "regex-2024.7.24-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:33e2614a7ce627f0cdf2ad104797d1f68342d967de3695678c0cb84f530709f8"}, + {file = "regex-2024.7.24-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d33a0021893ede5969876052796165bab6006559ab845fd7b515a30abdd990dc"}, + {file = "regex-2024.7.24-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:04ce29e2c5fedf296b1a1b0acc1724ba93a36fb14031f3abfb7abda2806c1535"}, + {file = "regex-2024.7.24-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b16582783f44fbca6fcf46f61347340c787d7530d88b4d590a397a47583f31dd"}, + {file = "regex-2024.7.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:836d3cc225b3e8a943d0b02633fb2f28a66e281290302a79df0e1eaa984ff7c1"}, + {file = "regex-2024.7.24-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:438d9f0f4bc64e8dea78274caa5af971ceff0f8771e1a2333620969936ba10be"}, + {file = "regex-2024.7.24-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:973335b1624859cb0e52f96062a28aa18f3a5fc77a96e4a3d6d76e29811a0e6e"}, + {file = "regex-2024.7.24-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:c5e69fd3eb0b409432b537fe3c6f44ac089c458ab6b78dcec14478422879ec5f"}, + {file = "regex-2024.7.24-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:fbf8c2f00904eaf63ff37718eb13acf8e178cb940520e47b2f05027f5bb34ce3"}, + {file = "regex-2024.7.24-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ae2757ace61bc4061b69af19e4689fa4416e1a04840f33b441034202b5cd02d4"}, + {file = "regex-2024.7.24-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:44fc61b99035fd9b3b9453f1713234e5a7c92a04f3577252b45feefe1b327759"}, + {file = "regex-2024.7.24-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:84c312cdf839e8b579f504afcd7b65f35d60b6285d892b19adea16355e8343c9"}, + {file = "regex-2024.7.24-cp39-cp39-win32.whl", hash = "sha256:ca5b2028c2f7af4e13fb9fc29b28d0ce767c38c7facdf64f6c2cd040413055f1"}, + {file = "regex-2024.7.24-cp39-cp39-win_amd64.whl", hash = "sha256:7c479f5ae937ec9985ecaf42e2e10631551d909f203e31308c12d703922742f9"}, + {file = "regex-2024.7.24.tar.gz", hash = "sha256:9cfd009eed1a46b27c14039ad5bbc5e71b6367c5b2e6d5f5da0ea91600817506"}, ] [[package]] @@ -2788,18 +2786,19 @@ test = ["array-api-strict", "asv", "gmpy2", "hypothesis (>=6.30)", "mpmath", "po [[package]] name = "setuptools" -version = "70.3.0" +version = "72.1.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-70.3.0-py3-none-any.whl", hash = "sha256:fe384da74336c398e0d956d1cae0669bc02eed936cdb1d49b57de1990dc11ffc"}, - {file = "setuptools-70.3.0.tar.gz", hash = "sha256:f171bab1dfbc86b132997f26a119f6056a57950d058587841a0082e8830f9dc5"}, + {file = "setuptools-72.1.0-py3-none-any.whl", hash = "sha256:5a03e1860cf56bb6ef48ce186b0e557fdba433237481a9a625176c2831be15d1"}, + {file = "setuptools-72.1.0.tar.gz", hash = "sha256:8d243eff56d095e5817f796ede6ae32941278f542e0f941867cc05ae52b162ec"}, ] [package.extras] +core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.text (>=3.7)", "more-itertools (>=8.8)", "ordered-set (>=3.1.1)", "packaging (>=24)", "platformdirs (>=2.6.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.10.0)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.11.*)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (<0.4)", "pytest-ruff (>=0.2.1)", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "shellingham" @@ -2858,13 +2857,13 @@ files = [ [[package]] name = "spectrum-fundamentals" -version = "0.6.0" +version = "0.7.0" description = "Fundamental functions, annotation pipeline and constants for oktoberfest" optional = false -python-versions = "<3.11.0,>=3.8.0" +python-versions = "<3.11.0,>=3.9.0" files = [ - {file = "spectrum_fundamentals-0.6.0-py3-none-any.whl", hash = "sha256:e131c7daf418869861db90c128150afb2acef9f459ad36b906c21b4739ebf151"}, - {file = "spectrum_fundamentals-0.6.0.tar.gz", hash = "sha256:e11d41c078b3c4f38b0f3249316b68278b81e15e8898f1401dbfa7c2a61966a9"}, + {file = "spectrum_fundamentals-0.7.0-py3-none-any.whl", hash = "sha256:8926eccd1403690b8f5f7231eb59c910848c35a8c80ed47ca9817db3adc09e14"}, + {file = "spectrum_fundamentals-0.7.0.tar.gz", hash = "sha256:02c4bab9124b40ae87620df2e6dae191a0692dbd6f57748ac32d99b3f69e7e2e"}, ] [package.dependencies] @@ -2879,27 +2878,27 @@ scikit-learn = ">=1.0,<2.0" [[package]] name = "sphinx" -version = "7.3.7" +version = "7.4.7" description = "Python documentation generator" optional = false python-versions = ">=3.9" files = [ - {file = "sphinx-7.3.7-py3-none-any.whl", hash = "sha256:413f75440be4cacf328f580b4274ada4565fb2187d696a84970c23f77b64d8c3"}, - {file = "sphinx-7.3.7.tar.gz", hash = "sha256:a4a7db75ed37531c05002d56ed6948d4c42f473a36f46e1382b0bd76ca9627bc"}, + {file = "sphinx-7.4.7-py3-none-any.whl", hash = "sha256:c2419e2135d11f1951cd994d6eb18a1835bd8fdd8429f9ca375dc1f3281bd239"}, + {file = "sphinx-7.4.7.tar.gz", hash = "sha256:242f92a7ea7e6c5b406fdc2615413890ba9f699114a9c09192d7dfead2ee9cfe"}, ] [package.dependencies] alabaster = ">=0.7.14,<0.8.0" -babel = ">=2.9" -colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -docutils = ">=0.18.1,<0.22" +babel = ">=2.13" +colorama = {version = ">=0.4.6", markers = "sys_platform == \"win32\""} +docutils = ">=0.20,<0.22" imagesize = ">=1.3" -importlib-metadata = {version = ">=4.8", markers = "python_version < \"3.10\""} -Jinja2 = ">=3.0" -packaging = ">=21.0" -Pygments = ">=2.14" -requests = ">=2.25.0" -snowballstemmer = ">=2.0" +importlib-metadata = {version = ">=6.0", markers = "python_version < \"3.10\""} +Jinja2 = ">=3.1" +packaging = ">=23.0" +Pygments = ">=2.17" +requests = ">=2.30.0" +snowballstemmer = ">=2.2" sphinxcontrib-applehelp = "*" sphinxcontrib-devhelp = "*" sphinxcontrib-htmlhelp = ">=2.0.0" @@ -2910,8 +2909,8 @@ tomli = {version = ">=2", markers = "python_version < \"3.11\""} [package.extras] docs = ["sphinxcontrib-websupport"] -lint = ["flake8 (>=3.5.0)", "importlib_metadata", "mypy (==1.9.0)", "pytest (>=6.0)", "ruff (==0.3.7)", "sphinx-lint", "tomli", "types-docutils", "types-requests"] -test = ["cython (>=3.0)", "defusedxml (>=0.7.1)", "pytest (>=6.0)", "setuptools (>=67.0)"] +lint = ["flake8 (>=6.0)", "importlib-metadata (>=6.0)", "mypy (==1.10.1)", "pytest (>=6.0)", "ruff (==0.5.2)", "sphinx-lint (>=0.9)", "tomli (>=2)", "types-docutils (==0.21.0.20240711)", "types-requests (>=2.30.0)"] +test = ["cython (>=3.0)", "defusedxml (>=0.7.1)", "pytest (>=8.0)", "setuptools (>=70.0)", "typing_extensions (>=4.9)"] [[package]] name = "sphinx-autobuild" @@ -2986,49 +2985,49 @@ dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client", "wheel"] [[package]] name = "sphinxcontrib-applehelp" -version = "1.0.8" +version = "2.0.0" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_applehelp-1.0.8-py3-none-any.whl", hash = "sha256:cb61eb0ec1b61f349e5cc36b2028e9e7ca765be05e49641c97241274753067b4"}, - {file = "sphinxcontrib_applehelp-1.0.8.tar.gz", hash = "sha256:c40a4f96f3776c4393d933412053962fac2b84f4c99a7982ba42e09576a70619"}, + {file = "sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5"}, + {file = "sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["pytest"] [[package]] name = "sphinxcontrib-devhelp" -version = "1.0.6" +version = "2.0.0" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp documents" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_devhelp-1.0.6-py3-none-any.whl", hash = "sha256:6485d09629944511c893fa11355bda18b742b83a2b181f9a009f7e500595c90f"}, - {file = "sphinxcontrib_devhelp-1.0.6.tar.gz", hash = "sha256:9893fd3f90506bc4b97bdb977ceb8fbd823989f4316b28c3841ec128544372d3"}, + {file = "sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2"}, + {file = "sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["pytest"] [[package]] name = "sphinxcontrib-htmlhelp" -version = "2.0.5" +version = "2.1.0" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_htmlhelp-2.0.5-py3-none-any.whl", hash = "sha256:393f04f112b4d2f53d93448d4bce35842f62b307ccdc549ec1585e950bc35e04"}, - {file = "sphinxcontrib_htmlhelp-2.0.5.tar.gz", hash = "sha256:0dc87637d5de53dd5eec3a6a01753b1ccf99494bd756aafecd74b4fa9e729015"}, + {file = "sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8"}, + {file = "sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["html5lib", "pytest"] @@ -3062,45 +3061,45 @@ test = ["flake8", "mypy", "pytest"] [[package]] name = "sphinxcontrib-qthelp" -version = "1.0.7" +version = "2.0.0" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp documents" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_qthelp-1.0.7-py3-none-any.whl", hash = "sha256:e2ae3b5c492d58fcbd73281fbd27e34b8393ec34a073c792642cd8e529288182"}, - {file = "sphinxcontrib_qthelp-1.0.7.tar.gz", hash = "sha256:053dedc38823a80a7209a80860b16b722e9e0209e32fea98c90e4e6624588ed6"}, + {file = "sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb"}, + {file = "sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] -test = ["pytest"] +test = ["defusedxml (>=0.7.1)", "pytest"] [[package]] name = "sphinxcontrib-serializinghtml" -version = "1.1.10" +version = "2.0.0" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)" optional = false python-versions = ">=3.9" files = [ - {file = "sphinxcontrib_serializinghtml-1.1.10-py3-none-any.whl", hash = "sha256:326369b8df80a7d2d8d7f99aa5ac577f51ea51556ed974e7716cfd4fca3f6cb7"}, - {file = "sphinxcontrib_serializinghtml-1.1.10.tar.gz", hash = "sha256:93f3f5dc458b91b192fe10c397e324f262cf163d79f3282c158e8436a2c4511f"}, + {file = "sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331"}, + {file = "sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["pytest"] [[package]] name = "starlette" -version = "0.37.2" +version = "0.38.2" description = "The little ASGI library that shines." optional = false python-versions = ">=3.8" files = [ - {file = "starlette-0.37.2-py3-none-any.whl", hash = "sha256:6fe59f29268538e5d0d182f2791a479a0c64638e6935d1c6989e63fb2699c6ee"}, - {file = "starlette-0.37.2.tar.gz", hash = "sha256:9af890290133b79fc3db55474ade20f6220a364a0402e0b556e7cd5e1e093823"}, + {file = "starlette-0.38.2-py3-none-any.whl", hash = "sha256:4ec6a59df6bbafdab5f567754481657f7ed90dc9d69b0c9ff017907dd54faeff"}, + {file = "starlette-0.38.2.tar.gz", hash = "sha256:c7c0441065252160993a1a37cf2a73bb64d271b17303e0b0c1eb7191cfb12d75"}, ] [package.dependencies] @@ -3236,13 +3235,13 @@ files = [ [[package]] name = "types-requests" -version = "2.32.0.20240622" +version = "2.32.0.20240712" description = "Typing stubs for requests" optional = false python-versions = ">=3.8" files = [ - {file = "types-requests-2.32.0.20240622.tar.gz", hash = "sha256:ed5e8a412fcc39159d6319385c009d642845f250c63902718f605cd90faade31"}, - {file = "types_requests-2.32.0.20240622-py3-none-any.whl", hash = "sha256:97bac6b54b5bd4cf91d407e62f0932a74821bc2211f22116d9ee1dd643826caf"}, + {file = "types-requests-2.32.0.20240712.tar.gz", hash = "sha256:90c079ff05e549f6bf50e02e910210b98b8ff1ebdd18e19c873cd237737c1358"}, + {file = "types_requests-2.32.0.20240712-py3-none-any.whl", hash = "sha256:f754283e152c752e46e70942fa2a146b5bc70393522257bb85bd1ef7e019dcc3"}, ] [package.dependencies] @@ -3278,13 +3277,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "uvicorn" -version = "0.30.1" +version = "0.30.4" description = "The lightning-fast ASGI server." optional = false python-versions = ">=3.8" files = [ - {file = "uvicorn-0.30.1-py3-none-any.whl", hash = "sha256:cd17daa7f3b9d7a24de3617820e634d0933b69eed8e33a516071174427238c81"}, - {file = "uvicorn-0.30.1.tar.gz", hash = "sha256:d46cd8e0fd80240baffbcd9ec1012a712938754afcf81bce56c024c1656aece8"}, + {file = "uvicorn-0.30.4-py3-none-any.whl", hash = "sha256:06b00e3087e58c6865c284143c0c42f810b32ff4f265ab19d08c566f74a08728"}, + {file = "uvicorn-0.30.4.tar.gz", hash = "sha256:00db9a9e3711a5fa59866e2b02fac69d8dc70ce0814aaec9a66d1d9e5c832a30"}, ] [package.dependencies] @@ -3485,13 +3484,13 @@ files = [ [[package]] name = "xdoctest" -version = "1.1.5" +version = "1.1.6" description = "A rewrite of the builtin doctest module" optional = false python-versions = ">=3.6" files = [ - {file = "xdoctest-1.1.5-py3-none-any.whl", hash = "sha256:f36fe64d7c0ad0553dbff39ff05c43a0aab69d313466f24a38d00e757182ade0"}, - {file = "xdoctest-1.1.5.tar.gz", hash = "sha256:89b0c3ad7fe03a068e22a457ab18c38fc70c62329c2963f43954b83c29374e66"}, + {file = "xdoctest-1.1.6-py3-none-any.whl", hash = "sha256:a6f673df8c82b8fe0adc536f14c523464f25c6d2b733ed78888b8f8d6c46012e"}, + {file = "xdoctest-1.1.6.tar.gz", hash = "sha256:00ec7bde36addbedf5d1db0db57b6b669a7a4b29ad2d16480950556644f02109"}, ] [package.dependencies] @@ -3528,4 +3527,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = ">=3.9.0,<3.11.0" -content-hash = "7b58204c5231af5f95794d153ae7d47b82bea6e7369a3e683c3c4be18bd3f191" +content-hash = "a391183aa787d06044eae7f0bf978769962bf399f8494c97f670544a6311ec4b" diff --git a/pyproject.toml b/pyproject.toml index bdbd302..d078166 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "spectrum_io" -version = "0.5.0" # <> +version = "0.6.0" # <> description = "IO related functionalities for oktoberfest." authors = ["Wilhelmlab at Technical University of Munich"] license = "MIT" @@ -29,7 +29,7 @@ pyarrow = ">=16.0.0" pymzml = "^2.5.0" pyteomics = "^4.3.3" lxml= '>=4.5.2,<6.0.0' -spectrum-fundamentals = ">=0.6.0,<0.7.0" +spectrum-fundamentals = ">=0.7.0,<0.8.0" alphatims = "^1.0.8" sortedcontainers = "^2.4.0" diff --git a/spectrum_io/__init__.py b/spectrum_io/__init__.py index 3c1c5b3..580ae7b 100644 --- a/spectrum_io/__init__.py +++ b/spectrum_io/__init__.py @@ -2,7 +2,7 @@ __author__ = "Mario Picciani" __email__ = "mario.picciani@tum.de" -__version__ = "0.5.0" +__version__ = "0.6.0" import logging import logging.handlers diff --git a/spectrum_io/__main__.py b/spectrum_io/__main__.py index cf36531..ecf8132 100644 --- a/spectrum_io/__main__.py +++ b/spectrum_io/__main__.py @@ -5,7 +5,7 @@ @click.command() -@click.version_option(version="0.5.0", message=click.style("spectrum_io Version: 0.5.0")) +@click.version_option(version="0.6.0", message=click.style("spectrum_io Version: 0.6.0")) def main() -> None: """spectrum_io.""" From 41dfad00dcce4ce4ba27550bfe780bc7f6a2ab9c Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Thu, 1 Aug 2024 21:37:22 +0200 Subject: [PATCH 19/31] updated requirements --- requirements.txt | 153 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 121 insertions(+), 32 deletions(-) diff --git a/requirements.txt b/requirements.txt index bec5483..ce2f90d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,43 +1,132 @@ -alphatims==1.0.8 ; python_version >= "3.9" and python_full_version < "3.11.0" +alabaster==0.7.16 ; python_version >= "3.9" and python_full_version < "3.11.0" +alphatims==1.0.8 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +annotated-types==0.7.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +anyio==4.4.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +attrs==23.2.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +authlib==1.3.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +babel==2.15.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +bandit==1.7.9 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +black==24.4.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +certifi==2024.7.4 ; python_version >= "3.9" and python_full_version < "3.11.0" +cffi==1.16.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" and platform_python_implementation != "PyPy" +cfgv==3.4.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +charset-normalizer==3.3.2 ; python_version >= "3.9" and python_full_version < "3.11.0" click==8.1.7 ; python_version >= "3.9" and python_full_version < "3.11.0" -colorama==0.4.6 ; python_version >= "3.9" and python_full_version < "3.11.0" and platform_system == "Windows" -contourpy==1.1.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +colorama==0.4.6 ; python_version >= "3.9" and python_full_version < "3.11.0" +contourpy==1.2.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +coverage[toml]==7.6.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +cryptography==43.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" cycler==0.12.1 ; python_version >= "3.9" and python_full_version < "3.11.0" -fonttools==4.51.0 ; python_version >= "3.9" and python_full_version < "3.11.0" -h5py==3.11.0 ; python_version >= "3.9" and python_full_version < "3.11.0" -importlib-metadata==7.1.0 ; python_version >= "3.9" and python_version < "3.9" +darglint==1.8.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +distlib==0.3.8 ; python_version >= "3.9" and python_full_version < "3.11.0" +docutils==0.20.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +dparse==0.6.4b0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +exceptiongroup==1.2.2 ; python_version >= "3.9" and python_version < "3.11" +filelock==3.12.4 ; python_version >= "3.9" and python_full_version < "3.11.0" +flake8-bandit==4.1.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +flake8-bugbear==24.4.26 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +flake8-docstrings==1.7.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +flake8-rst-docstrings==0.3.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +flake8==7.1.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +fonttools==4.53.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +h11==0.14.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +h5py==3.11.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +identify==2.6.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +idna==3.7 ; python_version >= "3.9" and python_full_version < "3.11.0" +imagesize==1.4.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +importlib-metadata==8.2.0 ; python_version >= "3.9" and python_version < "3.10" importlib-resources==6.4.0 ; python_version >= "3.9" and python_version < "3.10" -joblib==1.4.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +iniconfig==2.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +jinja2==3.1.4 ; python_version >= "3.9" and python_full_version < "3.11.0" +joblib==1.4.2 ; python_version >= "3.9" and python_full_version < "3.11.0" kiwisolver==1.4.5 ; python_version >= "3.9" and python_full_version < "3.11.0" -llvmlite==0.41.1 ; python_version >= "3.9" and python_full_version < "3.11.0" -lxml==4.9.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" -markdown-it-py==3.0.0 ; python_version >= "3.9" and python_full_version < "3.11.0" -matplotlib==3.7.5 ; python_version >= "3.9" and python_full_version < "3.11.0" -mdurl==0.1.2 ; python_version >= "3.9" and python_full_version < "3.11.0" +llvmlite==0.43.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +lxml==5.2.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +markdown-it-py==3.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +markupsafe==2.1.5 ; python_version >= "3.9" and python_full_version < "3.11.0" +marshmallow==3.21.3 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +matplotlib==3.9.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +mccabe==0.7.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +mdurl==0.1.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" moepy==1.1.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" -numba==0.58.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +mypy-extensions==1.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +mypy==1.11.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +nodeenv==1.9.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +numba==0.60.0 ; python_version >= "3.9" and python_full_version < "3.11.0" numpy==1.24.4 ; python_version >= "3.9" and python_full_version < "3.11.0" -packaging==24.0 ; python_version >= "3.9" and python_full_version < "3.11.0" -pandas==1.5.3 ; python_version >= "3.9" and python_full_version < "3.11.0" -pillow==10.3.0 ; python_version >= "3.9" and python_full_version < "3.11.0" -psutil==5.9.8 ; python_version >= "3.9" and python_full_version < "3.11.0" -pyarrow==16.1.0 ; python_full_version >= "3.9" and python_full_version < "3.11.0" -pygments==2.17.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" -pymzml==2.5.9 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +packaging==24.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +pandas==1.5.3 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pathspec==0.12.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pbr==6.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pep8-naming==0.14.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pillow==10.4.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +platformdirs==4.2.2 ; python_version >= "3.9" and python_full_version < "3.11.0" +pluggy==1.5.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pre-commit-hooks==4.6.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pre-commit==3.8.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +psutil==6.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pyarrow==17.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pycodestyle==2.12.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pycparser==2.22 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" and platform_python_implementation != "PyPy" +pydantic-core==2.20.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pydantic==2.8.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pydocstyle==6.3.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pyflakes==3.2.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pygments==2.18.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +pymzml==2.5.10 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" pyparsing==3.1.2 ; python_version >= "3.9" and python_full_version < "3.11.0" -pyteomics==4.7.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pyteomics==4.7.3 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pytest==8.3.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" python-dateutil==2.9.0.post0 ; python_version >= "3.9" and python_full_version < "3.11.0" -pytz==2024.1 ; python_version >= "3.9" and python_full_version < "3.11.0" -pyyaml==6.0.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" -pyzstd==0.15.10 ; python_version >= "3.9" and python_full_version < "3.11.0" -regex==2024.4.16 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pytz==2024.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pyupgrade==3.17.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +pyyaml==6.0.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +pyzstd==0.16.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +regex==2024.7.24 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +requests==2.32.3 ; python_version >= "3.9" and python_full_version < "3.11.0" +restructuredtext-lint==1.4.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" rich==13.7.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" -scikit-learn==1.3.2 ; python_version >= "3.9" and python_full_version < "3.11.0" -scipy==1.10.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +ruamel-yaml-clib==0.2.8 ; platform_python_implementation == "CPython" and python_full_version < "3.11.0" and python_full_version >= "3.9.0" +ruamel-yaml==0.18.6 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +safety-schemas==0.0.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +safety==3.2.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +scikit-learn==1.5.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +scipy==1.13.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +setuptools==72.1.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +shellingham==1.5.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" six==1.16.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +sniffio==1.3.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +snowballstemmer==2.2.0 ; python_version >= "3.9" and python_full_version < "3.11.0" sortedcontainers==2.4.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" -spectrum-fundamentals==0.5.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" -threadpoolctl==3.4.0 ; python_version >= "3.9" and python_full_version < "3.11.0" -tqdm==4.66.2 ; python_version >= "3.9" and python_full_version < "3.11.0" -typing-extensions==4.11.0 ; python_version >= "3.9" and python_version < "3.9" -zipp==3.18.1 ; python_version >= "3.9" and python_version < "3.10" +spectrum-fundamentals==0.7.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +sphinx-autobuild==2024.4.16 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinx-click==6.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +sphinx-rtd-dark-mode==1.3.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +sphinx-rtd-theme==2.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +sphinx==7.4.7 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinxcontrib-applehelp==2.0.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinxcontrib-devhelp==2.0.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinxcontrib-htmlhelp==2.1.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinxcontrib-jquery==4.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinxcontrib-qthelp==2.0.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +starlette==0.38.2 ; python_version >= "3.9" and python_full_version < "3.11.0" +stevedore==5.2.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +threadpoolctl==3.5.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +tokenize-rt==5.2.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +tomli==2.0.1 ; python_version >= "3.9" and python_version < "3.11" +tqdm==4.66.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +typeguard==4.3.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +typer==0.12.3 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +types-attrs==19.1.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +types-pkg-resources==0.1.3 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +types-requests==2.32.0.20240712 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +typing-extensions==4.12.2 ; python_version >= "3.9" and python_version < "3.11" +urllib3==2.2.2 ; python_version >= "3.9" and python_full_version < "3.11.0" +uvicorn==0.30.4 ; python_version >= "3.9" and python_full_version < "3.11.0" +virtualenv==20.26.3 ; python_version >= "3.9" and python_full_version < "3.11.0" +watchfiles==0.22.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +websockets==12.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +xdoctest[colors]==1.1.6 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +zipp==3.19.2 ; python_version >= "3.9" and python_version < "3.10" From 72d63f4c8d180f7c8743481228d3f5a29843b317 Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Thu, 1 Aug 2024 21:52:52 +0200 Subject: [PATCH 20/31] made standard mods a property and use by default --- spectrum_io/search_result/maxquant.py | 17 ++++++++++------- spectrum_io/search_result/msfragger.py | 9 ++++++--- spectrum_io/search_result/sage.py | 13 ++++++------- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/spectrum_io/search_result/maxquant.py b/spectrum_io/search_result/maxquant.py index a378a1c..caeea68 100644 --- a/spectrum_io/search_result/maxquant.py +++ b/spectrum_io/search_result/maxquant.py @@ -27,6 +27,15 @@ def __init__(self, path: Union[str, Path]): path = path.parent self.path = path + @property + def standard_mods(self): + """Standard modifications that are always applied if not otherwise specified.""" + return { + "C": 4, + "M(ox)": 35, + "M(Oxidation (M))": 35, + } + @staticmethod def add_tmt_mod(mass: float, seq: str, unimod_tag: str) -> float: """ @@ -55,13 +64,7 @@ def read_result( are mapped automatically. To avoid this, explicitely provide an empty dictionary. :return: pd.DataFrame with the formatted data """ - if custom_mods is None: - custom_mods = { - "C": 4, - "M(ox)": 35, - "M(Oxidation (M))": 35, - } - parsed_mods = parse_mods(custom_mods) + parsed_mods = parse_mods(self.standard_mods | (custom_mods or {})) if tmt_label: unimod_tag = c.TMT_MODS[tmt_label] parsed_mods["K"] = f"K{unimod_tag}" diff --git a/spectrum_io/search_result/msfragger.py b/spectrum_io/search_result/msfragger.py index aa9032b..f29baa0 100644 --- a/spectrum_io/search_result/msfragger.py +++ b/spectrum_io/search_result/msfragger.py @@ -17,6 +17,11 @@ class MSFragger(SearchResults): """Handle search results from MSFragger.""" + @property + def standard_mods(self): + """Standard modifications that are always applied if not otherwise specified.""" + return {"C": 4, "M[147]": 35} + def read_result( self, tmt_label: str = "", @@ -32,9 +37,7 @@ def read_result( :raises FileNotFoundError: in case the given path is neither a file, nor a directory. :return: pd.DataFrame with the formatted data """ - if custom_mods is None: - custom_mods = {"C": 4, "M[147]": 35} - parsed_mods = parse_mods(custom_mods) + parsed_mods = parse_mods(self.standard_mods | (custom_mods or {})) if tmt_label: unimod_tag = c.TMT_MODS[tmt_label] parsed_mods["K"] = f"K{unimod_tag}" diff --git a/spectrum_io/search_result/sage.py b/spectrum_io/search_result/sage.py index 2451efe..17959fe 100644 --- a/spectrum_io/search_result/sage.py +++ b/spectrum_io/search_result/sage.py @@ -14,6 +14,11 @@ class Sage(SearchResults): """Handle search results from Sage.""" + @property + def standard_mods(self): + """Standard modifications that are always applied if not otherwise specified.""" + return {"C[+57.0215]": 4, "M[+15.9949]": 35, "M[+15.994]": 35} + def read_result( self, tmt_label: str = "", @@ -28,13 +33,7 @@ def read_result( are mapped automatically. To avoid this, explicitely provide an empty dictionary. :return: pd.DataFrame with the formatted data """ - if custom_mods is None: - custom_mods = { - "C[+57.0215]": 4, - "M[+15.9949]": 35, - "M[+15.994]": 35, - } - parsed_mods = parse_mods(custom_mods) + parsed_mods = parse_mods(self.standard_mods | (custom_mods or {})) if tmt_label: unimod_tag = c.TMT_MODS[tmt_label] parsed_mods[r"K\[\+\d+\.\d+\]"] = f"K{unimod_tag}" From b86034c9c5283b27c2272a9ca911ec2d6689bb5d Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Thu, 1 Aug 2024 21:55:40 +0200 Subject: [PATCH 21/31] remove standard mods from custom mods --- tests/unit_tests/test_maxquant.py | 2 -- tests/unit_tests/test_msfragger.py | 2 +- tests/unit_tests/test_sage.py | 8 +++----- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/unit_tests/test_maxquant.py b/tests/unit_tests/test_maxquant.py index 03cb6cf..d407067 100644 --- a/tests/unit_tests/test_maxquant.py +++ b/tests/unit_tests/test_maxquant.py @@ -63,8 +63,6 @@ def test_read_maxquant_with_custom_mods_with_tmt(self): expected_df_path = Path(__file__).parent / "data" / "msms_internal_tmt.csv" internal_search_results_df = MaxQuant(Path(__file__).parent / "data" / "msms.txt").read_result(tmt_label="") custom_mods = { - "M(Oxidation (M)": 35, - "C": 4, "K": 2016, "^": 2016, } diff --git a/tests/unit_tests/test_msfragger.py b/tests/unit_tests/test_msfragger.py index e07c4ac..4767d09 100644 --- a/tests/unit_tests/test_msfragger.py +++ b/tests/unit_tests/test_msfragger.py @@ -69,7 +69,7 @@ def test_read_msfragger_with_custom_mods(self): def test_read_msfragger_with_custom_mods_with_tmt(self): """Test function for reading msfragger results and transforming to Prosit format with custom mods and explicit TMT.""" expected_msfragger_internal_path = Path(__file__).parent / "data" / "psm_tmt_internal.csv" - custom_mods = {"M[147]": 35, "C": 4, "^n[305]": 2016, "K": 2016} + custom_mods = {"^n[305]": 2016, "K": 2016} internal_search_results_df = MSFragger(Path(__file__).parent / "data" / "psm_tmt.pepXML").read_result( custom_mods=custom_mods diff --git a/tests/unit_tests/test_sage.py b/tests/unit_tests/test_sage.py index 0169777..679f9da 100644 --- a/tests/unit_tests/test_sage.py +++ b/tests/unit_tests/test_sage.py @@ -31,12 +31,10 @@ def test_read_sage(self): expected_df = pd.read_csv(expected_sage_internal_path) pd.testing.assert_frame_equal(internal_search_results_df[COLUMNS], expected_df[COLUMNS]) - def test_read_msfragger_with_custom_mods(self): + def test_read_sage_with_custom_mods(self): """Test function for reading sage results with custom mods and transforming to Prosit format .""" custom_mods = { - "C[+57.0215]": 4, "M[+15.9948]": 35, - "M[+15.994]": 35, } expected_sage_internal_path = Path(__file__).parent / "data" / "sage_output_internal_mods.csv" internal_search_results_df = Sage(Path(__file__).parent / "data" / "sage_output_mods.tsv").read_result( @@ -45,9 +43,9 @@ def test_read_msfragger_with_custom_mods(self): expected_df = pd.read_csv(expected_sage_internal_path) pd.testing.assert_frame_equal(internal_search_results_df, expected_df) - def test_read_msfragger_with_custom_mods_with_tmt(self): + def test_read_sage_with_custom_mods_with_tmt(self): """Test function for reading sage results with custom mods and transforming to Prosit format .""" - custom_mods = {"C[+57.0215]": 4, "M[+15.9948]": 35, "M[+15.994]": 35, "K[+229.1629]": 737, "^[+229.1629]-": 737} + custom_mods = {"M[+15.9948]": 35, "K[+229.1629]": 737, "^[+229.1629]-": 737} expected_sage_internal_path = Path(__file__).parent / "data" / "sage_output_internal_mods.csv" internal_search_results_df = Sage(Path(__file__).parent / "data" / "sage_output_mods.tsv").read_result( custom_mods=custom_mods From 9628f98bf2b81110d94880453c745f89fe4774c8 Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Thu, 1 Aug 2024 22:28:36 +0200 Subject: [PATCH 22/31] fixed most mypy errors --- spectrum_io/search_result/mascot.py | 47 +++++++-------------- spectrum_io/search_result/sage.py | 3 +- spectrum_io/search_result/search_results.py | 12 +++--- spectrum_io/search_result/xisearch.py | 10 ++--- 4 files changed, 27 insertions(+), 45 deletions(-) diff --git a/spectrum_io/search_result/mascot.py b/spectrum_io/search_result/mascot.py index 7e6f2eb..cea93f4 100644 --- a/spectrum_io/search_result/mascot.py +++ b/spectrum_io/search_result/mascot.py @@ -6,7 +6,7 @@ import pandas as pd import spectrum_fundamentals.constants as c -from spectrum_fundamentals.mod_string import custom_regex_escape, internal_without_mods +from spectrum_fundamentals.mod_string import internal_without_mods from .search_results import SearchResults, filter_valid_prosit_sequences @@ -16,18 +16,26 @@ class Mascot(SearchResults): """Handle search results from Mascot.""" + @property + def standard_mods(self): + """Standard modifications that are always applied if not otherwise specified.""" + return {} + def read_result( self, - tmt_labeled: str, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + tmt_label: str = "", + custom_mods: Optional[Dict[str, int]] = None, ) -> pd.DataFrame: """ Function to read a mascot msf file and perform some basic formatting. - :param tmt_labeled: tmt label as str + :param tmt_label: tmt label as str :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass + :raises NotImplementedError: always :return: pd.DataFrame with the formatted data """ + raise NotImplementedError + logger.info("Reading mascot msf file") connection = sqlite3.connect(self.path) # cursor = connection.cursor() @@ -83,39 +91,14 @@ def read_result( mod_masses = c.update_mod_masses() mod_masses_reverse = {round(float(v), 3): k for k, v in mod_masses.items()} - def find_replacement(match: re.Match) -> str: - """ - Subfunction to find the corresponding substitution for a match. - - :param match: an re.Match object found by re.sub - :return: substitution string for the given match - """ - key = match.string[match.start() : match.end()] - return mods[key] - - stat_mods: Dict[str, str] = {} - var_mods: Dict[str, str] = {} - - if custom_mods is not None: - stat_mods = {key: value[0] for key, value in (custom_mods.get("stat_mods") or {}).items()} - var_mods = {key: value[0] for key, value in (custom_mods.get("var_mods") or {}).items()} - - mods = {} - - if var_mods is not None: - mods.update(var_mods) - if stat_mods is not None: - mods.update(stat_mods) - - if mods: - regex = re.compile("|".join(map(custom_regex_escape, mods.keys()))) + parsed_mods = self.standard_mods | (custom_mods or {}) sequences = [] for _, row in df.iterrows(): modifications = row["MODIFICATIONS"].split("|") sequence = row["SEQUENCE"] - if mods: - sequence = regex.sub(lambda match: find_replacement(match), sequence) + if parsed_mods: + sequence = sequence.replace(parsed_mods, sequence, regex=True) if len(modifications) == 0: sequences.append(sequence) diff --git a/spectrum_io/search_result/sage.py b/spectrum_io/search_result/sage.py index f954f87..1cf91da 100644 --- a/spectrum_io/search_result/sage.py +++ b/spectrum_io/search_result/sage.py @@ -48,7 +48,6 @@ def read_result( logger.info(f"Finished reading {self.path}") self.convert_to_internal(mods=parsed_mods) - print(parsed_mods, self.results) return filter_valid_prosit_sequences(self.results) def convert_to_internal(self, mods: Dict[str, str]) -> pd.DataFrame: @@ -62,7 +61,7 @@ def convert_to_internal(self, mods: Dict[str, str]) -> pd.DataFrame: df.fillna({"proteins": "UNKNOWN"}, inplace=True) df.replace({"filename": {r"\.mz[M|m][l|L]": ""}, "peptide": mods}, regex=True, inplace=True) if not df["scannr"].dtype == int: - df["scannr"] = df["scannr"].str.rsplit(pat="=", n=1).str[1].astype(int) + df["scannr"] = df["scannr"].str.rsplit(pat="=", n=1).str[1].astype("int64") df["label"] = df["label"] < 0 df["SEQUENCE"] = internal_without_mods(df["peptide"]) df["PEPTIDE_LENGTH"] = df["SEQUENCE"].str.len() diff --git a/spectrum_io/search_result/search_results.py b/spectrum_io/search_result/search_results.py index 4c7619a..168648b 100644 --- a/spectrum_io/search_result/search_results.py +++ b/spectrum_io/search_result/search_results.py @@ -110,21 +110,21 @@ def read_result( def generate_internal( self, - tmt_labeled: str, + tmt_label: str = "", out_path: Optional[Union[str, Path]] = None, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + custom_mods: Optional[Dict[str, int]] = None, ) -> pd.DataFrame: """ Generate df and save to out_path if provided. :param out_path: path to output - :param tmt_labeled: tmt label as str + :param tmt_label: tmt label as str :param custom_mods: dict with static and variable custom modifications, their internal identifier and mass :return: path to output file """ if out_path is None: # convert and return - return self.read_result(tmt_labeled, custom_mods=custom_mods) + return self.read_result(tmt_label, custom_mods=custom_mods) if isinstance(out_path, str): out_path = Path(out_path) @@ -136,7 +136,7 @@ def generate_internal( return csv.read_file(out_path) # convert, save and return - df = self.read_result(tmt_labeled, custom_mods=custom_mods) + df = self.read_result(tmt_label, custom_mods=custom_mods) csv.write_file(df, out_path) return df @@ -149,7 +149,7 @@ def read_internal(self) -> pd.DataFrame: return csv.read_file(self.path) @abstractmethod - def convert_to_internal(self, mods: Dict[str, int]): + def convert_to_internal(self, mods: Dict[str, str]): """ Convert all columns in the search engine-specific output to the internal format used by Oktoberfest. diff --git a/spectrum_io/search_result/xisearch.py b/spectrum_io/search_result/xisearch.py index ffeb5ef..688fc3e 100644 --- a/spectrum_io/search_result/xisearch.py +++ b/spectrum_io/search_result/xisearch.py @@ -19,18 +19,18 @@ class Xisearch(SearchResults): def read_result( self, - tmt_labeled: str = "", - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + tmt_label: str = "", + custom_mods: Optional[Dict[str, int]] = None, ) -> pd.DataFrame: """ Function to read a csv of CSMs and perform some basic formatting. - :param tmt_labeled: tmt label as str + :param tmt_label: tmt label as str :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass :raises NotImplementedError: if a tmt label is provided :return: pd.DataFrame with the formatted data """ - if tmt_labeled != "": + if tmt_label != "": raise NotImplementedError("TMT is not supported for XIsearch") logger.info("Reading search results file...") @@ -112,7 +112,7 @@ def update_columns_for_prosit(df: pd.DataFrame) -> pd.DataFrame: df["PEPTIDE_LENGTH_B"] = df["aa_len_p2"] logger.info("Converting XIsearch peptide sequence to internal format...") - df["RAW_FILE"] = df["RAW_FILE"].str.replace(".raw", "") + df["RAW_FILE"] = df["RAW_FILE"].str.replace(".raw", "", regex=False) df["MODIFIED_SEQUENCE_A"] = df.apply( lambda row: xisearch_to_internal( From 19ed099348440c978202e471edc0d981f07c6dbc Mon Sep 17 00:00:00 2001 From: Fabian Basso Date: Fri, 2 Aug 2024 07:09:45 +0000 Subject: [PATCH 23/31] mypy test successfully fixed --- spectrum_io/spectral_library/spectral_library.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spectrum_io/spectral_library/spectral_library.py b/spectrum_io/spectral_library/spectral_library.py index 9abf0f6..0ccce6b 100644 --- a/spectrum_io/spectral_library/spectral_library.py +++ b/spectrum_io/spectral_library/spectral_library.py @@ -68,7 +68,8 @@ def async_write( content = queue.get() if content is None: break - self._write(out, *content, custom_mods=custom_mods) + data, metadata = content + self._write(out, data=data, metadata=metadata, custom_mods=custom_mods) progress.value += 1 def _fragment_filter_passed( From e2967f8920655f6410c823f1cfd0139243b5c146 Mon Sep 17 00:00:00 2001 From: Fabian Basso Date: Fri, 2 Aug 2024 07:47:10 +0000 Subject: [PATCH 24/31] typeguard tests succesfully fixed --- spectrum_io/search_result/maxquant.py | 2 +- spectrum_io/search_result/msfragger.py | 2 +- spectrum_io/search_result/sage.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spectrum_io/search_result/maxquant.py b/spectrum_io/search_result/maxquant.py index caeea68..709746a 100644 --- a/spectrum_io/search_result/maxquant.py +++ b/spectrum_io/search_result/maxquant.py @@ -78,7 +78,7 @@ def read_result( self.convert_to_internal(mods=parsed_mods) return filter_valid_prosit_sequences(self.results) - def convert_to_internal(self, mods: Dict[str, str]) -> pd.DataFrame: + def convert_to_internal(self, mods: Dict[str, str]): """ Convert all columns in the MaxQuant output to the internal format used by Oktoberfest. diff --git a/spectrum_io/search_result/msfragger.py b/spectrum_io/search_result/msfragger.py index f29baa0..47ce5fb 100644 --- a/spectrum_io/search_result/msfragger.py +++ b/spectrum_io/search_result/msfragger.py @@ -58,7 +58,7 @@ def read_result( self.convert_to_internal(mods=parsed_mods) return filter_valid_prosit_sequences(self.results) - def convert_to_internal(self, mods: Dict[str, str]) -> pd.DataFrame: + def convert_to_internal(self, mods: Dict[str, str]): """ Convert all columns in the MSFragger output to the internal format used by Oktoberfest. diff --git a/spectrum_io/search_result/sage.py b/spectrum_io/search_result/sage.py index 1cf91da..beeb1df 100644 --- a/spectrum_io/search_result/sage.py +++ b/spectrum_io/search_result/sage.py @@ -50,7 +50,7 @@ def read_result( self.convert_to_internal(mods=parsed_mods) return filter_valid_prosit_sequences(self.results) - def convert_to_internal(self, mods: Dict[str, str]) -> pd.DataFrame: + def convert_to_internal(self, mods: Dict[str, str]): """ Convert all columns in the Sage output to the internal format used by Oktoberfest. From 326b0053a7c8a9f4a522944f1a609c08ef77b92f Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Fri, 2 Aug 2024 16:35:59 +0200 Subject: [PATCH 25/31] updated docs --- README.rst | 12 +++++- ReadMe.md | 39 +++++++------------- docs/_key_contributors.rst | 4 +- docs/contributors.md | 5 --- docs/installation.rst | 17 +++++++-- docs/quickstart.rst | 3 +- docs/reference.rst | 10 ++++- docs/spectrum_io.file.rst | 37 ------------------- docs/spectrum_io.raw.rst | 29 --------------- docs/spectrum_io.rst | 21 ----------- docs/spectrum_io.search_result.rst | 45 ----------------------- docs/spectrum_io.spectral_library.rst | 53 --------------------------- spectrum_io/__init__.py | 29 ++++++++++----- 13 files changed, 68 insertions(+), 236 deletions(-) delete mode 100644 docs/contributors.md delete mode 100644 docs/spectrum_io.file.rst delete mode 100644 docs/spectrum_io.raw.rst delete mode 100644 docs/spectrum_io.rst delete mode 100644 docs/spectrum_io.search_result.rst delete mode 100644 docs/spectrum_io.spectral_library.rst diff --git a/README.rst b/README.rst index 211c412..afa1aa1 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -Spectrum-IO: File / Data Conversion for Mass Spec data within the Oktoberfest ecosystem +Spectrum IO: File / Data Conversion for Mass Spec data within the Oktoberfest ecosystem ======================================================================================= |PyPI| |Python Version| |License| |Read the Docs| |Build| |Tests| |Codecov| |pre-commit| |Black| @@ -31,4 +31,12 @@ Spectrum-IO: File / Data Conversion for Mass Spec data within the Oktoberfest ec :target: https://github.com/psf/black :alt: Black -Spectrum IO is a package primarily developed for usage within oktoberfest (https://github.com/wilhelm-lab/oktoberfest). It handles file conversions and input / output operations for oktoberfest. +spectrum_io is a package primarily developed for usage within the rescoring and spectral library generation pipeline oktoberfest (https://github.com/wilhelm-lab/oktoberfest). + +It provides the following functionalities: + - read search results from different search engines (MaxQuant, MSFragger, Sage, Xisearch) or a generic csv format and transform them to the internal format for rescoring with oktoberfest + - extraction of MS2 level spectra from .RAW files and conversion to to mzML for rescoring with oktoberfest + - spectra extraction from .d folders, conversion to .hdf5 format, and aggregation to MS2 level with metadata from a MaxQuant search for timsTOF rescoring with oktoberfest + - in-silico digestion of a fasta file with various configuration options (protease, missed cleavages, length of peptides, fragmentation, ...) for spectral library generation with oktoberfest + - write spectral libraries in dlib, msp, or spectronaut(csv) format + - parquet file creation for peptide prediction model development and refinement within DLOmix diff --git a/ReadMe.md b/ReadMe.md index cec3896..455841f 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -8,36 +8,25 @@ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) -# Spectrum IO +# Spectrum IO: File / Data Conversion for Mass Spec data within the Oktoberfest ecosystem -Spectrum IO is a package primarily developed for usage within oktoberfest (https://github.com/wilhelm-lab/oktoberfest). It handles file conversions and input / output operations for oktoberfest. +spectrum_io is a package primarily developed for usage within the rescoring and spectral library generation pipeline oktoberfest (https://github.com/wilhelm-lab/oktoberfest). -## Installation +It provides the following functionalities: -### Prerequisites - -If you want to convert raw files to mzml, make sure you have ThermoRawFileParser (https://github.com/compomics/ThermoRawFileParser) installed. - -If you are on linux or MacOS, make sure mono (https://www.mono-project.com/) is installed (for ThermoRawFileParser). - -### Using pip - -```bash -pip install oktoberfest -``` - -## Features - -- Read search results from different search engines (Mascot, MaxQuant, MSFragger, MS Amanda) and transform them to the internal format used by oktoberfest -- Read thermo raw files and convert them to mzml, required by oktoberfest -- Read a fasta file and digest with various configurations (protease, missed cleavages, length of peptides, fragmentation, ...) for spectral library generation -- Create spectral libraries from peptide lists and output as dlib, msp or spectronaut(csv) format -- read and write data created as part of oktoberfest in hdf5 libraries +- read search results from different search engines (MaxQuant, MSFragger, Sage, Xisearch) or a generic csv format and transform them to the internal format for rescoring with oktoberfest +- extraction of MS2 level spectra from .RAW files and conversion to to mzML for rescoring with oktoberfest +- spectra extraction from .d folders, conversion to .hdf5 format, and aggregation to MS2 level with metadata from a MaxQuant search for timsTOF rescoring with oktoberfest +- in-silico digestion of a fasta file with various configuration options (protease, missed cleavages, length of peptides, fragmentation, ...) for spectral library generation with oktoberfest +- write spectral libraries in dlib, msp, or spectronaut(csv) format +- parquet file creation for peptide prediction model development and refinement within DLOmix ## Documentation -Please refer to https://spectrum-io.readthedocs.io for further documentation. +The official documentation can be found at https://spectrum-fundamentals.readthedocs.io + +## How to cite -## License +Please always cite the main publication: -The project is licensed under the [MIT license](https://github.com/wilhelm-lab/spectrum_io/blob/main/LICENSE). +[Oktoberfest] Picciani M, Gabriel W, Giurcoiu VG et al. (2023), _Oktoberfest: Open-source spectral library generation and rescoring pipeline based on Prosit_, [Proteomics](https://doi.org/10.1002/pmic.202300112) diff --git a/docs/_key_contributors.rst b/docs/_key_contributors.rst index 4b589da..70f87a5 100644 --- a/docs/_key_contributors.rst +++ b/docs/_key_contributors.rst @@ -5,11 +5,11 @@ * `Mario Picciani `_: lead developer since 2022, maintainer * `Mostafa Kalhor `_: developer, crosslinking * `Wassim Gabriel `_: developer, PTMs, neutral losses, GUI - * Arne van den Berg: developer, diverse contributions + * `Arne van den Berg `_: developer, diverse contributions * `Victor-George Giurcoiu `_: developer, diverse contributions * `Ludwig Lautenbacher `_: developer, Koina, GUI * `Armin Soleymaniniya `_: developer, GUI - * Ayla Schröder: developer, pickedGroupFDR + * `Ayla Schröder `_: developer, pickedGroupFDR * Zixuan Xiao: developer, GUI Previous developers diff --git a/docs/contributors.md b/docs/contributors.md deleted file mode 100644 index 60c1fe3..0000000 --- a/docs/contributors.md +++ /dev/null @@ -1,5 +0,0 @@ -# Contributors - -```{eval-rst} -.. include:: _key_contributors.rst -``` diff --git a/docs/installation.rst b/docs/installation.rst index 787bc8f..f65795a 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -1,9 +1,18 @@ .. highlight:: shell -============ Installation ============ -.. include:: ../README.rst - :start-line: 40 - :end-line: 47 \ No newline at end of file +spectrum_io is listed on the Python Package Index (PyPI) and can be installed with pip. + +.. code-block:: bash + + pip install spectrum_io + + +Dependencies for Raw/mzml conversion +------------------------------------ + +If you want to convert raw files to mzml, make sure you have ThermoRawFileParser (https://github.com/compomics/ThermoRawFileParser) installed. + +If you are on linux or MacOS, make sure mono (https://www.mono-project.com/) is installed (for ThermoRawFileParser). diff --git a/docs/quickstart.rst b/docs/quickstart.rst index e582491..7d12d5d 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -3,4 +3,5 @@ Quickstart - Discuss usage, development and issues on `GitHub `_. - Check the `usage principles <./usage.html>`_ or the `API <./API.html>`_. -- Check the `Contributor Guide <./contributing.html>`_ if you want to participate in developing. \ No newline at end of file +- Check the `Contributor Guide <./contributing.html>`_ if you want to participate in developing. +- Consider citing the main publication, `Oktoberfest `_. \ No newline at end of file diff --git a/docs/reference.rst b/docs/reference.rst index f97cb5b..61ac47a 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -1,2 +1,8 @@ -References -========== \ No newline at end of file +How to cite +=========== + +If you want to cite spectrum_io in your work, please cite the main Oktoberfest publication: + +.. [1] Picciani M, Gabriel W, Giurcoiu VG et al. (2023), + *Oktoberfest: Open-source spectral library generation and rescoring pipeline based on Prosit*, + `Proteomics `__. \ No newline at end of file diff --git a/docs/spectrum_io.file.rst b/docs/spectrum_io.file.rst deleted file mode 100644 index 7f977e5..0000000 --- a/docs/spectrum_io.file.rst +++ /dev/null @@ -1,37 +0,0 @@ -spectrum\_io.file package -========================= - -Submodules ----------- - -spectrum\_io.file.csv module ----------------------------- - -.. automodule:: spectrum_io.file.csv - :members: - :undoc-members: - :show-inheritance: - -spectrum\_io.file.hdf5 module ------------------------------ - -.. automodule:: spectrum_io.file.hdf5 - :members: - :undoc-members: - :show-inheritance: - -spectrum\_io.file.parquet module ------------------------------ - -.. automodule:: spectrum_io.file.parquet - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: spectrum_io.file - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/spectrum_io.raw.rst b/docs/spectrum_io.raw.rst deleted file mode 100644 index df46f8d..0000000 --- a/docs/spectrum_io.raw.rst +++ /dev/null @@ -1,29 +0,0 @@ -spectrum\_io.raw package -======================== - -Submodules ----------- - -spectrum\_io.raw.msraw module ------------------------------ - -.. automodule:: spectrum_io.raw.msraw - :members: - :undoc-members: - :show-inheritance: - -spectrum\_io.raw.thermo\_raw module ------------------------------------ - -.. automodule:: spectrum_io.raw.thermo_raw - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: spectrum_io.raw - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/spectrum_io.rst b/docs/spectrum_io.rst deleted file mode 100644 index 78cdd8e..0000000 --- a/docs/spectrum_io.rst +++ /dev/null @@ -1,21 +0,0 @@ -spectrum\_io package -==================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - spectrum_io.file - spectrum_io.raw - spectrum_io.search_result - spectrum_io.spectral_library - -Module contents ---------------- - -.. automodule:: spectrum_io - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/spectrum_io.search_result.rst b/docs/spectrum_io.search_result.rst deleted file mode 100644 index d7edde5..0000000 --- a/docs/spectrum_io.search_result.rst +++ /dev/null @@ -1,45 +0,0 @@ -spectrum\_io.search\_result package -=================================== - -Submodules ----------- - -spectrum\_io.search\_result.mascot module ------------------------------------------ - -.. automodule:: spectrum_io.search_result.mascot - :members: - :undoc-members: - :show-inheritance: - -spectrum\_io.search\_result.maxquant module -------------------------------------------- - -.. automodule:: spectrum_io.search_result.maxquant - :members: - :undoc-members: - :show-inheritance: - -spectrum\_io.search\_result.msfragger module --------------------------------------------- - -.. automodule:: spectrum_io.search_result.msfragger - :members: - :undoc-members: - :show-inheritance: - -spectrum\_io.search\_result.search\_results module --------------------------------------------------- - -.. automodule:: spectrum_io.search_result.search_results - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: spectrum_io.search_result - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/spectrum_io.spectral_library.rst b/docs/spectrum_io.spectral_library.rst deleted file mode 100644 index 9c1ba73..0000000 --- a/docs/spectrum_io.spectral_library.rst +++ /dev/null @@ -1,53 +0,0 @@ -spectrum\_io.spectral\_library package -====================================== - -Submodules ----------- - -spectrum\_io.spectral\_library.digest module --------------------------------------------- - -.. automodule:: spectrum_io.spectral_library.digest - :members: - :undoc-members: - :show-inheritance: - -spectrum\_io.spectral\_library.dlib module ------------------------------------------- - -.. automodule:: spectrum_io.spectral_library.dlib - :members: - :undoc-members: - :show-inheritance: - -spectrum\_io.spectral\_library.msp module ------------------------------------------ - -.. automodule:: spectrum_io.spectral_library.msp - :members: - :undoc-members: - :show-inheritance: - -spectrum\_io.spectral\_library.spectral\_library module -------------------------------------------------------- - -.. automodule:: spectrum_io.spectral_library.spectral_library - :members: - :undoc-members: - :show-inheritance: - -spectrum\_io.spectral\_library.spectronaut module -------------------------------------------------- - -.. automodule:: spectrum_io.spectral_library.spectronaut - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: spectrum_io.spectral_library - :members: - :undoc-members: - :show-inheritance: diff --git a/spectrum_io/__init__.py b/spectrum_io/__init__.py index 580ae7b..0d10c7f 100644 --- a/spectrum_io/__init__.py +++ b/spectrum_io/__init__.py @@ -1,27 +1,36 @@ -"""Top-level package for spectrum_io.""" +"""SpectrumIO: File / Data Conversion for Mass Spec data within the Oktoberfest ecosystem.""" -__author__ = "Mario Picciani" -__email__ = "mario.picciani@tum.de" +from datetime import datetime + +__author__ = """The Oktoberfest development team (Wilhelmlab at Technical University of Munich)""" +__copyright__ = f"Copyright {datetime.now():%Y}, Wilhelmlab at Technical University of Munich" +__license__ = "MIT" __version__ = "0.6.0" import logging import logging.handlers import sys -import time -from . import d, file, raw -from .search_result import MaxQuant -from .spectral_library import DLib, Spectronaut +from spectrum_io import d, file, raw + +# from .search_result import MaxQuant +# from .spectral_library import DLib, Spectronaut CONSOLE_LOG_LEVEL = logging.INFO logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) + + +class _InfoWarningFilter(logging.Filter): + def filter(self, record): + return CONSOLE_LOG_LEVEL <= record.levelno <= logging.WARNING + + if len(logger.handlers) == 0: formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(name)s::%(funcName)s %(message)s") - converter = time.gmtime # add console handler console_handler = logging.StreamHandler(sys.stdout) - console_handler.setLevel(CONSOLE_LOG_LEVEL) + console_handler.addFilter(_InfoWarningFilter()) console_handler.setFormatter(formatter) logger.addHandler(console_handler) @@ -31,4 +40,4 @@ error_handler.setFormatter(formatter) logger.addHandler(error_handler) else: - logger.info("Logger already initizalized. Resuming normal operation.") + logger.info("Logger already initialized. Resuming normal operation.") From 21d00973e4d993912cdd196e775daa78d19c5d58 Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Fri, 2 Aug 2024 16:41:55 +0200 Subject: [PATCH 26/31] fixed readding sphinx-autodoc-typehints --- poetry.lock | 27 +++++++++++++++++++++++---- requirements.txt | 3 ++- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index eab4f30..1b89866 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2934,6 +2934,25 @@ websockets = ">=11" [package.extras] test = ["pytest (>=6)"] +[[package]] +name = "sphinx-autodoc-typehints" +version = "2.2.3" +description = "Type hints (PEP 484) support for the Sphinx autodoc extension" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinx_autodoc_typehints-2.2.3-py3-none-any.whl", hash = "sha256:b7058e8c5831e5598afca1a78fda0695d3291388d954464a6e480c36198680c0"}, + {file = "sphinx_autodoc_typehints-2.2.3.tar.gz", hash = "sha256:fde3d888949bd0a91207cf1e54afda58121dbb4bf1f183d0cc78a0826654c974"}, +] + +[package.dependencies] +sphinx = ">=7.3.5" + +[package.extras] +docs = ["furo (>=2024.1.29)"] +numpy = ["nptyping (>=2.5)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.4.4)", "defusedxml (>=0.7.1)", "diff-cover (>=9)", "pytest (>=8.1.1)", "pytest-cov (>=5)", "sphobjinv (>=2.3.1)", "typing-extensions (>=4.11)"] + [[package]] name = "sphinx-click" version = "6.0.0" @@ -3277,13 +3296,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "uvicorn" -version = "0.30.4" +version = "0.30.5" description = "The lightning-fast ASGI server." optional = false python-versions = ">=3.8" files = [ - {file = "uvicorn-0.30.4-py3-none-any.whl", hash = "sha256:06b00e3087e58c6865c284143c0c42f810b32ff4f265ab19d08c566f74a08728"}, - {file = "uvicorn-0.30.4.tar.gz", hash = "sha256:00db9a9e3711a5fa59866e2b02fac69d8dc70ce0814aaec9a66d1d9e5c832a30"}, + {file = "uvicorn-0.30.5-py3-none-any.whl", hash = "sha256:b2d86de274726e9878188fa07576c9ceeff90a839e2b6e25c917fe05f5a6c835"}, + {file = "uvicorn-0.30.5.tar.gz", hash = "sha256:ac6fdbd4425c5fd17a9fe39daf4d4d075da6fdc80f653e5894cdc2fd98752bee"}, ] [package.dependencies] @@ -3527,4 +3546,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = ">=3.9.0,<3.11.0" -content-hash = "a391183aa787d06044eae7f0bf978769962bf399f8494c97f670544a6311ec4b" +content-hash = "28738b95878d8f42b60d963db580c793dc50c96501c1766259e25af690a7b3f8" diff --git a/requirements.txt b/requirements.txt index ce2f90d..82cd279 100644 --- a/requirements.txt +++ b/requirements.txt @@ -100,6 +100,7 @@ snowballstemmer==2.2.0 ; python_version >= "3.9" and python_full_version < "3.11 sortedcontainers==2.4.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" spectrum-fundamentals==0.7.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" sphinx-autobuild==2024.4.16 ; python_version >= "3.9" and python_full_version < "3.11.0" +sphinx-autodoc-typehints==2.2.3 ; python_version >= "3.9" and python_full_version < "3.11.0" sphinx-click==6.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" sphinx-rtd-dark-mode==1.3.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" sphinx-rtd-theme==2.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" @@ -124,7 +125,7 @@ types-pkg-resources==0.1.3 ; python_full_version >= "3.9.0" and python_full_vers types-requests==2.32.0.20240712 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" typing-extensions==4.12.2 ; python_version >= "3.9" and python_version < "3.11" urllib3==2.2.2 ; python_version >= "3.9" and python_full_version < "3.11.0" -uvicorn==0.30.4 ; python_version >= "3.9" and python_full_version < "3.11.0" +uvicorn==0.30.5 ; python_version >= "3.9" and python_full_version < "3.11.0" virtualenv==20.26.3 ; python_version >= "3.9" and python_full_version < "3.11.0" watchfiles==0.22.0 ; python_version >= "3.9" and python_full_version < "3.11.0" websockets==12.0 ; python_version >= "3.9" and python_full_version < "3.11.0" From b7c318cd6f80ae717c8dc610e7d1b4913a3485cc Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Mon, 5 Aug 2024 16:56:48 +0200 Subject: [PATCH 27/31] added support for speclib with custom mods --- pyproject.toml | 2 +- spectrum_io/spectral_library/dlib.py | 21 ++++-- spectrum_io/spectral_library/msp.py | 21 ++++-- .../spectral_library/spectral_library.py | 68 ++++++++++++++++--- spectrum_io/spectral_library/spectronaut.py | 18 ++++- tests/unit_tests/test_spectral_library.py | 9 +-- 6 files changed, 115 insertions(+), 24 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b6bab8b..4e5d056 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ pyarrow = ">=16.0.0" pymzml = "^2.5.0" pyteomics = "^4.3.3" lxml= '>=4.5.2,<6.0.0' -spectrum-fundamentals = ">=0.7.0,<0.8.0" +spectrum-fundamentals = ">=0.7.1,<0.8.0" alphatims = "^1.0.8" sortedcontainers = "^2.4.0" diff --git a/spectrum_io/spectral_library/dlib.py b/spectrum_io/spectral_library/dlib.py index 205bda8..c4fbb60 100644 --- a/spectrum_io/spectral_library/dlib.py +++ b/spectrum_io/spectral_library/dlib.py @@ -26,6 +26,18 @@ class DLib(SpectralLibrary): """Main to init a DLib obj.""" + @property + def standard_mods(self): + """Standard modifications that are always applied if not otherwise specified.""" + return { + "M[+15.994915]": 35, + "C[+57.021464]": 4, + "^[+304.207146]": 2016, + "K[+304.207146]": 2016, + "^[+229.162932]": 737, + "K[+229.162932]": 737, + } + def _initialize(self, out: Union[IO, sqlite3.Connection]): if isinstance(out, IO): raise TypeError("Not supported. Use msp/spectronaut if you want to write a text file.") @@ -130,13 +142,14 @@ def _write( out: Union[IO, sqlite3.Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + mods: Dict[str, str], ): if isinstance(out, IO): raise TypeError("Not supported. Use msp/spectronaut if you want to write a text file.") seqs = metadata["SEQUENCE"] - modseqs = metadata["MODIFIED_SEQUENCE"] - mass_mod_sequences = internal_to_mod_mass(modseqs, custom_mods) + modseqs = metadata["MODIFIED_SEQUENCE"].replace(mods, regex=True) + # mass_mod_sequences = internal_to_mod_mass(modseqs)#, custom_mods) + # print(mass_mod_sequences, "masmodseq") p_charges = metadata["PRECURSOR_CHARGE"] p_mzs = (metadata["MASS"] + (p_charges * PARTICLE_MASSES["PROTON"])) / p_charges @@ -152,7 +165,7 @@ def _write( masked_values = self._calculate_masked_values(f_mzss, f_intss) - data_list = [*masked_values, p_charges, mass_mod_sequences, seqs, irts, p_mzs] + data_list = [*masked_values, p_charges, modseqs, seqs, irts, p_mzs] entries = pd.DataFrame(dict(zip(DLIB_COL_NAMES, data_list))) p2p = pd.DataFrame({"PeptideSeq": seqs, "ProteinAccession": pr_ids}) diff --git a/spectrum_io/spectral_library/msp.py b/spectrum_io/spectral_library/msp.py index a83fa7c..0a0c8b8 100644 --- a/spectrum_io/spectral_library/msp.py +++ b/spectrum_io/spectral_library/msp.py @@ -4,7 +4,7 @@ import numpy as np import pandas as pd from spectrum_fundamentals.constants import PARTICLE_MASSES -from spectrum_fundamentals.mod_string import internal_to_mod_names, internal_without_mods +from spectrum_fundamentals.mod_string import internal_to_msp, internal_without_mods from .spectral_library import SpectralLibrary @@ -12,6 +12,18 @@ class MSP(SpectralLibrary): """Main to initialze a MSP obj.""" + @property + def standard_mods(self): + """Standard modifications that are always applied if not otherwise specified.""" + return { + "C,Carbamidomethyl": 4, + "M,Oxidation": 35, + "^,TMT_6": 737, + "K,TMT_6": 737, + "^,TMT_Pro": 2016, + "K,TMT_Pro": 2016, + } + @staticmethod def _assemble_fragment_string(f_mz: float, f_int: float, f_a: bytes): annot = f_a[:-2].decode() if f_a.endswith(b"1") else f_a.replace(b"+", b"^").decode() @@ -22,13 +34,14 @@ def _write( out: Union[IO, Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + mods: Dict[str, str], ): # prepare metadata if isinstance(out, Connection): raise TypeError("Not supported. Use DLib if you want to write a database file.") stripped_peptides = metadata["SEQUENCE"] - modss = internal_to_mod_names(metadata["MODIFIED_SEQUENCE"]) + modss = internal_to_msp(metadata["MODIFIED_SEQUENCE"], mods) + print(modss) p_charges = metadata["PRECURSOR_CHARGE"] p_mzs = (metadata["MASS"] + (p_charges * PARTICLE_MASSES["PROTON"])) / p_charges ces = metadata["COLLISION_ENERGY"] @@ -49,7 +62,7 @@ def _write( lines.append(f"Name: {stripped_peptide}/{p_charge}\nMW: {p_mz}\n") lines.append( f"Comment: Parent={p_mz:.8f} Collision_energy={ce} Protein_ids={pr_id} Mods={mods[0]} " - f"ModString={mods[1]}/{p_charge} iRT={irt:.2f}\n" + f"ModString={stripped_peptide}//{mods[1]}/{p_charge} iRT={irt:.2f}\n" ) cond = self._fragment_filter_passed(f_mzs, f_ints) diff --git a/spectrum_io/spectral_library/spectral_library.py b/spectrum_io/spectral_library/spectral_library.py index 0ccce6b..b7aed7c 100644 --- a/spectrum_io/spectral_library/spectral_library.py +++ b/spectrum_io/spectral_library/spectral_library.py @@ -1,3 +1,4 @@ +import re from abc import abstractmethod from multiprocessing import Queue from multiprocessing.managers import ValueProxy @@ -9,6 +10,52 @@ import pandas as pd +def parse_mods(mods: Dict[str, int]) -> Dict[str, str]: + """ + Parse provided mapping of custom modification pattern to ProForma standard. + + This function takes a dictionary mapping custom modification pattern for specific aminoacids (keys) to a + UNIMOD ID (values). The pattern is translated to ProForma standard and a new dictionary mapping the custom + modification patterns to the ProForma standard is returned. + The pattern for the custom modifications must start with the one-letter code for an aminoacid or '^' / '$', + to describe n- / c-terminal modifications, respectively, followed by an optional pattern (which can be + empty). + This means that 'X' or 'X(custom_pattern)', is both mapped to 'X[UNIMOD:#]'. + For the n-terminus, an additional dash will be added automatically, which maps 'X(custom_pattern)' to + 'X[UNIMOD:#]-'. If the sequence to apply the transformation on already contains the dash, it needs to be part + of the custom_pattern (i.e. 'X(custom_pattern)-'), to avoid adding an additional dash. + + :param mods: Dictionary mapping custom modification patterns (keys) to UNIMOD IDs (values) + :raises TypeError: if keys are not strings or values are not integers + :raises ValueError: if the keys do not start with [A-Z,a-z,^,$] + :return: A dictionary mapping custom modification patterns (keys) to the ProForma standard (values) + """ + key_pattern = ( + "'X' or 'X' where X is either the one-letter code of an aminoacid or '^' / '$' defining the" + " n- or c-terminus, respectively, followed by an optional pattern identifying a specific modification." + ) + unimod_regex_map = {} + for k, v in mods.items(): + if not isinstance(v, int): + raise TypeError(f"UNIMOD id {v} for replacement {k} not understood. UNIMOD IDs must be integers.") + if not isinstance(k, str): + raise TypeError( + f"Replacement {k} not understood. Replacements must be strings and follow " f"the pattern {key_pattern}" + ) + if k[0].isalpha(): + unimod_regex_map[re.escape(f"{k[0]}[UNIMOD:{v}]")] = k + continue + if k[0] == "^": + to_escape = re.escape(f"[UNIMOD:{v}]-") + unimod_regex_map[f"^{to_escape}"] = k[1:] + continue + raise ValueError( + f"Replacement {k} not understood. {k[0]} is not a valid aminoacid. " + f"Replacements most follow the pattern {key_pattern}" + ) + return unimod_regex_map + + class SpectralLibrary: """Main to initialze a SpectralLibrary obj.""" @@ -38,23 +85,23 @@ def __init__( def load(self): """Load predictions from hdf5 file.""" - def write(self, *args, **kwargs): + def write(self, *, custom_mods: Optional[Dict[str, str]] = None, **kwargs): """ Write content to the output file. - :param args: Positional arguments to be passed to the internal _write method. + :param custom_mods: optional dictionary mapping libary format-specific modification patterns (keys) + to UNIMOD IDs (values) :param kwargs: Keyword arguments to be passed to the internal _write method. """ + parsed_mods = parse_mods(self.standard_mods | (custom_mods or {})) with self._get_handle() as out: self._initialize(out) - self._write(out, *args, **kwargs) + self._write(out, mods=parsed_mods, **kwargs) def _get_handle(self): return open(self.out_path, self.mode) - def async_write( - self, queue: Queue, progress: ValueProxy, custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None - ): + def async_write(self, queue: Queue, progress: ValueProxy, custom_mods: Optional[Dict[str, str]] = None): """ Asynchronously write content to the output file from a queue. @@ -62,6 +109,8 @@ def async_write( :param progress: An integer value representing the progress of the writing process. :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass """ + parsed_mods = parse_mods(self.standard_mods | (custom_mods or {})) + with self._get_handle() as out: self._initialize(out) while True: @@ -69,7 +118,7 @@ def async_write( if content is None: break data, metadata = content - self._write(out, data=data, metadata=metadata, custom_mods=custom_mods) + self._write(out, data=data, metadata=metadata, mods=parsed_mods) progress.value += 1 def _fragment_filter_passed( @@ -95,7 +144,7 @@ def _write( out: Union[IO, Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + mods: Dict[str, str], ): """ Internal writer function. @@ -107,7 +156,8 @@ def _write( :param out: file handle accepting the data to be written to disk :param data: Dictionary containing TODO keys and corresponding values as numpy array :param metadata: a dataframe that contains the columns TODO - :param custom_mods: dict with custom variable and static identifier and respecitve internal equivalent and mass + :param mods: optional dictionary mapping libary format-specific modification patterns (keys) + to UNIMOD IDs (values) """ pass diff --git a/spectrum_io/spectral_library/spectronaut.py b/spectrum_io/spectral_library/spectronaut.py index 59ca248..b635665 100644 --- a/spectrum_io/spectral_library/spectronaut.py +++ b/spectrum_io/spectral_library/spectronaut.py @@ -17,6 +17,18 @@ class Spectronaut(SpectralLibrary): # Check spectronaut folder for output format. + @property + def standard_mods(self): + """Standard modifications that are always applied if not otherwise specified.""" + return { + "C[Carbamidomethyl (C)]": 4, + "M[Oxidation (O)]": 35, + "^[TMT_6]": 737, + "K[TMT_6]": 737, + "^[TMT_Pro]": 2016, + "K[TMT_Pro]": 2016, + } + @staticmethod def _assemble_fragment_string(f_int: float, f_mz: float, f_annot: bytes): m = re.match(r"([by])(\d+)\+(\d)(?:-(\w+))?", f_annot.decode()) @@ -31,13 +43,15 @@ def _write( out: Union[IO, Connection], data: Dict[str, np.ndarray], metadata: pd.DataFrame, - custom_mods: Optional[Dict[str, Dict[str, Tuple[str, float]]]] = None, + mods: Dict[str, str], ): # prepare metadata if isinstance(out, Connection): raise TypeError("Not supported. Use DLib if you want to write a database file.") seqs = metadata["SEQUENCE"] - modseqs = internal_to_spectronaut(metadata["MODIFIED_SEQUENCE"].apply(lambda x: "_" + x + "_")) + + modseqs = metadata["MODIFIED_SEQUENCE"].replace(mods, regex=True).apply(lambda x: "_" + x + "_") + # modseqs = internal_to_spectronaut(metadata["MODIFIED_SEQUENCE"].apply(lambda x: "_" + x + "_")) p_charges = metadata["PRECURSOR_CHARGE"] p_mzs = (metadata["MASS"] + (p_charges * PARTICLE_MASSES["PROTON"])) / p_charges ces = metadata["COLLISION_ENERGY"] diff --git a/tests/unit_tests/test_spectral_library.py b/tests/unit_tests/test_spectral_library.py index 925da42..1dbd9e2 100644 --- a/tests/unit_tests/test_spectral_library.py +++ b/tests/unit_tests/test_spectral_library.py @@ -15,7 +15,7 @@ def test_write(self, data, metadata): """Test write to file.""" out_file = Path(__file__).parent / "test.msp" msp_lib = MSP(out_file) - msp_lib.write(data, metadata) + msp_lib.write(data=data, metadata=metadata) with open(out_file) as test_file: file_content = test_file.read() @@ -37,6 +37,7 @@ def test_write(self, data, metadata): '0.40000000 0.6000 "y2^2/0.0ppm"\n' '0.30000000 0.0010 "b2^2/0.0ppm"\n' ) + print(file_content) assert file_content == anticipated_content out_file.unlink() @@ -48,8 +49,8 @@ class TestSpectronaut: def test_write(self, data, metadata): """Test write to file.""" out_file = Path(__file__).parent / "test.csv" - msp_lib = Spectronaut(out_file) - msp_lib.write(data, metadata) + spectronaut_lib = Spectronaut(out_file) + spectronaut_lib.write(data=data, metadata=metadata) with open(out_file) as test_file: file_content = test_file.read() @@ -77,7 +78,7 @@ def test_write(self, data, metadata): """Test write to dlib library file.""" out_file = Path(__file__).parent / "test.dlib" dlib = DLib(out_file) - dlib.write(data, metadata) + dlib.write(data=data, metadata=metadata) con = sqlite3.connect(out_file) df_entries = pd.read_sql_query("SELECT * from entries", con) df_p2p = pd.read_sql_query("SELECT * from peptidetoprotein", con) From e2958fa389d1deb8fcc9c8d2acb30074327b8791 Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Mon, 5 Aug 2024 17:41:20 +0200 Subject: [PATCH 28/31] updated deps --- poetry.lock | 464 +++++++++++++++++++++++++++------------------------- 1 file changed, 242 insertions(+), 222 deletions(-) diff --git a/poetry.lock b/poetry.lock index 1b89866..a19cc34 100644 --- a/poetry.lock +++ b/poetry.lock @@ -75,22 +75,22 @@ trio = ["trio (>=0.23)"] [[package]] name = "attrs" -version = "23.2.0" +version = "24.1.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.7" files = [ - {file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"}, - {file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"}, + {file = "attrs-24.1.0-py3-none-any.whl", hash = "sha256:377b47448cb61fea38533f671fba0d0f8a96fd58facd4dc518e3dac9dbea0905"}, + {file = "attrs-24.1.0.tar.gz", hash = "sha256:adbdec84af72d38be7628e353a09b6a6790d15cd71819f6e9d7b0faa8a125745"}, ] [package.extras] -cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] -dev = ["attrs[tests]", "pre-commit"] -docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] -tests = ["attrs[tests-no-zope]", "zope-interface"] -tests-mypy = ["mypy (>=1.6)", "pytest-mypy-plugins"] -tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"] +benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] +tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] [[package]] name = "authlib" @@ -146,33 +146,33 @@ yaml = ["PyYAML"] [[package]] name = "black" -version = "24.4.2" +version = "24.8.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.8" files = [ - {file = "black-24.4.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dd1b5a14e417189db4c7b64a6540f31730713d173f0b63e55fabd52d61d8fdce"}, - {file = "black-24.4.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e537d281831ad0e71007dcdcbe50a71470b978c453fa41ce77186bbe0ed6021"}, - {file = "black-24.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eaea3008c281f1038edb473c1aa8ed8143a5535ff18f978a318f10302b254063"}, - {file = "black-24.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:7768a0dbf16a39aa5e9a3ded568bb545c8c2727396d063bbaf847df05b08cd96"}, - {file = "black-24.4.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:257d724c2c9b1660f353b36c802ccece186a30accc7742c176d29c146df6e474"}, - {file = "black-24.4.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bdde6f877a18f24844e381d45e9947a49e97933573ac9d4345399be37621e26c"}, - {file = "black-24.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e151054aa00bad1f4e1f04919542885f89f5f7d086b8a59e5000e6c616896ffb"}, - {file = "black-24.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:7e122b1c4fb252fd85df3ca93578732b4749d9be076593076ef4d07a0233c3e1"}, - {file = "black-24.4.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:accf49e151c8ed2c0cdc528691838afd217c50412534e876a19270fea1e28e2d"}, - {file = "black-24.4.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:88c57dc656038f1ab9f92b3eb5335ee9b021412feaa46330d5eba4e51fe49b04"}, - {file = "black-24.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be8bef99eb46d5021bf053114442914baeb3649a89dc5f3a555c88737e5e98fc"}, - {file = "black-24.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:415e686e87dbbe6f4cd5ef0fbf764af7b89f9057b97c908742b6008cc554b9c0"}, - {file = "black-24.4.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bf10f7310db693bb62692609b397e8d67257c55f949abde4c67f9cc574492cc7"}, - {file = "black-24.4.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:98e123f1d5cfd42f886624d84464f7756f60ff6eab89ae845210631714f6db94"}, - {file = "black-24.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48a85f2cb5e6799a9ef05347b476cce6c182d6c71ee36925a6c194d074336ef8"}, - {file = "black-24.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:b1530ae42e9d6d5b670a34db49a94115a64596bc77710b1d05e9801e62ca0a7c"}, - {file = "black-24.4.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:37aae07b029fa0174d39daf02748b379399b909652a806e5708199bd93899da1"}, - {file = "black-24.4.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:da33a1a5e49c4122ccdfd56cd021ff1ebc4a1ec4e2d01594fef9b6f267a9e741"}, - {file = "black-24.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef703f83fc32e131e9bcc0a5094cfe85599e7109f896fe8bc96cc402f3eb4b6e"}, - {file = "black-24.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:b9176b9832e84308818a99a561e90aa479e73c523b3f77afd07913380ae2eab7"}, - {file = "black-24.4.2-py3-none-any.whl", hash = "sha256:d36ed1124bb81b32f8614555b34cc4259c3fbc7eec17870e8ff8ded335b58d8c"}, - {file = "black-24.4.2.tar.gz", hash = "sha256:c872b53057f000085da66a19c55d68f6f8ddcac2642392ad3a355878406fbd4d"}, + {file = "black-24.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:09cdeb74d494ec023ded657f7092ba518e8cf78fa8386155e4a03fdcc44679e6"}, + {file = "black-24.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:81c6742da39f33b08e791da38410f32e27d632260e599df7245cccee2064afeb"}, + {file = "black-24.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:707a1ca89221bc8a1a64fb5e15ef39cd755633daa672a9db7498d1c19de66a42"}, + {file = "black-24.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:d6417535d99c37cee4091a2f24eb2b6d5ec42b144d50f1f2e436d9fe1916fe1a"}, + {file = "black-24.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fb6e2c0b86bbd43dee042e48059c9ad7830abd5c94b0bc518c0eeec57c3eddc1"}, + {file = "black-24.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:837fd281f1908d0076844bc2b801ad2d369c78c45cf800cad7b61686051041af"}, + {file = "black-24.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62e8730977f0b77998029da7971fa896ceefa2c4c4933fcd593fa599ecbf97a4"}, + {file = "black-24.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:72901b4913cbac8972ad911dc4098d5753704d1f3c56e44ae8dce99eecb0e3af"}, + {file = "black-24.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:7c046c1d1eeb7aea9335da62472481d3bbf3fd986e093cffd35f4385c94ae368"}, + {file = "black-24.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:649f6d84ccbae73ab767e206772cc2d7a393a001070a4c814a546afd0d423aed"}, + {file = "black-24.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b59b250fdba5f9a9cd9d0ece6e6d993d91ce877d121d161e4698af3eb9c1018"}, + {file = "black-24.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:6e55d30d44bed36593c3163b9bc63bf58b3b30e4611e4d88a0c3c239930ed5b2"}, + {file = "black-24.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:505289f17ceda596658ae81b61ebbe2d9b25aa78067035184ed0a9d855d18afd"}, + {file = "black-24.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b19c9ad992c7883ad84c9b22aaa73562a16b819c1d8db7a1a1a49fb7ec13c7d2"}, + {file = "black-24.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1f13f7f386f86f8121d76599114bb8c17b69d962137fc70efe56137727c7047e"}, + {file = "black-24.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:f490dbd59680d809ca31efdae20e634f3fae27fba3ce0ba3208333b713bc3920"}, + {file = "black-24.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eab4dd44ce80dea27dc69db40dab62d4ca96112f87996bca68cd75639aeb2e4c"}, + {file = "black-24.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3c4285573d4897a7610054af5a890bde7c65cb466040c5f0c8b732812d7f0e5e"}, + {file = "black-24.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e84e33b37be070ba135176c123ae52a51f82306def9f7d063ee302ecab2cf47"}, + {file = "black-24.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:73bbf84ed136e45d451a260c6b73ed674652f90a2b3211d6a35e78054563a9bb"}, + {file = "black-24.8.0-py3-none-any.whl", hash = "sha256:972085c618ee94f402da1af548a4f218c754ea7e5dc70acb168bfaca4c2542ed"}, + {file = "black-24.8.0.tar.gz", hash = "sha256:2500945420b6784c38b9ee885af039f5e7471ef284ab03fa35ecdde4688cd83f"}, ] [package.dependencies] @@ -465,63 +465,83 @@ test-no-images = ["pytest", "pytest-cov", "pytest-xdist", "wurlitzer"] [[package]] name = "coverage" -version = "7.6.0" +version = "7.6.1" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.8" files = [ - {file = "coverage-7.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dff044f661f59dace805eedb4a7404c573b6ff0cdba4a524141bc63d7be5c7fd"}, - {file = "coverage-7.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a8659fd33ee9e6ca03950cfdcdf271d645cf681609153f218826dd9805ab585c"}, - {file = "coverage-7.6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7792f0ab20df8071d669d929c75c97fecfa6bcab82c10ee4adb91c7a54055463"}, - {file = "coverage-7.6.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d4b3cd1ca7cd73d229487fa5caca9e4bc1f0bca96526b922d61053ea751fe791"}, - {file = "coverage-7.6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e7e128f85c0b419907d1f38e616c4f1e9f1d1b37a7949f44df9a73d5da5cd53c"}, - {file = "coverage-7.6.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a94925102c89247530ae1dab7dc02c690942566f22e189cbd53579b0693c0783"}, - {file = "coverage-7.6.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:dcd070b5b585b50e6617e8972f3fbbee786afca71b1936ac06257f7e178f00f6"}, - {file = "coverage-7.6.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:d50a252b23b9b4dfeefc1f663c568a221092cbaded20a05a11665d0dbec9b8fb"}, - {file = "coverage-7.6.0-cp310-cp310-win32.whl", hash = "sha256:0e7b27d04131c46e6894f23a4ae186a6a2207209a05df5b6ad4caee6d54a222c"}, - {file = "coverage-7.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:54dece71673b3187c86226c3ca793c5f891f9fc3d8aa183f2e3653da18566169"}, - {file = "coverage-7.6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c7b525ab52ce18c57ae232ba6f7010297a87ced82a2383b1afd238849c1ff933"}, - {file = "coverage-7.6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bea27c4269234e06f621f3fac3925f56ff34bc14521484b8f66a580aacc2e7d"}, - {file = "coverage-7.6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed8d1d1821ba5fc88d4a4f45387b65de52382fa3ef1f0115a4f7a20cdfab0e94"}, - {file = "coverage-7.6.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01c322ef2bbe15057bc4bf132b525b7e3f7206f071799eb8aa6ad1940bcf5fb1"}, - {file = "coverage-7.6.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03cafe82c1b32b770a29fd6de923625ccac3185a54a5e66606da26d105f37dac"}, - {file = "coverage-7.6.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0d1b923fc4a40c5832be4f35a5dab0e5ff89cddf83bb4174499e02ea089daf57"}, - {file = "coverage-7.6.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4b03741e70fb811d1a9a1d75355cf391f274ed85847f4b78e35459899f57af4d"}, - {file = "coverage-7.6.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a73d18625f6a8a1cbb11eadc1d03929f9510f4131879288e3f7922097a429f63"}, - {file = "coverage-7.6.0-cp311-cp311-win32.whl", hash = "sha256:65fa405b837060db569a61ec368b74688f429b32fa47a8929a7a2f9b47183713"}, - {file = "coverage-7.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:6379688fb4cfa921ae349c76eb1a9ab26b65f32b03d46bb0eed841fd4cb6afb1"}, - {file = "coverage-7.6.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f7db0b6ae1f96ae41afe626095149ecd1b212b424626175a6633c2999eaad45b"}, - {file = "coverage-7.6.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bbdf9a72403110a3bdae77948b8011f644571311c2fb35ee15f0f10a8fc082e8"}, - {file = "coverage-7.6.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cc44bf0315268e253bf563f3560e6c004efe38f76db03a1558274a6e04bf5d5"}, - {file = "coverage-7.6.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:da8549d17489cd52f85a9829d0e1d91059359b3c54a26f28bec2c5d369524807"}, - {file = "coverage-7.6.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0086cd4fc71b7d485ac93ca4239c8f75732c2ae3ba83f6be1c9be59d9e2c6382"}, - {file = "coverage-7.6.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1fad32ee9b27350687035cb5fdf9145bc9cf0a094a9577d43e909948ebcfa27b"}, - {file = "coverage-7.6.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:044a0985a4f25b335882b0966625270a8d9db3d3409ddc49a4eb00b0ef5e8cee"}, - {file = "coverage-7.6.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:76d5f82213aa78098b9b964ea89de4617e70e0d43e97900c2778a50856dac605"}, - {file = "coverage-7.6.0-cp312-cp312-win32.whl", hash = "sha256:3c59105f8d58ce500f348c5b56163a4113a440dad6daa2294b5052a10db866da"}, - {file = "coverage-7.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:ca5d79cfdae420a1d52bf177de4bc2289c321d6c961ae321503b2ca59c17ae67"}, - {file = "coverage-7.6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d39bd10f0ae453554798b125d2f39884290c480f56e8a02ba7a6ed552005243b"}, - {file = "coverage-7.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:beb08e8508e53a568811016e59f3234d29c2583f6b6e28572f0954a6b4f7e03d"}, - {file = "coverage-7.6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2e16f4cd2bc4d88ba30ca2d3bbf2f21f00f382cf4e1ce3b1ddc96c634bc48ca"}, - {file = "coverage-7.6.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6616d1c9bf1e3faea78711ee42a8b972367d82ceae233ec0ac61cc7fec09fa6b"}, - {file = "coverage-7.6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad4567d6c334c46046d1c4c20024de2a1c3abc626817ae21ae3da600f5779b44"}, - {file = "coverage-7.6.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:d17c6a415d68cfe1091d3296ba5749d3d8696e42c37fca5d4860c5bf7b729f03"}, - {file = "coverage-7.6.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:9146579352d7b5f6412735d0f203bbd8d00113a680b66565e205bc605ef81bc6"}, - {file = "coverage-7.6.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:cdab02a0a941af190df8782aafc591ef3ad08824f97850b015c8c6a8b3877b0b"}, - {file = "coverage-7.6.0-cp38-cp38-win32.whl", hash = "sha256:df423f351b162a702c053d5dddc0fc0ef9a9e27ea3f449781ace5f906b664428"}, - {file = "coverage-7.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:f2501d60d7497fd55e391f423f965bbe9e650e9ffc3c627d5f0ac516026000b8"}, - {file = "coverage-7.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7221f9ac9dad9492cecab6f676b3eaf9185141539d5c9689d13fd6b0d7de840c"}, - {file = "coverage-7.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ddaaa91bfc4477d2871442bbf30a125e8fe6b05da8a0015507bfbf4718228ab2"}, - {file = "coverage-7.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4cbe651f3904e28f3a55d6f371203049034b4ddbce65a54527a3f189ca3b390"}, - {file = "coverage-7.6.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:831b476d79408ab6ccfadaaf199906c833f02fdb32c9ab907b1d4aa0713cfa3b"}, - {file = "coverage-7.6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46c3d091059ad0b9c59d1034de74a7f36dcfa7f6d3bde782c49deb42438f2450"}, - {file = "coverage-7.6.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4d5fae0a22dc86259dee66f2cc6c1d3e490c4a1214d7daa2a93d07491c5c04b6"}, - {file = "coverage-7.6.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:07ed352205574aad067482e53dd606926afebcb5590653121063fbf4e2175166"}, - {file = "coverage-7.6.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:49c76cdfa13015c4560702574bad67f0e15ca5a2872c6a125f6327ead2b731dd"}, - {file = "coverage-7.6.0-cp39-cp39-win32.whl", hash = "sha256:482855914928c8175735a2a59c8dc5806cf7d8f032e4820d52e845d1f731dca2"}, - {file = "coverage-7.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:543ef9179bc55edfd895154a51792b01c017c87af0ebaae092720152e19e42ca"}, - {file = "coverage-7.6.0-pp38.pp39.pp310-none-any.whl", hash = "sha256:6fe885135c8a479d3e37a7aae61cbd3a0fb2deccb4dda3c25f92a49189f766d6"}, - {file = "coverage-7.6.0.tar.gz", hash = "sha256:289cc803fa1dc901f84701ac10c9ee873619320f2f9aff38794db4a4a0268d51"}, + {file = "coverage-7.6.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b06079abebbc0e89e6163b8e8f0e16270124c154dc6e4a47b413dd538859af16"}, + {file = "coverage-7.6.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cf4b19715bccd7ee27b6b120e7e9dd56037b9c0681dcc1adc9ba9db3d417fa36"}, + {file = "coverage-7.6.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61c0abb4c85b095a784ef23fdd4aede7a2628478e7baba7c5e3deba61070a02"}, + {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd21f6ae3f08b41004dfb433fa895d858f3f5979e7762d052b12aef444e29afc"}, + {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f59d57baca39b32db42b83b2a7ba6f47ad9c394ec2076b084c3f029b7afca23"}, + {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a1ac0ae2b8bd743b88ed0502544847c3053d7171a3cff9228af618a068ed9c34"}, + {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e6a08c0be454c3b3beb105c0596ebdc2371fab6bb90c0c0297f4e58fd7e1012c"}, + {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f5796e664fe802da4f57a168c85359a8fbf3eab5e55cd4e4569fbacecc903959"}, + {file = "coverage-7.6.1-cp310-cp310-win32.whl", hash = "sha256:7bb65125fcbef8d989fa1dd0e8a060999497629ca5b0efbca209588a73356232"}, + {file = "coverage-7.6.1-cp310-cp310-win_amd64.whl", hash = "sha256:3115a95daa9bdba70aea750db7b96b37259a81a709223c8448fa97727d546fe0"}, + {file = "coverage-7.6.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7dea0889685db8550f839fa202744652e87c60015029ce3f60e006f8c4462c93"}, + {file = "coverage-7.6.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ed37bd3c3b063412f7620464a9ac1314d33100329f39799255fb8d3027da50d3"}, + {file = "coverage-7.6.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d85f5e9a5f8b73e2350097c3756ef7e785f55bd71205defa0bfdaf96c31616ff"}, + {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bc572be474cafb617672c43fe989d6e48d3c83af02ce8de73fff1c6bb3c198d"}, + {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c0420b573964c760df9e9e86d1a9a622d0d27f417e1a949a8a66dd7bcee7bc6"}, + {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1f4aa8219db826ce6be7099d559f8ec311549bfc4046f7f9fe9b5cea5c581c56"}, + {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:fc5a77d0c516700ebad189b587de289a20a78324bc54baee03dd486f0855d234"}, + {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b48f312cca9621272ae49008c7f613337c53fadca647d6384cc129d2996d1133"}, + {file = "coverage-7.6.1-cp311-cp311-win32.whl", hash = "sha256:1125ca0e5fd475cbbba3bb67ae20bd2c23a98fac4e32412883f9bcbaa81c314c"}, + {file = "coverage-7.6.1-cp311-cp311-win_amd64.whl", hash = "sha256:8ae539519c4c040c5ffd0632784e21b2f03fc1340752af711f33e5be83a9d6c6"}, + {file = "coverage-7.6.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:95cae0efeb032af8458fc27d191f85d1717b1d4e49f7cb226cf526ff28179778"}, + {file = "coverage-7.6.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5621a9175cf9d0b0c84c2ef2b12e9f5f5071357c4d2ea6ca1cf01814f45d2391"}, + {file = "coverage-7.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:260933720fdcd75340e7dbe9060655aff3af1f0c5d20f46b57f262ab6c86a5e8"}, + {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e2ca0ad381b91350c0ed49d52699b625aab2b44b65e1b4e02fa9df0e92ad2d"}, + {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c44fee9975f04b33331cb8eb272827111efc8930cfd582e0320613263ca849ca"}, + {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:877abb17e6339d96bf08e7a622d05095e72b71f8afd8a9fefc82cf30ed944163"}, + {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3e0cadcf6733c09154b461f1ca72d5416635e5e4ec4e536192180d34ec160f8a"}, + {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c3c02d12f837d9683e5ab2f3d9844dc57655b92c74e286c262e0fc54213c216d"}, + {file = "coverage-7.6.1-cp312-cp312-win32.whl", hash = "sha256:e05882b70b87a18d937ca6768ff33cc3f72847cbc4de4491c8e73880766718e5"}, + {file = "coverage-7.6.1-cp312-cp312-win_amd64.whl", hash = "sha256:b5d7b556859dd85f3a541db6a4e0167b86e7273e1cdc973e5b175166bb634fdb"}, + {file = "coverage-7.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a4acd025ecc06185ba2b801f2de85546e0b8ac787cf9d3b06e7e2a69f925b106"}, + {file = "coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9"}, + {file = "coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c"}, + {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e81d7a3e58882450ec4186ca59a3f20a5d4440f25b1cff6f0902ad890e6748a"}, + {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78b260de9790fd81e69401c2dc8b17da47c8038176a79092a89cb2b7d945d060"}, + {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a78d169acd38300060b28d600344a803628c3fd585c912cacc9ea8790fe96862"}, + {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2c09f4ce52cb99dd7505cd0fc8e0e37c77b87f46bc9c1eb03fe3bc9991085388"}, + {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6878ef48d4227aace338d88c48738a4258213cd7b74fd9a3d4d7582bb1d8a155"}, + {file = "coverage-7.6.1-cp313-cp313-win32.whl", hash = "sha256:44df346d5215a8c0e360307d46ffaabe0f5d3502c8a1cefd700b34baf31d411a"}, + {file = "coverage-7.6.1-cp313-cp313-win_amd64.whl", hash = "sha256:8284cf8c0dd272a247bc154eb6c95548722dce90d098c17a883ed36e67cdb129"}, + {file = "coverage-7.6.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d3296782ca4eab572a1a4eca686d8bfb00226300dcefdf43faa25b5242ab8a3e"}, + {file = "coverage-7.6.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:502753043567491d3ff6d08629270127e0c31d4184c4c8d98f92c26f65019962"}, + {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a89ecca80709d4076b95f89f308544ec8f7b4727e8a547913a35f16717856cb"}, + {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a318d68e92e80af8b00fa99609796fdbcdfef3629c77c6283566c6f02c6d6704"}, + {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13b0a73a0896988f053e4fbb7de6d93388e6dd292b0d87ee51d106f2c11b465b"}, + {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4421712dbfc5562150f7554f13dde997a2e932a6b5f352edcce948a815efee6f"}, + {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:166811d20dfea725e2e4baa71fffd6c968a958577848d2131f39b60043400223"}, + {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:225667980479a17db1048cb2bf8bfb39b8e5be8f164b8f6628b64f78a72cf9d3"}, + {file = "coverage-7.6.1-cp313-cp313t-win32.whl", hash = "sha256:170d444ab405852903b7d04ea9ae9b98f98ab6d7e63e1115e82620807519797f"}, + {file = "coverage-7.6.1-cp313-cp313t-win_amd64.whl", hash = "sha256:b9f222de8cded79c49bf184bdbc06630d4c58eec9459b939b4a690c82ed05657"}, + {file = "coverage-7.6.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6db04803b6c7291985a761004e9060b2bca08da6d04f26a7f2294b8623a0c1a0"}, + {file = "coverage-7.6.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f1adfc8ac319e1a348af294106bc6a8458a0f1633cc62a1446aebc30c5fa186a"}, + {file = "coverage-7.6.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a95324a9de9650a729239daea117df21f4b9868ce32e63f8b650ebe6cef5595b"}, + {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b43c03669dc4618ec25270b06ecd3ee4fa94c7f9b3c14bae6571ca00ef98b0d3"}, + {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8929543a7192c13d177b770008bc4e8119f2e1f881d563fc6b6305d2d0ebe9de"}, + {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:a09ece4a69cf399510c8ab25e0950d9cf2b42f7b3cb0374f95d2e2ff594478a6"}, + {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:9054a0754de38d9dbd01a46621636689124d666bad1936d76c0341f7d71bf569"}, + {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0dbde0f4aa9a16fa4d754356a8f2e36296ff4d83994b2c9d8398aa32f222f989"}, + {file = "coverage-7.6.1-cp38-cp38-win32.whl", hash = "sha256:da511e6ad4f7323ee5702e6633085fb76c2f893aaf8ce4c51a0ba4fc07580ea7"}, + {file = "coverage-7.6.1-cp38-cp38-win_amd64.whl", hash = "sha256:3f1156e3e8f2872197af3840d8ad307a9dd18e615dc64d9ee41696f287c57ad8"}, + {file = "coverage-7.6.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:abd5fd0db5f4dc9289408aaf34908072f805ff7792632250dcb36dc591d24255"}, + {file = "coverage-7.6.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:547f45fa1a93154bd82050a7f3cddbc1a7a4dd2a9bf5cb7d06f4ae29fe94eaf8"}, + {file = "coverage-7.6.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:645786266c8f18a931b65bfcefdbf6952dd0dea98feee39bd188607a9d307ed2"}, + {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e0b2df163b8ed01d515807af24f63de04bebcecbd6c3bfeff88385789fdf75a"}, + {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:609b06f178fe8e9f89ef676532760ec0b4deea15e9969bf754b37f7c40326dbc"}, + {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:702855feff378050ae4f741045e19a32d57d19f3e0676d589df0575008ea5004"}, + {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:2bdb062ea438f22d99cba0d7829c2ef0af1d768d1e4a4f528087224c90b132cb"}, + {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9c56863d44bd1c4fe2abb8a4d6f5371d197f1ac0ebdee542f07f35895fc07f36"}, + {file = "coverage-7.6.1-cp39-cp39-win32.whl", hash = "sha256:6e2cd258d7d927d09493c8df1ce9174ad01b381d4729a9d8d4e38670ca24774c"}, + {file = "coverage-7.6.1-cp39-cp39-win_amd64.whl", hash = "sha256:06a737c882bd26d0d6ee7269b20b12f14a8704807a01056c80bb881a4b2ce6ca"}, + {file = "coverage-7.6.1-pp38.pp39.pp310-none-any.whl", hash = "sha256:e9a6e0eb86070e8ccaedfbd9d38fec54864f3125ab95419970575b42af7541df"}, + {file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"}, ] [package.dependencies] @@ -680,13 +700,13 @@ typing = ["typing-extensions (>=4.7.1)"] [[package]] name = "flake8" -version = "7.1.0" +version = "7.1.1" description = "the modular source code checker: pep8 pyflakes and co" optional = false python-versions = ">=3.8.1" files = [ - {file = "flake8-7.1.0-py2.py3-none-any.whl", hash = "sha256:2e416edcc62471a64cea09353f4e7bdba32aeb079b6e360554c659a122b1bc6a"}, - {file = "flake8-7.1.0.tar.gz", hash = "sha256:48a07b626b55236e0fb4784ee69a465fbf59d79eec1f5b4785c3d3bc57d17aa5"}, + {file = "flake8-7.1.1-py2.py3-none-any.whl", hash = "sha256:597477df7860daa5aa0fdd84bf5208a043ab96b8e96ab708770ae0364dd03213"}, + {file = "flake8-7.1.1.tar.gz", hash = "sha256:049d058491e228e03e67b390f311bbf88fce2dbaa8fa673e7aea87b7198b8d38"}, ] [package.dependencies] @@ -1397,40 +1417,40 @@ tests = ["pytest", "pytz", "simplejson"] [[package]] name = "matplotlib" -version = "3.9.1" +version = "3.9.0" description = "Python plotting package" optional = false python-versions = ">=3.9" files = [ - {file = "matplotlib-3.9.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:7ccd6270066feb9a9d8e0705aa027f1ff39f354c72a87efe8fa07632f30fc6bb"}, - {file = "matplotlib-3.9.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:591d3a88903a30a6d23b040c1e44d1afdd0d778758d07110eb7596f811f31842"}, - {file = "matplotlib-3.9.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd2a59ff4b83d33bca3b5ec58203cc65985367812cb8c257f3e101632be86d92"}, - {file = "matplotlib-3.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0fc001516ffcf1a221beb51198b194d9230199d6842c540108e4ce109ac05cc0"}, - {file = "matplotlib-3.9.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:83c6a792f1465d174c86d06f3ae85a8fe36e6f5964633ae8106312ec0921fdf5"}, - {file = "matplotlib-3.9.1-cp310-cp310-win_amd64.whl", hash = "sha256:421851f4f57350bcf0811edd754a708d2275533e84f52f6760b740766c6747a7"}, - {file = "matplotlib-3.9.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:b3fce58971b465e01b5c538f9d44915640c20ec5ff31346e963c9e1cd66fa812"}, - {file = "matplotlib-3.9.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a973c53ad0668c53e0ed76b27d2eeeae8799836fd0d0caaa4ecc66bf4e6676c0"}, - {file = "matplotlib-3.9.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82cd5acf8f3ef43f7532c2f230249720f5dc5dd40ecafaf1c60ac8200d46d7eb"}, - {file = "matplotlib-3.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ab38a4f3772523179b2f772103d8030215b318fef6360cb40558f585bf3d017f"}, - {file = "matplotlib-3.9.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:2315837485ca6188a4b632c5199900e28d33b481eb083663f6a44cfc8987ded3"}, - {file = "matplotlib-3.9.1-cp311-cp311-win_amd64.whl", hash = "sha256:a0c977c5c382f6696caf0bd277ef4f936da7e2aa202ff66cad5f0ac1428ee15b"}, - {file = "matplotlib-3.9.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:565d572efea2b94f264dd86ef27919515aa6d629252a169b42ce5f570db7f37b"}, - {file = "matplotlib-3.9.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6d397fd8ccc64af2ec0af1f0efc3bacd745ebfb9d507f3f552e8adb689ed730a"}, - {file = "matplotlib-3.9.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26040c8f5121cd1ad712abffcd4b5222a8aec3a0fe40bc8542c94331deb8780d"}, - {file = "matplotlib-3.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d12cb1837cffaac087ad6b44399d5e22b78c729de3cdae4629e252067b705e2b"}, - {file = "matplotlib-3.9.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0e835c6988edc3d2d08794f73c323cc62483e13df0194719ecb0723b564e0b5c"}, - {file = "matplotlib-3.9.1-cp312-cp312-win_amd64.whl", hash = "sha256:44a21d922f78ce40435cb35b43dd7d573cf2a30138d5c4b709d19f00e3907fd7"}, - {file = "matplotlib-3.9.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:0c584210c755ae921283d21d01f03a49ef46d1afa184134dd0f95b0202ee6f03"}, - {file = "matplotlib-3.9.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:11fed08f34fa682c2b792942f8902e7aefeed400da71f9e5816bea40a7ce28fe"}, - {file = "matplotlib-3.9.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0000354e32efcfd86bda75729716b92f5c2edd5b947200be9881f0a671565c33"}, - {file = "matplotlib-3.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4db17fea0ae3aceb8e9ac69c7e3051bae0b3d083bfec932240f9bf5d0197a049"}, - {file = "matplotlib-3.9.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:208cbce658b72bf6a8e675058fbbf59f67814057ae78165d8a2f87c45b48d0ff"}, - {file = "matplotlib-3.9.1-cp39-cp39-win_amd64.whl", hash = "sha256:dc23f48ab630474264276be156d0d7710ac6c5a09648ccdf49fef9200d8cbe80"}, - {file = "matplotlib-3.9.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:3fda72d4d472e2ccd1be0e9ccb6bf0d2eaf635e7f8f51d737ed7e465ac020cb3"}, - {file = "matplotlib-3.9.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:84b3ba8429935a444f1fdc80ed930babbe06725bcf09fbeb5c8757a2cd74af04"}, - {file = "matplotlib-3.9.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b918770bf3e07845408716e5bbda17eadfc3fcbd9307dc67f37d6cf834bb3d98"}, - {file = "matplotlib-3.9.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:f1f2e5d29e9435c97ad4c36fb6668e89aee13d48c75893e25cef064675038ac9"}, - {file = "matplotlib-3.9.1.tar.gz", hash = "sha256:de06b19b8db95dd33d0dc17c926c7c9ebed9f572074b6fac4f65068a6814d010"}, + {file = "matplotlib-3.9.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2bcee1dffaf60fe7656183ac2190bd630842ff87b3153afb3e384d966b57fe56"}, + {file = "matplotlib-3.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3f988bafb0fa39d1074ddd5bacd958c853e11def40800c5824556eb630f94d3b"}, + {file = "matplotlib-3.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fe428e191ea016bb278758c8ee82a8129c51d81d8c4bc0846c09e7e8e9057241"}, + {file = "matplotlib-3.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eaf3978060a106fab40c328778b148f590e27f6fa3cd15a19d6892575bce387d"}, + {file = "matplotlib-3.9.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2e7f03e5cbbfacdd48c8ea394d365d91ee8f3cae7e6ec611409927b5ed997ee4"}, + {file = "matplotlib-3.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:13beb4840317d45ffd4183a778685e215939be7b08616f431c7795276e067463"}, + {file = "matplotlib-3.9.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:063af8587fceeac13b0936c42a2b6c732c2ab1c98d38abc3337e430e1ff75e38"}, + {file = "matplotlib-3.9.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9a2fa6d899e17ddca6d6526cf6e7ba677738bf2a6a9590d702c277204a7c6152"}, + {file = "matplotlib-3.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:550cdda3adbd596078cca7d13ed50b77879104e2e46392dcd7c75259d8f00e85"}, + {file = "matplotlib-3.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76cce0f31b351e3551d1f3779420cf8f6ec0d4a8cf9c0237a3b549fd28eb4abb"}, + {file = "matplotlib-3.9.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c53aeb514ccbbcbab55a27f912d79ea30ab21ee0531ee2c09f13800efb272674"}, + {file = "matplotlib-3.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:a5be985db2596d761cdf0c2eaf52396f26e6a64ab46bd8cd810c48972349d1be"}, + {file = "matplotlib-3.9.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:c79f3a585f1368da6049318bdf1f85568d8d04b2e89fc24b7e02cc9b62017382"}, + {file = "matplotlib-3.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bdd1ecbe268eb3e7653e04f451635f0fb0f77f07fd070242b44c076c9106da84"}, + {file = "matplotlib-3.9.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d38e85a1a6d732f645f1403ce5e6727fd9418cd4574521d5803d3d94911038e5"}, + {file = "matplotlib-3.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0a490715b3b9984fa609116481b22178348c1a220a4499cda79132000a79b4db"}, + {file = "matplotlib-3.9.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8146ce83cbc5dc71c223a74a1996d446cd35cfb6a04b683e1446b7e6c73603b7"}, + {file = "matplotlib-3.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:d91a4ffc587bacf5c4ce4ecfe4bcd23a4b675e76315f2866e588686cc97fccdf"}, + {file = "matplotlib-3.9.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:616fabf4981a3b3c5a15cd95eba359c8489c4e20e03717aea42866d8d0465956"}, + {file = "matplotlib-3.9.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:cd53c79fd02f1c1808d2cfc87dd3cf4dbc63c5244a58ee7944497107469c8d8a"}, + {file = "matplotlib-3.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06a478f0d67636554fa78558cfbcd7b9dba85b51f5c3b5a0c9be49010cf5f321"}, + {file = "matplotlib-3.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81c40af649d19c85f8073e25e5806926986806fa6d54be506fbf02aef47d5a89"}, + {file = "matplotlib-3.9.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:52146fc3bd7813cc784562cb93a15788be0b2875c4655e2cc6ea646bfa30344b"}, + {file = "matplotlib-3.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:0fc51eaa5262553868461c083d9adadb11a6017315f3a757fc45ec6ec5f02888"}, + {file = "matplotlib-3.9.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:bd4f2831168afac55b881db82a7730992aa41c4f007f1913465fb182d6fb20c0"}, + {file = "matplotlib-3.9.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:290d304e59be2b33ef5c2d768d0237f5bd132986bdcc66f80bc9bcc300066a03"}, + {file = "matplotlib-3.9.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ff2e239c26be4f24bfa45860c20ffccd118d270c5b5d081fa4ea409b5469fcd"}, + {file = "matplotlib-3.9.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:af4001b7cae70f7eaacfb063db605280058246de590fa7874f00f62259f2df7e"}, + {file = "matplotlib-3.9.0.tar.gz", hash = "sha256:e6d29ea6c19e34b30fb7d88b7081f869a03014f66fe06d62cc77d5a6ea88ed7a"}, ] [package.dependencies] @@ -1970,13 +1990,13 @@ test = ["cffi", "hypothesis", "pandas", "pytest", "pytz"] [[package]] name = "pycodestyle" -version = "2.12.0" +version = "2.12.1" description = "Python style guide checker" optional = false python-versions = ">=3.8" files = [ - {file = "pycodestyle-2.12.0-py2.py3-none-any.whl", hash = "sha256:949a39f6b86c3e1515ba1787c2022131d165a8ad271b11370a8819aa070269e4"}, - {file = "pycodestyle-2.12.0.tar.gz", hash = "sha256:442f950141b4f43df752dd303511ffded3a04c2b6fb7f65980574f0c31e6e79c"}, + {file = "pycodestyle-2.12.1-py2.py3-none-any.whl", hash = "sha256:46f0fb92069a7c28ab7bb558f05bfc0110dac69a0cd23c61ea0040283a9d78b3"}, + {file = "pycodestyle-2.12.1.tar.gz", hash = "sha256:6838eae08bbce4f6accd5d5572075c63626a15ee3e6f842df996bf62f6d73521"}, ] [[package]] @@ -2332,100 +2352,100 @@ files = [ [[package]] name = "pyzstd" -version = "0.16.0" +version = "0.16.1" description = "Python bindings to Zstandard (zstd) compression library." optional = false python-versions = ">=3.5" files = [ - {file = "pyzstd-0.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:78f5e65eb15d93f687715be9241c8b55d838fba9b7045d83530f8831544f1413"}, - {file = "pyzstd-0.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:35962bc10480aebd5b32fa344430bddd19ef384286501c1c8092b6a9a1ee6a99"}, - {file = "pyzstd-0.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48037009be790fca505a62705a7997eef0cd384c3ef6c10a769734660245ee73"}, - {file = "pyzstd-0.16.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3a57f2a0531ad2cd33bb78d8555e85a250877e555a68c0add6308ceeca8d84f1"}, - {file = "pyzstd-0.16.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fa219d5d6124f1623b39f296a1fcc4cac1d8c82f137516bd362a38c16adcd92b"}, - {file = "pyzstd-0.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f560d24557bbc54eb1aa01ee6e587d4d199b785593462567ddf752de3c1c4974"}, - {file = "pyzstd-0.16.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d14862ce066da0494e0f9466afc3b8fcd6c03f7250323cf8ef62c67158c77e57"}, - {file = "pyzstd-0.16.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5d0db66651ed5a866a1452e7a450e41a5ec743abbeea1f1bc85ef7c64f5f6b8f"}, - {file = "pyzstd-0.16.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:f47aada7fdc6bcad8ec4ee4ff00a8d2d9a0e05b5516df3f304afbf527b026221"}, - {file = "pyzstd-0.16.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:5c43e2222bbbe660dea8fe335f5c633b3c9ed10628a4b53a160ddd54d15cffc2"}, - {file = "pyzstd-0.16.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:d897ec18822e348f8ef9a17e421716ed224a3726fde806aae04469fec8f0ac9d"}, - {file = "pyzstd-0.16.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4d5c98986d774e9321fb1d4fe0362658560e14c1d7afbe2d298b89a24c2f7b4f"}, - {file = "pyzstd-0.16.0-cp310-cp310-win32.whl", hash = "sha256:84135917c99476c6abeee420ffd005a856d8fde0e5f585b0c484d5923392035b"}, - {file = "pyzstd-0.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:06b9dfd615fb5635c05153431e520954a0e81683c5a6e3ed1134f60cc45b80f1"}, - {file = "pyzstd-0.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c9c1ede5c4e35b059e8734dfa8d23a59b8fcfe3e0ece4f7d226bc5e1816512c9"}, - {file = "pyzstd-0.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75f4363157777cbcbbd14ff823388fddfca597d44c77c27473c4c4000d7a5c99"}, - {file = "pyzstd-0.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48ff680078aec3b9515f149010981c7feeef6c2706987ac7bdc7cc1ea05f8f7d"}, - {file = "pyzstd-0.16.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bbeaa0af865427405a1c0e8c65841a23de66af8ca5d796522f7b105386cd8522"}, - {file = "pyzstd-0.16.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f4f27e083a63b9463fd2640065af1b924f05831839f23d936a97c4f510a54f6b"}, - {file = "pyzstd-0.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3dd4592c2fca923041c57aa2bfe428de14cc45f3a00ab825b353160994bc15e7"}, - {file = "pyzstd-0.16.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e9f22fb00bfcca4b2e0b36afd4f3a3194c1bc93b2a76e51932ccfd3b6aa62501"}, - {file = "pyzstd-0.16.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:586538aa2a992a55c10d88c58166e6023968a9825719bce5a09397b73eea658f"}, - {file = "pyzstd-0.16.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8e51d69446d96f5767e0f1b0676341d5d576c151dfe3dd14aff7a163db1b4d7c"}, - {file = "pyzstd-0.16.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c8c675edd26cd2531163e51dcb3c7c73145e2fa3b77a1ff59ce9ed963ff56017"}, - {file = "pyzstd-0.16.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:4a765c5fc05fe1c843863cc3723e39e8207c28d9a7152ee6d621fa3908ef4880"}, - {file = "pyzstd-0.16.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:79f4c9f1d7906eb890dafae4820f69bd24658297e9ebcdd74867330e8e7bf9b0"}, - {file = "pyzstd-0.16.0-cp311-cp311-win32.whl", hash = "sha256:6aa796663db6d1d01ebdcd80022de840005ae173e01a7b03b3934811b7ae39bc"}, - {file = "pyzstd-0.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:7a82cd4e772e5d1400502d68da7ecd71a6f1ff37243017f284bee3d2106a2496"}, - {file = "pyzstd-0.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e0f5a1865a00798a74d50fcc9956a3d7fa7413cbc1c6d6d04833d89f36e35226"}, - {file = "pyzstd-0.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:00954290d6d46ab13535becbbc1327c56f0a9c5d7b7cf967e6587c1395cade42"}, - {file = "pyzstd-0.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:796a29cbb6414b6cb84d8e7448262ba286847b946de9a149dec97469a4789552"}, - {file = "pyzstd-0.16.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9c68761529a43358151ac507aeb9c6b7c1a990235ce7b7d41f8ea62c62d4679e"}, - {file = "pyzstd-0.16.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8436ce4fa7e7ddaa8d29717fd73e0699883ef6e78ef4d785c244779a7ad1942b"}, - {file = "pyzstd-0.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:349d643aeb8d7d9e0a407cef29d6210afbe646cc19b4e237456e585591eda223"}, - {file = "pyzstd-0.16.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a4cf0fed2d5c9de3da211dceff3ed9a09b8f998f7df57da847145863a786454b"}, - {file = "pyzstd-0.16.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:691cadd48f225097a2588e7db492ac88c669c061208749bc0200ee39e4425e32"}, - {file = "pyzstd-0.16.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:33efaf2cc4efd2b100699d953cd70b5a54c3ca912297211fda01875f4636f655"}, - {file = "pyzstd-0.16.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:b3cc09eecd318310cfd6e7f245248cf16ca014ea5903580d72231d93330952de"}, - {file = "pyzstd-0.16.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:89187af1ca5a9b65c477817e0fe7e411f4edd99e5575aaaef6a9e5ff62028854"}, - {file = "pyzstd-0.16.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d7d5888e206190d36fbffed6d7e9cacd79e64fd34e9a07359e16862973d90b33"}, - {file = "pyzstd-0.16.0-cp312-cp312-win32.whl", hash = "sha256:3c5f28a145677431347772b43a9604b67691b16e233ec7a92fc77fc5fb670608"}, - {file = "pyzstd-0.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:8a2d5a8b74db3df772bb4f230319241e73629b04cb777b22f9dcd2084d92977a"}, - {file = "pyzstd-0.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:94fe8c5f1f11397b5db8b1850168e5bed13b3f3e1bc36e4292819d85be51a63c"}, - {file = "pyzstd-0.16.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d1e6ae36c717abd32b55a275d7fbf9041b6de3a103639739ec3e8c8283773fb3"}, - {file = "pyzstd-0.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33bc6f6048f7f7fc506e6ad03fb822a78c2b8209e73b2eddc69d3d6767d0385c"}, - {file = "pyzstd-0.16.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c4cdb0e407bec2f3ece10275449822575f6634727ee1a18e87c5e5a7b565bb1"}, - {file = "pyzstd-0.16.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8e4cf6d11427d43734e8cb246ecfb7af169983ef796b415379602ea0605f5116"}, - {file = "pyzstd-0.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c0bbdb3ae1c300941c1f89219a8d09d142ddb7bfc78e61da80c8bdc03c05be8"}, - {file = "pyzstd-0.16.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c34c06a6496b4aacdab03133671dd5638417bda09a1f186ba1a39c1dbd1add24"}, - {file = "pyzstd-0.16.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:29ca6db3fb72d17bcec091b9ba485c715f63ca00bfcd993f92cb20037ae98b25"}, - {file = "pyzstd-0.16.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:26e42ccb76a53c1b943021eeb0eb4d78f46093c16e4e658a7204c838d5b36df0"}, - {file = "pyzstd-0.16.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:76697baa4d9fd621bd5b99719d3b55fadeb665af9a49523debfc9ae5fbefef13"}, - {file = "pyzstd-0.16.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:708c442f8f6540ffad24a894bdea3c019250e02dcdbd0fbd27fc977b1a88b4f2"}, - {file = "pyzstd-0.16.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:994a21a75d7b2602a78c2f88f809427ce1051e43af7aad6cda524ccdc859354e"}, - {file = "pyzstd-0.16.0-cp38-cp38-win32.whl", hash = "sha256:80962ff81a3389b5579d1206bea1bb48da38991407442d2a9287f6da1ccb2c80"}, - {file = "pyzstd-0.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:363c11a4d60fa0e2e7437f7494291c24eaf2752c8d8e3adf8f92cb0168073464"}, - {file = "pyzstd-0.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:094cec5425097ae1f9a40bb02de917d2274bfa872665fe2e5b4101ee94d8b31d"}, - {file = "pyzstd-0.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ca9f1f6bd487c9b990e509c17e0a701f554db9e77bd5121c27f1db4594ac4c0a"}, - {file = "pyzstd-0.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ff99a11dd76aec5a5234c1158d6b8dacb61b208f3f30a2bf7ae3b23243190581"}, - {file = "pyzstd-0.16.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2820b607be0346b3e24b097d759393bd4bcccc0620e8e825591061a2c3a0add5"}, - {file = "pyzstd-0.16.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ef883837c16c076f11da37323f589779806073eeacaef3912f2da0359cb8c2cf"}, - {file = "pyzstd-0.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c3181a462cdb55df5ddeffe3cf5223cda36c81feceeb231688af08d30f11022"}, - {file = "pyzstd-0.16.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80741b9f18149264acb639287347cfc6eecff109b5c6d95dbf7222756b107b57"}, - {file = "pyzstd-0.16.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fb70083bf00426194a85d69939c52b1759462873bf6e4d62f481e2bc3e642ea1"}, - {file = "pyzstd-0.16.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:44f818ea8c191285365a0add6fc03f88225f1fdcff570dc78e9f548444042441"}, - {file = "pyzstd-0.16.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:983ea93ed937d329c88ef15d5e3b09e32372590c1a80586b2013f17aed436cb8"}, - {file = "pyzstd-0.16.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:0eadba403ec861fa4c600ad43dbd8ac17b7c22a796d3bd9d92918f4e8a15a6e8"}, - {file = "pyzstd-0.16.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a4e12b6702481ace7071357c1b81b9faf6f660da55ff9ccd6383fed474348cc6"}, - {file = "pyzstd-0.16.0-cp39-cp39-win32.whl", hash = "sha256:bc5e630db572362aef4d8a78f82a40e2b9756de7622feb07031bd400a696ad78"}, - {file = "pyzstd-0.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:8ef9fa7fe28dd6b7d09b8be89aea4e8f2d18b23a89294f51aa48dbc6c306a039"}, - {file = "pyzstd-0.16.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:1b8db95f23d928ba87297afe6d4fff21bbb1af343147ff50c174674312afc29d"}, - {file = "pyzstd-0.16.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:3f661848fa1984f3b17da676c88ccd08d8c3fab5501a1d1c8ac5abece48566f2"}, - {file = "pyzstd-0.16.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:acfe529ff44d379ee889f03c2d353f94b1f16c83a92852061f9672982a3ef32d"}, - {file = "pyzstd-0.16.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:493edd702bc16dae1f4d76461688714c488af1b33f5b3a77c1a86d5c81240f9e"}, - {file = "pyzstd-0.16.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:10143cad228ebeb9eda7793995b2d0b3fef0685258d9b794f6320824302c47d7"}, - {file = "pyzstd-0.16.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:784f7f87ae2e25459ef78282fbe9f0d2fec9ced84e4acb5d28621a0db274a13b"}, - {file = "pyzstd-0.16.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:35ba0ee9d6d502da2bc01d78d22f51a1812ff8d55fb444447f7782f5ce8c1e35"}, - {file = "pyzstd-0.16.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:e8eae552db2aa587c986f460915786bf9058a88d831d562cadba01f3069736a9"}, - {file = "pyzstd-0.16.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e31e0d2023b693ca530d95df7cff8d736f66b755018398bc518160f91e80bd0a"}, - {file = "pyzstd-0.16.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b0fa1ef68839d99b0c0d66fe060303f7f2916f021289a7e04a818ef9461bbbe1"}, - {file = "pyzstd-0.16.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:65a55aac43a685b7d2b9e7c4f9f3768ad6e0d5f9ad7698b8bf9124fbeb814d43"}, - {file = "pyzstd-0.16.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:20259fa302f1050bd02d78d93db78870bed385c6d3d299990fe806095426869f"}, - {file = "pyzstd-0.16.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:bd27ab78269148c65d988a6b26471d621d4cc6eed6b92462b7f8850162e5c4f2"}, - {file = "pyzstd-0.16.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:b5d8a3263b7e23a3593eb4fcc5cc77e053c7d15c874db16ce6ee8b4d94f8d825"}, - {file = "pyzstd-0.16.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:75f5e862e1646f1688e97f4aa69988d6589a1e036f081e98a3f202fa4647e69b"}, - {file = "pyzstd-0.16.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19deddb2975af861320fd7b68196fbb2a4a8500897354919baf693702786e349"}, - {file = "pyzstd-0.16.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c48b4368b832233205a74e9f1dfe2647d9bc49ea8357b09963fd5f15062bdd0a"}, - {file = "pyzstd-0.16.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:74521d819ceea90794aded974cc3024c65c094050e6c4a6f4b7478af3461e3ad"}, - {file = "pyzstd-0.16.0.tar.gz", hash = "sha256:fd43a0ae38ae15223fb1057729001829c3336e90f4acf04cf12ebdec33346658"}, + {file = "pyzstd-0.16.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0cff110d121598f9eb638ce15393fece65bb5fac9a9d38c60fc5cb1ac8631465"}, + {file = "pyzstd-0.16.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:acbf3d01f79be0bd284ab316e33d6a3fceab478a932ce93de7275d7d9547b9be"}, + {file = "pyzstd-0.16.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb1d26304c41cc07a87b1b85f4bf61a0f853368e0c00bb700dc7245971dedd53"}, + {file = "pyzstd-0.16.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8c7507175f8d3f48358e28001a19242d3d4df819b6cd4cbc4f0fbe6f9dee9427"}, + {file = "pyzstd-0.16.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd62933e3a11f7dd6c892fa38c67e7ba45de17cae08f1355bf07b31e631a36f3"}, + {file = "pyzstd-0.16.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4725fb00bf06bd674f73f37cb168dd73ca67e68287207fece340e7425f0754d"}, + {file = "pyzstd-0.16.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9865ffbff114ad4411c9794deb1cbe57a03902f82a2671c23929a2628fd70bbc"}, + {file = "pyzstd-0.16.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:65fc3e12ad4d3ddc1f408e31ad2b70e110bbb7f835e4737f0f7b99ed1ff110cd"}, + {file = "pyzstd-0.16.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:397ca9ea892fece84fbbc5847ce46d16ee03501de3bbc6fb1f9b69bb14fe47a3"}, + {file = "pyzstd-0.16.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:83e770056823f8add3be33599219aa962c36f60eff24fa815579bc65bb053499"}, + {file = "pyzstd-0.16.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:f949a5375ca8a546059193400b2e7c70f1a10de58bd87d35bdc31c6230e47ab0"}, + {file = "pyzstd-0.16.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:55e6dd2667a58ca92924f7ced5ac2c53ed26e07c453cfbde50693bf58c4c7b5b"}, + {file = "pyzstd-0.16.1-cp310-cp310-win32.whl", hash = "sha256:c088b57288a8e1818c032ed7e3e3e573b3fe8fad698d02740a1583f55458a73f"}, + {file = "pyzstd-0.16.1-cp310-cp310-win_amd64.whl", hash = "sha256:089f3d04430b1044fccedbd4e88bd5429cd1220cf523b8841ead0127d8eedd9f"}, + {file = "pyzstd-0.16.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7bb570705a39e2a78619e6134a68be00ccd04398d782827180c0d1df79fc88c1"}, + {file = "pyzstd-0.16.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a5633a0e9ac780a5577fc5dee3d6d05b8edf2f3d646ffe2c71e065d62a1b538c"}, + {file = "pyzstd-0.16.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:61450162fb86504d16c00558976a4864ae12537e362f7346a0a79594ec2eb491"}, + {file = "pyzstd-0.16.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cd3d79a74f863ec277ee3297b43f30178aa1a014eba54c286ea48f21248e525e"}, + {file = "pyzstd-0.16.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:26ddb50c2767ebf411f2b28e698d61d1671c87e943dac81b2a6e89529052c8ad"}, + {file = "pyzstd-0.16.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf0dec2978f9bc622c4daa48dd286f3f7e6ab196b1e17c46437abb6d4a968201"}, + {file = "pyzstd-0.16.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:64ae91c0c19160cc0b95d33a5802e708ab15f11213f8043906d484b6062a80b3"}, + {file = "pyzstd-0.16.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9175bf699ec234189dd5549b4ededc676b66010e2eef5b3170501a17d765cf5"}, + {file = "pyzstd-0.16.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:cdedcddd851139605b0dbc9b9ed5767052f67c02fa98c66b0a0bd4c1bce0ba49"}, + {file = "pyzstd-0.16.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:efeac4bf8a12cc0a1284164e77cca85727f8a5ec20328cef2e5c72f8eabf7630"}, + {file = "pyzstd-0.16.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:b867f620b7402e0befa4b5e7eaa79693be099a52304f31bfc1006cdc915d21c7"}, + {file = "pyzstd-0.16.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4d9f8aa524f99f593ebf38639e6d066984b0f9ed084d45ee8877761d1ee6aa48"}, + {file = "pyzstd-0.16.1-cp311-cp311-win32.whl", hash = "sha256:a4f2f1bd58361e4994e0fed4223038554bdb61644b2449f50f8c2960a8aeffc4"}, + {file = "pyzstd-0.16.1-cp311-cp311-win_amd64.whl", hash = "sha256:81567ffe7f5ba6d6612399a82191448ba4f7780c96f2643bea36403a49462e0b"}, + {file = "pyzstd-0.16.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:bb26734a5cda4b5e58b33c5fe20aee697fb9ad8dd72999bc71d7df09783f44db"}, + {file = "pyzstd-0.16.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b73e9d8ae8eca8dd600d54408584b625503761ad6b0e481e47e270a19e968141"}, + {file = "pyzstd-0.16.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b8af1f24361728cb0abeb447204015b2af016bfaf61d55b7c7bc44edc50348b"}, + {file = "pyzstd-0.16.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f5faf5894b58f38491ecb458e6f4032ae0bbebea64dfeff86abc6c6176829ac3"}, + {file = "pyzstd-0.16.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:748ea21376016b77f93eb6e5d3fdf158620a27d36d2a05cb319f3e7b8b1943a5"}, + {file = "pyzstd-0.16.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb49c7854c6c56d9d41abdcd970b5fec2681a6a74f390b6f8f8fe9d1ca1f8530"}, + {file = "pyzstd-0.16.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:68ea4cbeb5fa722222e8607ed22eab7723dfe8f502cbdaaab0989fc47f2fe4e6"}, + {file = "pyzstd-0.16.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c78ca31b0d83f77ab6ff041808304f51672f925683ffc3a1a866469f1678fc10"}, + {file = "pyzstd-0.16.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:deea37b1618f31fd2618be0aad42bb5bafcdddc24df9fc18c71071314239e3a2"}, + {file = "pyzstd-0.16.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:aadbab6d6b79bd37697c3de28d4c2cbac3545ae9622be2f86ae5e426c6e1b192"}, + {file = "pyzstd-0.16.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3b23295a6aedc71e5318b7e490f2ed1ea3fda6b31f2b5957c8da49a5aac7aa81"}, + {file = "pyzstd-0.16.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f0a685bea6ba4e965d0de77cda3e380efeb144bb4fa0eff362626b4cdec71814"}, + {file = "pyzstd-0.16.1-cp312-cp312-win32.whl", hash = "sha256:ad8686ae57a59432860907e4c62d4b08b98d2330a129928145d797eda118da7b"}, + {file = "pyzstd-0.16.1-cp312-cp312-win_amd64.whl", hash = "sha256:53ae4ac03c286896b2a6741c9069afd80e432526d267f900420d8083f8ab1f78"}, + {file = "pyzstd-0.16.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:96c04f3ef21f8c84672468358001b1f78b18f62a1b6af202e9fe0c71d0cd85f8"}, + {file = "pyzstd-0.16.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f3b74f42ac91dfcd5b3e8dfa691714e23c4bb3931070fdc134dbbaa2c92c51e"}, + {file = "pyzstd-0.16.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3cba92b21b12bff45c0393e022ca4e6029aa5d4d3f11d1d9f05ca9a13245d325"}, + {file = "pyzstd-0.16.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:036d76e26300bc03cf05108a019fb0dd0a40ee6ed40128ead1c953fc603fba68"}, + {file = "pyzstd-0.16.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cb00ce5e9a88e27f27db3ff4f4c6080c4158ad848d620b68d48bbc413d99f0ef"}, + {file = "pyzstd-0.16.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f7b5d93b5e7d3b3bd4a0f665b2bfab61a9cc78cb19b4f9d2faa454ae19133e"}, + {file = "pyzstd-0.16.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a426a253413ede9dad34fffde2d533950aa6aab82d0e9c7c7660168e323c43dc"}, + {file = "pyzstd-0.16.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:3fcf498488cf2a866142a35d0c14c021a58c7d96b25bafd13c72676458912011"}, + {file = "pyzstd-0.16.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:2325ff41ff4bea19065894244c4dade5ae6b40df6e9def9dd4bc6e4c81edabf1"}, + {file = "pyzstd-0.16.1-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:593a4ec2f639a80523c6d8cb6a3f97899a4b3db4eadb768039dbd61fed4fe675"}, + {file = "pyzstd-0.16.1-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:13ab3b66c660438cf9031543a1cb9a4c7adde6b58b65e05783d32044178e871c"}, + {file = "pyzstd-0.16.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:15a242d03c1516e1325d41a43b05c95abce0306d6f9782408b44f6225fadea9b"}, + {file = "pyzstd-0.16.1-cp38-cp38-win32.whl", hash = "sha256:763e084e0a7273d81d4bd68c4c89d642e3a447e30d1108d3dc0d0ec07a3ad01c"}, + {file = "pyzstd-0.16.1-cp38-cp38-win_amd64.whl", hash = "sha256:8b54ea942847b6e2f842f8b524f0c4dcc199f99b39420e06262cbcf25cb24363"}, + {file = "pyzstd-0.16.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2595819277b46d195565861f2966f58908444c7787da1ec45ea56390650013a6"}, + {file = "pyzstd-0.16.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f42bb898d5335e91d4575758cb11f68308756061d1eff042c7c4daa09cc560ba"}, + {file = "pyzstd-0.16.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffa579210ae03a0aeeff86d492ff26acd358ec1daea8553beaac5f1ba774991d"}, + {file = "pyzstd-0.16.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:234423432d2e66328bdb06121aad3477bb97e200141a863aba0d1a14ff30b0cb"}, + {file = "pyzstd-0.16.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84059dfa917a2704e04776f26d5105bebc5019fc4f13379b44e71e57b575fc28"}, + {file = "pyzstd-0.16.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c870947722ae4c7de8e2d259690041f8b3332b1d75b4c3ca2caf17b170d10be3"}, + {file = "pyzstd-0.16.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3630a47b7d418e65521a45afbea5d77a825e4fb675fdf884eff42e6ce3230f91"}, + {file = "pyzstd-0.16.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:070434349fdd2fd56207a82a146c89a50811c5e0f767ac00d09f513919335f6f"}, + {file = "pyzstd-0.16.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:59d016a105efd11db4305d43712ca2aab5e4f7dc73f42cc6324bc8f1b0ce2402"}, + {file = "pyzstd-0.16.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:eb2e62ed3d04fed425e009e9948c5e1478665475c5a6ca52d9f02295db7cffb1"}, + {file = "pyzstd-0.16.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:1f00c7d40304329fbebbe9891cd2b144b09844876fe65a8bcfef71d80d417214"}, + {file = "pyzstd-0.16.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:28b33701e0a5bdb7aa96229ef7f680442894a4be3dfb39daf2fbae805778ade7"}, + {file = "pyzstd-0.16.1-cp39-cp39-win32.whl", hash = "sha256:7cdc3c293ab30ea141789a4454a4fd7b7858e005f6d2f61113d239a20d9bafd4"}, + {file = "pyzstd-0.16.1-cp39-cp39-win_amd64.whl", hash = "sha256:f6a7996f56abc23ad96bb73aea363720a1fca91a99822f8267bb5d3c4b7af7dc"}, + {file = "pyzstd-0.16.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:cf08a0fa9af8d690a41b9b7db6b8ae174ba2ac42b5463993c2cd3d144a094644"}, + {file = "pyzstd-0.16.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:65683cb63d631b159e02738376987c26106b37a1345105c52067441e6259cf87"}, + {file = "pyzstd-0.16.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bc09abfd5e281dba33a1cfdc653ece69fc239ad2c6cebd99506facbcb2669c91"}, + {file = "pyzstd-0.16.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46feda6257df4cde7dda55811851c2096dea7b38dcd601099acb95d7acdc795f"}, + {file = "pyzstd-0.16.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca952ce3388b5f7ee78931733ec41c8939482b466882e41d79a9a8c1387dd398"}, + {file = "pyzstd-0.16.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:dc0e4d4c832adcd3c25a5d5b5bf0aa05bc25a279b8e8356eb2b95975b2a67fa0"}, + {file = "pyzstd-0.16.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ef5943a471b0d51cdb4eb05187b4be81cd6c95349e73818c4b959f60a05dfccd"}, + {file = "pyzstd-0.16.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:2df7e255b4aef73d7f8b11301bb6e39cf43e46cf80aa885ff7c1570565cf2398"}, + {file = "pyzstd-0.16.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a456ca431e4968a31c350004eca7957490f51245be8f3b44e49a9f143251312"}, + {file = "pyzstd-0.16.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1751fabc263654b3b4fbfb2729f63d6b3a51bf498bfbb1851ed332cd1b9a02e8"}, + {file = "pyzstd-0.16.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3b1ce3eae59fd7093a05b8f073c7dce4795cccbf5987371fda5931b38fa9a567"}, + {file = "pyzstd-0.16.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:bc6326d017c618e7897c2f529dc71100403c0dfdbc523cd6c62f6ba1ed9f23f1"}, + {file = "pyzstd-0.16.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:487efbe3da2b879c5835e0d762bc8ea69e6bd765d31d6de32b20146bc7f5b2cc"}, + {file = "pyzstd-0.16.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:4ae871967fc080a24118135dd8465339cf69c990fdea8755aef8806c5ebfb0e3"}, + {file = "pyzstd-0.16.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6467ba4ccbc1e09793e763c602079bb5b95813dcb2b0d2afffb40130b5927e69"}, + {file = "pyzstd-0.16.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1274d766f8a2655f99bd8f2ebc8f109ccf640734e941ca484ef03e275441e220"}, + {file = "pyzstd-0.16.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd568900f5ce7e2ced7928342b7cbc234c2b5648cff6a84bbf5e713377fce4f5"}, + {file = "pyzstd-0.16.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:123aba9d2bfdc1840b1fadd386c0095130948c10cd5a4f0acc48368d61448c9e"}, + {file = "pyzstd-0.16.1.tar.gz", hash = "sha256:ed50c08233878c155c73ab2622e115cd9e46c0f1c2e2ddd76f2e7ca24933f195"}, ] [[package]] @@ -2856,14 +2876,14 @@ files = [ ] [[package]] -name = "spectrum-fundamentals" -version = "0.7.0" +name = "spectrum_fundamentals" +version = "0.7.1" description = "Fundamental functions, annotation pipeline and constants for oktoberfest" optional = false python-versions = "<3.11.0,>=3.9.0" files = [ - {file = "spectrum_fundamentals-0.7.0-py3-none-any.whl", hash = "sha256:8926eccd1403690b8f5f7231eb59c910848c35a8c80ed47ca9817db3adc09e14"}, - {file = "spectrum_fundamentals-0.7.0.tar.gz", hash = "sha256:02c4bab9124b40ae87620df2e6dae191a0692dbd6f57748ac32d99b3f69e7e2e"}, + {file = "spectrum_fundamentals-0.7.1-py3-none-any.whl", hash = "sha256:a1d1399444b05187acad6433c68ac2b54749a64a881cc08ed05b29d105cde91f"}, + {file = "spectrum_fundamentals-0.7.1.tar.gz", hash = "sha256:90264614ee06eb79a67175c74ae93638e45fdb992a39ef893ec4eeeb3a4c5b29"}, ] [package.dependencies] @@ -3155,13 +3175,13 @@ files = [ [[package]] name = "tokenize-rt" -version = "5.2.0" +version = "6.0.0" description = "A wrapper around the stdlib `tokenize` which roundtrips." optional = false python-versions = ">=3.8" files = [ - {file = "tokenize_rt-5.2.0-py2.py3-none-any.whl", hash = "sha256:b79d41a65cfec71285433511b50271b05da3584a1da144a0752e9c621a285289"}, - {file = "tokenize_rt-5.2.0.tar.gz", hash = "sha256:9fe80f8a5c1edad2d3ede0f37481cc0cc1538a2f442c9c2f9e4feacd2792d054"}, + {file = "tokenize_rt-6.0.0-py2.py3-none-any.whl", hash = "sha256:d4ff7ded2873512938b4f8cbb98c9b07118f01d30ac585a30d7a88353ca36d22"}, + {file = "tokenize_rt-6.0.0.tar.gz", hash = "sha256:b9711bdfc51210211137499b5e355d3de5ec88a85d2025c520cbb921b5194367"}, ] [[package]] @@ -3177,13 +3197,13 @@ files = [ [[package]] name = "tqdm" -version = "4.66.4" +version = "4.66.5" description = "Fast, Extensible Progress Meter" optional = false python-versions = ">=3.7" files = [ - {file = "tqdm-4.66.4-py3-none-any.whl", hash = "sha256:b75ca56b413b030bc3f00af51fd2c1a1a5eac6a0c1cca83cbb37a5c52abce644"}, - {file = "tqdm-4.66.4.tar.gz", hash = "sha256:e4d936c9de8727928f3be6079590e97d9abfe8d39a590be678eb5919ffc186bb"}, + {file = "tqdm-4.66.5-py3-none-any.whl", hash = "sha256:90279a3770753eafc9194a0364852159802111925aa30eb3f9d85b0e805ac7cd"}, + {file = "tqdm-4.66.5.tar.gz", hash = "sha256:e1020aef2e5096702d8a025ac7d16b1577279c9d63f8375b63083e9a5f0fcbad"}, ] [package.dependencies] @@ -3546,4 +3566,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = ">=3.9.0,<3.11.0" -content-hash = "28738b95878d8f42b60d963db580c793dc50c96501c1766259e25af690a7b3f8" +content-hash = "057878f03cb96742ba95ce2db195b0d218c4bbbe0ef17db2540505d9e9b9873d" From a84f5c4432d93a147e55f625b7f8df7c9d1a0634 Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Mon, 5 Aug 2024 17:52:35 +0200 Subject: [PATCH 29/31] fixed mypy and typeguard --- spectrum_io/spectral_library/dlib.py | 6 ++---- spectrum_io/spectral_library/msp.py | 17 ++++++++--------- .../spectral_library/spectral_library.py | 12 +++++++++--- spectrum_io/spectral_library/spectronaut.py | 6 ++---- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/spectrum_io/spectral_library/dlib.py b/spectrum_io/spectral_library/dlib.py index c4fbb60..11ea691 100644 --- a/spectrum_io/spectral_library/dlib.py +++ b/spectrum_io/spectral_library/dlib.py @@ -1,12 +1,10 @@ import sqlite3 import zlib -from pathlib import Path -from typing import IO, Dict, Optional, Tuple, Union +from typing import IO, Dict, Union import numpy as np import pandas as pd from spectrum_fundamentals.constants import PARTICLE_MASSES -from spectrum_fundamentals.mod_string import internal_to_mod_mass, internal_without_mods from .spectral_library import SpectralLibrary @@ -27,7 +25,7 @@ class DLib(SpectralLibrary): """Main to init a DLib obj.""" @property - def standard_mods(self): + def standard_mods(self) -> Dict[str, int]: """Standard modifications that are always applied if not otherwise specified.""" return { "M[+15.994915]": 35, diff --git a/spectrum_io/spectral_library/msp.py b/spectrum_io/spectral_library/msp.py index 0a0c8b8..43a4854 100644 --- a/spectrum_io/spectral_library/msp.py +++ b/spectrum_io/spectral_library/msp.py @@ -1,10 +1,10 @@ from sqlite3 import Connection -from typing import IO, Dict, Optional, Tuple, Union +from typing import IO, Dict, Union import numpy as np import pandas as pd from spectrum_fundamentals.constants import PARTICLE_MASSES -from spectrum_fundamentals.mod_string import internal_to_msp, internal_without_mods +from spectrum_fundamentals.mod_string import internal_to_msp from .spectral_library import SpectralLibrary @@ -13,7 +13,7 @@ class MSP(SpectralLibrary): """Main to initialze a MSP obj.""" @property - def standard_mods(self): + def standard_mods(self) -> Dict[str, int]: """Standard modifications that are always applied if not otherwise specified.""" return { "C,Carbamidomethyl": 4, @@ -40,8 +40,7 @@ def _write( if isinstance(out, Connection): raise TypeError("Not supported. Use DLib if you want to write a database file.") stripped_peptides = metadata["SEQUENCE"] - modss = internal_to_msp(metadata["MODIFIED_SEQUENCE"], mods) - print(modss) + mod_fieldss = internal_to_msp(metadata["MODIFIED_SEQUENCE"], mods) p_charges = metadata["PRECURSOR_CHARGE"] p_mzs = (metadata["MASS"] + (p_charges * PARTICLE_MASSES["PROTON"])) / p_charges ces = metadata["COLLISION_ENERGY"] @@ -56,13 +55,13 @@ def _write( lines = [] vec_assemble = np.vectorize(MSP._assemble_fragment_string) - for stripped_peptide, p_charge, p_mz, ce, pr_id, mods, irt, f_mzs, f_ints, f_annots in zip( - stripped_peptides, p_charges, p_mzs, ces, pr_ids, modss, irts, f_mzss, f_intss, f_annotss + for stripped_peptide, p_charge, p_mz, ce, pr_id, mod_fields, irt, f_mzs, f_ints, f_annots in zip( + stripped_peptides, p_charges, p_mzs, ces, pr_ids, mod_fieldss, irts, f_mzss, f_intss, f_annotss ): lines.append(f"Name: {stripped_peptide}/{p_charge}\nMW: {p_mz}\n") lines.append( - f"Comment: Parent={p_mz:.8f} Collision_energy={ce} Protein_ids={pr_id} Mods={mods[0]} " - f"ModString={stripped_peptide}//{mods[1]}/{p_charge} iRT={irt:.2f}\n" + f"Comment: Parent={p_mz:.8f} Collision_energy={ce} Protein_ids={pr_id} Mods={mod_fields[0]} " + f"ModString={stripped_peptide}//{mod_fields[1]}/{p_charge} iRT={irt:.2f}\n" ) cond = self._fragment_filter_passed(f_mzs, f_ints) diff --git a/spectrum_io/spectral_library/spectral_library.py b/spectrum_io/spectral_library/spectral_library.py index b7aed7c..31d1a89 100644 --- a/spectrum_io/spectral_library/spectral_library.py +++ b/spectrum_io/spectral_library/spectral_library.py @@ -4,7 +4,7 @@ from multiprocessing.managers import ValueProxy from pathlib import Path from sqlite3 import Connection -from typing import IO, Dict, Optional, Tuple, Union +from typing import IO, Dict, Optional, Union import numpy as np import pandas as pd @@ -59,6 +59,12 @@ def parse_mods(mods: Dict[str, int]) -> Dict[str, str]: class SpectralLibrary: """Main to initialze a SpectralLibrary obj.""" + @abstractmethod + @property + def standard_mods(self) -> Dict[str, int]: + """Standard modifications that are always applied if not otherwise specified.""" + pass + def __init__( self, output_path: Union[str, Path], @@ -85,7 +91,7 @@ def __init__( def load(self): """Load predictions from hdf5 file.""" - def write(self, *, custom_mods: Optional[Dict[str, str]] = None, **kwargs): + def write(self, *, custom_mods: Optional[Dict[str, int]] = None, **kwargs): """ Write content to the output file. @@ -101,7 +107,7 @@ def write(self, *, custom_mods: Optional[Dict[str, str]] = None, **kwargs): def _get_handle(self): return open(self.out_path, self.mode) - def async_write(self, queue: Queue, progress: ValueProxy, custom_mods: Optional[Dict[str, str]] = None): + def async_write(self, queue: Queue, progress: ValueProxy, custom_mods: Optional[Dict[str, int]] = None): """ Asynchronously write content to the output file from a queue. diff --git a/spectrum_io/spectral_library/spectronaut.py b/spectrum_io/spectral_library/spectronaut.py index b635665..c1dd5e7 100644 --- a/spectrum_io/spectral_library/spectronaut.py +++ b/spectrum_io/spectral_library/spectronaut.py @@ -1,13 +1,11 @@ -import os import re from itertools import chain, cycle from sqlite3 import Connection -from typing import IO, Dict, Optional, Tuple, Union +from typing import IO, Dict, Union import numpy as np import pandas as pd from spectrum_fundamentals.constants import PARTICLE_MASSES -from spectrum_fundamentals.mod_string import internal_to_spectronaut, internal_without_mods from .spectral_library import SpectralLibrary @@ -18,7 +16,7 @@ class Spectronaut(SpectralLibrary): # Check spectronaut folder for output format. @property - def standard_mods(self): + def standard_mods(self) -> Dict[str, int]: """Standard modifications that are always applied if not otherwise specified.""" return { "C[Carbamidomethyl (C)]": 4, From 4c6734782b12e17d58efeaf4943fa19ee689f3ac Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Mon, 5 Aug 2024 17:56:36 +0200 Subject: [PATCH 30/31] fixed typeguard --- spectrum_io/spectral_library/spectral_library.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spectrum_io/spectral_library/spectral_library.py b/spectrum_io/spectral_library/spectral_library.py index 31d1a89..11c0763 100644 --- a/spectrum_io/spectral_library/spectral_library.py +++ b/spectrum_io/spectral_library/spectral_library.py @@ -59,8 +59,8 @@ def parse_mods(mods: Dict[str, int]) -> Dict[str, str]: class SpectralLibrary: """Main to initialze a SpectralLibrary obj.""" - @abstractmethod @property + @abstractmethod def standard_mods(self) -> Dict[str, int]: """Standard modifications that are always applied if not otherwise specified.""" pass From cd49b20c40e58ea4454502c5ae765da372de9b79 Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Mon, 5 Aug 2024 17:58:23 +0200 Subject: [PATCH 31/31] update requirements.txt for docs-build --- requirements.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/requirements.txt b/requirements.txt index 82cd279..aabb0b1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,11 +2,11 @@ alabaster==0.7.16 ; python_version >= "3.9" and python_full_version < "3.11.0" alphatims==1.0.8 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" annotated-types==0.7.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" anyio==4.4.0 ; python_version >= "3.9" and python_full_version < "3.11.0" -attrs==23.2.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +attrs==24.1.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" authlib==1.3.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" babel==2.15.0 ; python_version >= "3.9" and python_full_version < "3.11.0" bandit==1.7.9 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" -black==24.4.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +black==24.8.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" certifi==2024.7.4 ; python_version >= "3.9" and python_full_version < "3.11.0" cffi==1.16.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" and platform_python_implementation != "PyPy" cfgv==3.4.0 ; python_version >= "3.9" and python_full_version < "3.11.0" @@ -14,7 +14,7 @@ charset-normalizer==3.3.2 ; python_version >= "3.9" and python_full_version < "3 click==8.1.7 ; python_version >= "3.9" and python_full_version < "3.11.0" colorama==0.4.6 ; python_version >= "3.9" and python_full_version < "3.11.0" contourpy==1.2.1 ; python_version >= "3.9" and python_full_version < "3.11.0" -coverage[toml]==7.6.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +coverage[toml]==7.6.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" cryptography==43.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" cycler==0.12.1 ; python_version >= "3.9" and python_full_version < "3.11.0" darglint==1.8.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" @@ -27,7 +27,7 @@ flake8-bandit==4.1.1 ; python_full_version >= "3.9.0" and python_full_version < flake8-bugbear==24.4.26 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" flake8-docstrings==1.7.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" flake8-rst-docstrings==0.3.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" -flake8==7.1.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +flake8==7.1.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" fonttools==4.53.1 ; python_version >= "3.9" and python_full_version < "3.11.0" h11==0.14.0 ; python_version >= "3.9" and python_full_version < "3.11.0" h5py==3.11.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" @@ -45,7 +45,7 @@ lxml==5.2.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" markdown-it-py==3.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" markupsafe==2.1.5 ; python_version >= "3.9" and python_full_version < "3.11.0" marshmallow==3.21.3 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" -matplotlib==3.9.1 ; python_version >= "3.9" and python_full_version < "3.11.0" +matplotlib==3.9.0 ; python_version >= "3.9" and python_full_version < "3.11.0" mccabe==0.7.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" mdurl==0.1.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" moepy==1.1.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" @@ -66,7 +66,7 @@ pre-commit-hooks==4.6.0 ; python_full_version >= "3.9.0" and python_full_version pre-commit==3.8.0 ; python_version >= "3.9" and python_full_version < "3.11.0" psutil==6.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" pyarrow==17.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" -pycodestyle==2.12.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pycodestyle==2.12.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" pycparser==2.22 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" and platform_python_implementation != "PyPy" pydantic-core==2.20.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" pydantic==2.8.2 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" @@ -81,7 +81,7 @@ python-dateutil==2.9.0.post0 ; python_version >= "3.9" and python_full_version < pytz==2024.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" pyupgrade==3.17.0 ; python_version >= "3.9" and python_full_version < "3.11.0" pyyaml==6.0.1 ; python_version >= "3.9" and python_full_version < "3.11.0" -pyzstd==0.16.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +pyzstd==0.16.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" regex==2024.7.24 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" requests==2.32.3 ; python_version >= "3.9" and python_full_version < "3.11.0" restructuredtext-lint==1.4.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" @@ -98,7 +98,7 @@ six==1.16.0 ; python_version >= "3.9" and python_full_version < "3.11.0" sniffio==1.3.1 ; python_version >= "3.9" and python_full_version < "3.11.0" snowballstemmer==2.2.0 ; python_version >= "3.9" and python_full_version < "3.11.0" sortedcontainers==2.4.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" -spectrum-fundamentals==0.7.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +spectrum-fundamentals==0.7.1 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" sphinx-autobuild==2024.4.16 ; python_version >= "3.9" and python_full_version < "3.11.0" sphinx-autodoc-typehints==2.2.3 ; python_version >= "3.9" and python_full_version < "3.11.0" sphinx-click==6.0.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" @@ -115,9 +115,9 @@ sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.9" and python_full_v starlette==0.38.2 ; python_version >= "3.9" and python_full_version < "3.11.0" stevedore==5.2.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" threadpoolctl==3.5.0 ; python_version >= "3.9" and python_full_version < "3.11.0" -tokenize-rt==5.2.0 ; python_version >= "3.9" and python_full_version < "3.11.0" +tokenize-rt==6.0.0 ; python_version >= "3.9" and python_full_version < "3.11.0" tomli==2.0.1 ; python_version >= "3.9" and python_version < "3.11" -tqdm==4.66.4 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" +tqdm==4.66.5 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" typeguard==4.3.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" typer==0.12.3 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0" types-attrs==19.1.0 ; python_full_version >= "3.9.0" and python_full_version < "3.11.0"