scoring-matrices
Advanced tools
+8
-1
@@ -9,5 +9,12 @@ # Changelog | ||
| ## [Unreleased] | ||
| [Unreleased]: https://github.com/althonos/scoring-matrices/compare/v0.3.1...HEAD | ||
| [Unreleased]: https://github.com/althonos/scoring-matrices/compare/v0.3.2...HEAD | ||
| ## [v0.3.2] - 2025-06-16 | ||
| [v0.3.2]: https://github.com/althonos/scoring-matrices/compare/v0.3.1...v0.3.2 | ||
| ### Fixed | ||
| - Exclude `docs` folder from source distribution, causing issues with Windows builds. | ||
| ## [v0.3.1] - 2025-06-12 | ||
@@ -14,0 +21,0 @@ [v0.3.1]: https://github.com/althonos/scoring-matrices/compare/v0.3.0...v0.3.1 |
+1
-1
| Metadata-Version: 2.2 | ||
| Name: scoring-matrices | ||
| Version: 0.3.1 | ||
| Version: 0.3.2 | ||
| Summary: Dependency free, Cython-compatible scoring matrices to use with biological sequences. | ||
@@ -5,0 +5,0 @@ Keywords: bioinformatics,sequence,substitution,matrix,score |
+5
-1
@@ -7,3 +7,3 @@ [build-system] | ||
| name = "scoring-matrices" | ||
| version = "0.3.1" | ||
| version = "0.3.2" | ||
| description = "Dependency free, Cython-compatible scoring matrices to use with biological sequences." | ||
@@ -54,2 +54,6 @@ readme = "README.md" | ||
| editable.verbose = false | ||
| sdist.exclude = [ | ||
| "docs", | ||
| "wheelhouse", | ||
| ] | ||
@@ -56,0 +60,0 @@ [[tool.scikit-build.overrides]] |
@@ -58,9 +58,9 @@ # distutils: language = c | ||
| >>> import argparse | ||
| >>> parser = argparse.ArgumentParser() | ||
| >>> _ = parser.add_argument( | ||
| ... "--matrix", | ||
| ... choices=ScoringMatrix.BUILTIN_MATRICES, | ||
| ... default="BLOSUM62" | ||
| ... ) | ||
| >>> import argparse | ||
| >>> parser = argparse.ArgumentParser() | ||
| >>> arg = parser.add_argument( | ||
| ... "--matrix", | ||
| ... choices=ScoringMatrix.BUILTIN_MATRICES, | ||
| ... default="BLOSUM62" | ||
| ... ) | ||
@@ -67,0 +67,0 @@ """ |
| /******************************************************************************* | ||
| * Set a custom icon for pypi as it's not available in the fa built-in brands | ||
| */ | ||
| FontAwesome.library.add( | ||
| (faListOldStyle = { | ||
| prefix: "fa-custom", | ||
| iconName: "pypi", | ||
| icon: [ | ||
| 17.313, // viewBox width | ||
| 19.807, // viewBox height | ||
| [], // ligature | ||
| "e001", // unicode codepoint - private use area | ||
| "m10.383 0.2-3.239 1.1769 3.1883 1.1614 3.239-1.1798zm-3.4152 1.2411-3.2362 1.1769 3.1855 1.1614 3.2369-1.1769zm6.7177 0.00281-3.2947 1.2009v3.8254l3.2947-1.1988zm-3.4145 1.2439-3.2926 1.1981v3.8254l0.17548-0.064132 3.1171-1.1347zm-6.6564 0.018325v3.8247l3.244 1.1805v-3.8254zm10.191 0.20931v2.3137l3.1777-1.1558zm3.2947 1.2425-3.2947 1.1988v3.8254l3.2947-1.1988zm-8.7058 0.45739c0.00929-1.931e-4 0.018327-2.977e-4 0.027485 0 0.25633 0.00851 0.4263 0.20713 0.42638 0.49826 1.953e-4 0.38532-0.29327 0.80469-0.65542 0.93662-0.36226 0.13215-0.65608-0.073306-0.65613-0.4588-6.28e-5 -0.38556 0.2938-0.80504 0.65613-0.93662 0.068422-0.024919 0.13655-0.038114 0.20156-0.039466zm5.2913 0.78369-3.2947 1.1988v3.8247l3.2947-1.1981zm-10.132 1.239-3.2362 1.1769 3.1883 1.1614 3.2362-1.1769zm6.7177 0.00213-3.2926 1.2016v3.8247l3.2926-1.2009zm-3.4124 1.2439-3.2947 1.1988v3.8254l3.2947-1.1988zm-6.6585 0.016195v3.8275l3.244 1.1805v-3.8254zm16.9 0.21143-3.2947 1.1988v3.8247l3.2947-1.1981zm-3.4145 1.2411-3.2926 1.2016v3.8247l3.2926-1.2009zm-3.4145 1.2411-3.2926 1.2016v3.8247l3.2926-1.2009zm-3.4124 1.2432-3.2947 1.1988v3.8254l3.2947-1.1988zm-6.6585 0.019027v3.8247l3.244 1.1805v-3.8254zm13.485 1.4497-3.2947 1.1988v3.8247l3.2947-1.1981zm-3.4145 1.2411-3.2926 1.2016v3.8247l3.2926-1.2009zm2.4018 0.38127c0.0093-1.83e-4 0.01833-3.16e-4 0.02749 0 0.25633 0.0085 0.4263 0.20713 0.42638 0.49826 1.97e-4 0.38532-0.29327 0.80469-0.65542 0.93662-0.36188 0.1316-0.65525-0.07375-0.65542-0.4588-1.95e-4 -0.38532 0.29328-0.80469 0.65542-0.93662 0.06842-0.02494 0.13655-0.03819 0.20156-0.03947zm-5.8142 0.86403-3.244 1.1805v1.4201l3.244 1.1805z", // svg path (https://simpleicons.org/icons/pypi.svg) | ||
| ], | ||
| }), | ||
| ); | ||
| FontAwesome.library.add( | ||
| (faListOldStyle = { | ||
| prefix: "fa-custom", | ||
| iconName: "sword", | ||
| icon: [ | ||
| 256, // viewBox width | ||
| 256, // viewBox height | ||
| [], // ligature | ||
| "e002", // unicode codepoint - private use area | ||
| "M221.65723,34.34326A8.00246,8.00246,0,0,0,216,32h-.02539l-63.79883.20117A8.00073,8.00073,0,0,0,146.0332,35.106L75.637,120.32275,67.31348,111.999A16.02162,16.02162,0,0,0,44.68555,112L32.001,124.68555A15.99888,15.99888,0,0,0,32,147.31348l20.88672,20.88769L22.94531,198.14258a16.01777,16.01777,0,0,0,.001,22.62695l12.28418,12.28418a16.00007,16.00007,0,0,0,22.62793,0L87.79883,203.1123,108.68652,224.001A16.02251,16.02251,0,0,0,131.31445,224L143.999,211.31445A15.99888,15.99888,0,0,0,144,188.68652l-8.32324-8.32324,85.21679-70.39648a8.00125,8.00125,0,0,0,2.90528-6.14258L224,40.02539A8.001,8.001,0,0,0,221.65723,34.34326Zm-13.84668,65.67822-83.49829,68.97706L111.314,156l54.34327-54.34277a8.00053,8.00053,0,0,0-11.31446-11.31446L100,144.686,87.00195,131.6875,155.97852,48.189l51.99609-.16357Z", // svg path (https://simpleicons.org/icons/pypi.svg) | ||
| ], | ||
| }), | ||
| ); | ||
| FontAwesome.library.add( | ||
| (faListOldStyle = { | ||
| prefix: "fa-custom", | ||
| iconName: "knife", | ||
| icon: [ | ||
| 256, // viewBox width | ||
| 256, // viewBox height | ||
| [], // ligature | ||
| "e003", // unicode codepoint - private use area | ||
| "M231.79883,32.2002a28.05536,28.05536,0,0,0-39.667.06933L18.27441,210.41211a8,8,0,0,0,3.92676,13.38281,155.06019,155.06019,0,0,0,34.957,4.00293c33.4209-.001,66.877-10.86914,98.32813-32.1748,31.74512-21.50391,50.14551-45.79981,50.91406-46.82325a8.00114,8.00114,0,0,0-.74316-10.457L186.919,119.60547l44.97753-47.90332A28.03445,28.03445,0,0,0,231.79883,32.2002ZM189.207,144.52148a225.51045,225.51045,0,0,1-43.10351,38.13184c-34.46973,23.23145-69.999,32.665-105.83887,28.13477l106.29492-108.915,23.30176,23.30175q.208.22852.43847.44434l.082.07617Z", // svg path (https://simpleicons.org/icons/pypi.svg) | ||
| ], | ||
| }), | ||
| ); |
| [ | ||
| { | ||
| "name": "v0.3 (latest)", | ||
| "version": "0.3.1", | ||
| "url": "https://pytantan.readthedocs.io/en/v0.3.1/" | ||
| }, | ||
| { | ||
| "name": "v0.2", | ||
| "version": "0.2.2", | ||
| "url": "https://pytantan.readthedocs.io/en/v0.2.2/" | ||
| }, | ||
| { | ||
| "name": "v0.1", | ||
| "version": "0.1.1", | ||
| "url": "https://pytantan.readthedocs.io/en/v0.1.1/" | ||
| } | ||
| ] |
| related.rst |
| API Reference | ||
| ============= | ||
| .. currentmodule:: scoring_matrices | ||
| .. automodule:: scoring_matrices | ||
| Classes | ||
| ------- | ||
| .. toctree:: | ||
| :hidden: | ||
| ScoringMatrix <scoring_matrix> | ||
| .. only:: html | ||
| .. autosummary:: | ||
| :nosignatures: | ||
| scoring_matrices.ScoringMatrix |
| ``ScoringMatrix`` | ||
| ================= | ||
| .. currentmodule:: scoring_matrices | ||
| .. autoclass:: ScoringMatrix | ||
| :members: | ||
| .. c:function:: const float* data_ptr() | ||
| Get a pointer to the scoring matrix as a C-contiguous array. | ||
| .. c:function:: const float** matrix_ptr() | ||
| Get a pointer to the scoring matrix as an array of pointers to matrix rows. | ||
| .. c:function:: const char* alphabet_ptr() | ||
| Get a pointer to the scoring matrix alphabet as a C-string. | ||
| .. c:function:: size_t size() | ||
| Get the size of the scoring matrix. | ||
| .. automethod:: __init__ | ||
| .. automethod:: __len__ | ||
| .. automethod:: __getitem__ | ||
| .. automethod:: __copy__ | ||
| .. automethod:: __eq__ | ||
| .. automethod:: __reduce_ex__ | ||
-220
| # Configuration file for the Sphinx documentation builder. | ||
| # | ||
| # For the full list of built-in configuration values, see the documentation: | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
| # -- Imports ----------------------------------------------------------------- | ||
| import datetime | ||
| import os | ||
| import re | ||
| import semantic_version | ||
| import shutil | ||
| import sys | ||
| import urllib.request | ||
| # -- Path setup -------------------------------------------------------------- | ||
| # 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. | ||
| docssrc_dir = os.path.dirname(os.path.abspath(__file__)) | ||
| project_dir = os.path.dirname(docssrc_dir) | ||
| # When building on ReadTheDocs, we can't provide a local version of the Cython | ||
| # extensions, so we have to install the latest public version, and avoid | ||
| # patching the PYTHONPATH with the local development folder | ||
| if os.getenv("READTHEDOCS", "False") != "True": | ||
| sys.path.insert(0, project_dir) | ||
| # Download the *See Also* cards from a centralized location so it can be kept | ||
| # up-to-date across all projects | ||
| with urllib.request.urlopen("https://gist.githubusercontent.com/althonos/5d6bf5a512d64dc951c42a91d5fc3fb3/raw/related.rst") as src: | ||
| with open("related.rst", "wb") as dst: | ||
| shutil.copyfileobj(src, dst) | ||
| # -- Project information ----------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
| import scoring_matrices | ||
| # extract the project metadata from the module itself | ||
| project = scoring_matrices.__name__ | ||
| author = re.match("(.*) <.*>", scoring_matrices.__author__).group(1) | ||
| year = datetime.date.today().year | ||
| copyright = "{}, {}".format("2024" if year == 2024 else "2024-{}".format(year), author) | ||
| # extract the semantic version | ||
| semver = semantic_version.Version.coerce(scoring_matrices.__version__) | ||
| version = str(semver.truncate(level="patch")) | ||
| release = str(semver) | ||
| # patch the docstring so that we don't show the link to redirect | ||
| # to the docs (we don't want to see it when reading the docs already, duh!) | ||
| doc_lines = scoring_matrices.__doc__.splitlines() | ||
| if "See Also:" in doc_lines: | ||
| see_also = doc_lines.index("See Also:") | ||
| scoring_matrices.__doc__ = "\n".join(doc_lines[:see_also]) | ||
| # -- General configuration --------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#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. | ||
| extensions = [ | ||
| "sphinx.ext.autodoc", | ||
| "sphinx.ext.autosummary", | ||
| "sphinx.ext.intersphinx", | ||
| "sphinx.ext.napoleon", | ||
| "sphinx.ext.coverage", | ||
| "sphinx.ext.mathjax", | ||
| "sphinx.ext.todo", | ||
| "sphinx.ext.extlinks", | ||
| "sphinx_design", | ||
| "sphinxcontrib.jquery", | ||
| "recommonmark", | ||
| "nbsphinx", | ||
| "IPython.sphinxext.ipython_console_highlighting", | ||
| ] | ||
| # Add any paths that contain templates here, relative to this directory. | ||
| templates_path = ['_templates'] | ||
| # List of patterns, relative to source directory, that match files and | ||
| # directories to ignore when looking for source files. | ||
| # This pattern also affects html_static_path and html_extra_path. | ||
| exclude_patterns = [ | ||
| "_build", | ||
| "Thumbs.db", | ||
| ".DS_Store", | ||
| "**.ipynb_checkpoints", | ||
| "requirements.txt", | ||
| ] | ||
| # The name of the Pygments (syntax highlighting) style to use. | ||
| pygments_style = "monokailight" | ||
| # The name of the default role for inline references | ||
| default_role = "py:obj" | ||
| # -- 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 = "pydata_sphinx_theme" | ||
| # 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/js', '_static/bibtex', '_static/css', '_static/json'] | ||
| html_js_files = ["custom-icon.js"] | ||
| html_css_files = ["custom.css"] | ||
| # 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 = { | ||
| "external_links": [], | ||
| "show_toc_level": 2, | ||
| "use_edit_page_button": True, | ||
| "icon_links": [ | ||
| { | ||
| "name": "GitHub", | ||
| "url": "https://github.com/althonos/scoring-matrices", | ||
| "icon": "fa-brands fa-github", | ||
| }, | ||
| { | ||
| "name": "PyPI", | ||
| "url": "https://pypi.org/project/scoring-matrices", | ||
| "icon": "fa-custom fa-pypi", | ||
| }, | ||
| ], | ||
| "logo": { | ||
| "text": "Scoring Matrices", | ||
| # "image_light": "_images/logo.png", | ||
| # "image_dark": "_images/logo.png", | ||
| }, | ||
| "navbar_start": ["navbar-logo", "version-switcher"], | ||
| "navbar_align": "left", | ||
| "footer_start": ["copyright"], | ||
| "footer_center": ["sphinx-version"], | ||
| "switcher": { | ||
| "json_url": "https://scoring-matrices.readthedocs.io/en/latest/_static/switcher.json", | ||
| "version_match": version, | ||
| } | ||
| } | ||
| html_context = { | ||
| "github_user": "althonos", | ||
| "github_repo": "scoring-matrices", | ||
| "github_version": "main", | ||
| "doc_path": "docs", | ||
| } | ||
| html_favicon = '_images/favicon.ico' | ||
| # -- Options for HTMLHelp output --------------------------------------------- | ||
| # Output file base name for HTML help builder. | ||
| htmlhelp_basename = project | ||
| # -- Extension configuration ------------------------------------------------- | ||
| # -- Options for imgmath extension ------------------------------------------- | ||
| imgmath_image_format = "svg" | ||
| # -- Options for napoleon extension ------------------------------------------ | ||
| napoleon_include_init_with_doc = True | ||
| napoleon_include_special_with_doc = True | ||
| napoleon_include_private_with_doc = True | ||
| napoleon_use_admonition_for_examples = True | ||
| napoleon_use_admonition_for_notes = True | ||
| napoleon_use_admonition_for_references = True | ||
| napoleon_use_rtype = False | ||
| # -- Options for autodoc extension ------------------------------------------- | ||
| autoclass_content = "class" | ||
| autodoc_member_order = "bysource" | ||
| autosummary_generate = [] | ||
| # -- Options for intersphinx extension --------------------------------------- | ||
| # Example configuration for intersphinx: refer to the Python standard library. | ||
| intersphinx_mapping = { | ||
| "python": ("https://docs.python.org/3/", None), | ||
| } | ||
| # -- Options for recommonmark extension -------------------------------------- | ||
| source_suffix = { | ||
| ".rst": "restructuredtext", | ||
| ".txt": "markdown", | ||
| ".md": "markdown", | ||
| } | ||
| # -- Options for nbsphinx extension ------------------------------------------ | ||
| nbsphinx_execute = "auto" | ||
| nbsphinx_execute_arguments = [ | ||
| "--InlineBackend.figure_formats={'svg', 'pdf'}", | ||
| "--InlineBackend.rc={'figure.dpi': 96}", | ||
| ] | ||
| # -- Options for extlinks extension ------------------------------------------ | ||
| extlinks = { | ||
| "doi": ("https://doi.org/%s", "doi:%s"), | ||
| "pmid": ("https://pubmed.ncbi.nlm.nih.gov/%s", "PMID:%s"), | ||
| "pmc": ("https://www.ncbi.nlm.nih.gov/pmc/articles/PMC%s", "PMC%s"), | ||
| "isbn": ("https://www.worldcat.org/isbn/%s", "ISBN:%s"), | ||
| "wiki": ("https://en.wikipedia.org/wiki/%s", "Wikipedia:%s"), | ||
| } |
| Copyright Notice | ||
| ================ | ||
| This library is provided under the MIT license: | ||
| .. literalinclude:: ../../COPYING |
| User Guide | ||
| ========== | ||
| This section contains guides and documents about ``scoring-matrices`` usage. | ||
| .. toctree:: | ||
| :maxdepth: 1 | ||
| :caption: Getting Started | ||
| Installation <install> | ||
| Matrices <matrices> | ||
| .. toctree:: | ||
| :maxdepth: 1 | ||
| :caption: Resources | ||
| Contribution Guide <contributing> | ||
| Changelog <changes> | ||
| Copyright Notice <copyright> |
| Installation | ||
| ============ | ||
| .. note:: | ||
| Wheels are provided for x86-64 Linux, MacOS, and Windows, as well | ||
| as Aarch64 Linux and MacOS, but other machines will have to build the | ||
| wheel from the source distribution. Building ``scoring-matrices`` involves | ||
| compiling some Cython code, which requires a C compiler to be available on | ||
| the local machine. | ||
| PyPi | ||
| ^^^^ | ||
| ``scoring-matrices`` is hosted on GitHub, but the easiest way to install it is to download | ||
| the latest release from its `PyPi repository <https://pypi.python.org/pypi/scoring-matrices>`_. | ||
| It will install all build dependencies then install ``scoring-matrices`` | ||
| either from a wheel if one is available, or from source after compiling the | ||
| Cython code : | ||
| .. code:: console | ||
| $ pip install --user scoring-matrices | ||
| Conda | ||
| ^^^^^ | ||
| `scoring-matrices` is also available as a `recipe <https://anaconda.org/bioconda/scoring-matrices>`_ | ||
| in the `bioconda <https://bioconda.github.io/>`_ channel. To install, simply | ||
| use the ``conda`` installer: | ||
| .. code:: console | ||
| $ conda install bioconda::scoring-matrices | ||
| Arch User Repository | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
| A package recipe for Arch Linux can be found in the Arch User Repository | ||
| under the name `python-scoring-matrices <https://aur.archlinux.org/packages/python-scoring-matrices>`_. | ||
| It will always match the latest release from PyPI. | ||
| Steps to install on ArchLinux depend on your `AUR helper <https://wiki.archlinux.org/title/AUR_helpers>`_ | ||
| (``yaourt``, ``aura``, ``yay``, etc.). For ``aura``, you'll need to run: | ||
| .. code:: console | ||
| $ aura -A python-scoring-matrices | ||
| Piwheels | ||
| ^^^^^^^^ | ||
| ``scoring-matrices`` is compatible with Raspberry Pi computers, and pre-built | ||
| wheels are compiled for `armv7l` platforms on `piwheels <https://www.piwheels.org>`_. | ||
| Run the following command to install these instead of compiling from source: | ||
| .. code:: console | ||
| $ pip3 install scoring-matrices --extra-index-url https://www.piwheels.org/simple | ||
| Check the `piwheels documentation <https://www.piwheels.org/faq.html>`_ for | ||
| more information. | ||
| GitHub + ``pip`` | ||
| ^^^^^^^^^^^^^^^^ | ||
| If, for any reason, you prefer to download the library from GitHub, you can clone | ||
| the repository and install the repository by running (with the admin rights): | ||
| .. code:: console | ||
| $ git clone --recursive https://github.com/althonos/scoring-matrices | ||
| $ pip install --user ./scoring-matrices | ||
| .. caution:: | ||
| Keep in mind this will install always try to install the latest commit, | ||
| which may not even build, so consider using a versioned release instead. | ||
| Matrices | ||
| ======== | ||
| .. currentmodule:: scoring_matrices | ||
| The following matrices are distributed with the ``scoring-matrices`` package | ||
| and can be loaded with `ScoringMatrix.from_name`: | ||
| 3DI | ||
| 3di structural alphabet scoring matrix used in Foldseek. | ||
| .. versionadded:: 0.3.1 | ||
| BENNER6, BENNER22, BENNER74 | ||
| Matrices proposed in Benner, Cohen and Gonnet (1994). | ||
| BLOSUM30, BLOSUM35, BLOSUM40, BLOSUM45, BLOSUM50, BLOSUM55, BLOSUM60, BLOSUM62, BLOSUM65, BLOSUM70, BLOSUM75, BLOSUM80, BLOSUM85, BLOSUM90, BLOSUM100, BLOSUMN | ||
| BLOcks SUbstitution Matrix series, computed by Henikoff (1992) from databases | ||
| of local alignments. BLOSUM62 is the default matrix used in the | ||
| BLAST algorithm. | ||
| DAYHOFF | ||
| An alias for the PAM-250 with additional B, Z, X and \* scores. | ||
| GONNET | ||
| PAM 250 matrix recommended by Gonnet, Cohen & Benner (1992). | ||
| NUC.4.4 | ||
| The extended DNA scoring matrix (sometimes also EDNAFULL) created by | ||
| Todd Lowe (1992). | ||
| PAM10, PAM20, PAM30, PAM40, PAM50, PAM60, PAM70, PAM80, PAM90, PAM100, PAM110, PAM120, PAM130, PAM140, PAM150, PAM160, PAM170, PAM180, PAM190, PAM200, PAM210, PAM220, PAM230, PAM240, PAM250, PAM260, PAM270, PAM280, PAM290, PAM300, PAM310, PAM320, PAM330, PAM340, PAM350, PAM360, PAM370, PAM380, PAM390, PAM400, PAM410, PAM420, PAM430, PAM440, PAM450, PAM460, PAM470, PAM480, PAM490, PAM500 | ||
| Point-Accepted Mutation matrix series computed by Dayhoff (1966). | ||
| VTML10, VTML20, VTML40, VTML80, VTML120, VTML160 | ||
| Matrices computed with the *resolvent method* developed by Müller and Vingron | ||
| to improve estimation of exchange frequencies. VTML80 is used by MMseqs2 | ||
| for the k-mer generation process. | ||
-146
| ``scoring-matrices`` |Stars| | ||
| ============================ | ||
| .. |Stars| image:: https://img.shields.io/github/stars/althonos/scoring-matrices.svg?style=social&maxAge=3600&label=Star | ||
| :target: https://github.com/althonos/scoring-matrices/stargazers | ||
| *Dependency free, Cython-compatible scoring matrices to use with biological sequences.* | ||
| |Actions| |Coverage| |PyPI| |Bioconda| |AUR| |Wheel| |Versions| |Implementations| |License| |Source| |Issues| |Docs| |Changelog| |Downloads| | ||
| .. |Actions| image:: https://img.shields.io/github/actions/workflow/status/althonos/scoring-matrices/test.yml?branch=main&logo=github&style=flat-square&maxAge=300 | ||
| :target: https://github.com/althonos/scoring-matrices/actions | ||
| .. |Coverage| image:: https://img.shields.io/codecov/c/gh/althonos/scoring-matrices?style=flat-square&maxAge=600 | ||
| :target: https://codecov.io/gh/althonos/scoring-matrices/ | ||
| .. |PyPI| image:: https://img.shields.io/pypi/v/scoring-matrices.svg?style=flat-square&maxAge=3600 | ||
| :target: https://pypi.python.org/pypi/scoring-matrices | ||
| .. |Bioconda| image:: https://img.shields.io/conda/vn/bioconda/scoring-matrices?style=flat-square&maxAge=3600 | ||
| :target: https://anaconda.org/bioconda/scoring-matrices | ||
| .. |AUR| image:: https://img.shields.io/aur/version/python-scoring-matrices?logo=archlinux&style=flat-square&maxAge=3600 | ||
| :target: https://aur.archlinux.org/packages/python-scoring-matrices | ||
| .. |Wheel| image:: https://img.shields.io/pypi/wheel/scoring-matrices?style=flat-square&maxAge=3600 | ||
| :target: https://pypi.org/project/scoring-matrices/#files | ||
| .. |Versions| image:: https://img.shields.io/pypi/pyversions/scoring-matrices.svg?style=flat-square&maxAge=3600 | ||
| :target: https://pypi.org/project/scoring-matrices/#files | ||
| .. |Implementations| image:: https://img.shields.io/pypi/implementation/scoring-matrices.svg?style=flat-square&maxAge=3600&label=impl | ||
| :target: https://pypi.org/project/scoring-matrices/#files | ||
| .. |License| image:: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square&maxAge=3600 | ||
| :target: https://choosealicense.com/licenses/mit/ | ||
| .. |Source| image:: https://img.shields.io/badge/source-GitHub-303030.svg?maxAge=2678400&style=flat-square | ||
| :target: https://github.com/althonos/scoring-matrices/ | ||
| .. |Issues| image:: https://img.shields.io/github/issues/althonos/scoring-matrices.svg?style=flat-square&maxAge=600 | ||
| :target: https://github.com/althonos/scoring-matrices/issues | ||
| .. |Docs| image:: https://img.shields.io/readthedocs/scoring-matrices?style=flat-square&maxAge=3600 | ||
| :target: http://scoring-matrices.readthedocs.io/en/stable/?badge=stable | ||
| .. |Changelog| image:: https://img.shields.io/badge/keep%20a-changelog-8A0707.svg?maxAge=2678400&style=flat-square | ||
| :target: https://github.com/althonos/scoring-matrices/blob/main/CHANGELOG.md | ||
| .. |Downloads| image:: https://img.shields.io/pypi/dm/scoring-matrices?style=flat-square&color=303f9f&maxAge=86400&label=downloads | ||
| :target: https://pepy.tech/project/scoring-matrices | ||
| .. currentmodule:: scoring_matrices | ||
| Overview | ||
| -------- | ||
| *Scoring Matrices* are matrices used to score the matches and mismatches between | ||
| two characters are the same position in a sequence alignment. Some of these | ||
| matrices are derived from *substitution matrices*, which uses evolutionary | ||
| modeling. | ||
| The ``scoring-matrices`` package is a dependency-free, batteries included | ||
| Cython library to handle and distribute common substitution matrices: | ||
| .. grid:: 1 2 3 3 | ||
| :gutter: 1 | ||
| .. grid-item-card:: :fas:`box` Self-contained | ||
| The matrices are distributed as-is: you don't need the whole | ||
| `Biopython <https://biopython.org>`_ ecosystem, or even | ||
| `NumPy <https://numpy.org/>`_. | ||
| .. grid-item-card:: :fas:`gears` Cython Support | ||
| The `ScoringMatrix` class is a Cython class that can be | ||
| inherited, and the matrix data can be accessed as either a raw pointer, or | ||
| a `typed memoryview <https://cython.readthedocs.io/en/latest/src/userguide/memoryviews.html>`_. | ||
| .. grid-item-card:: :fas:`battery-full` Batteries-included | ||
| The package distributes most common matrices, such as those used by | ||
| the NCBI BLAST+ suite, including: *PAM*, *BLOSUM*, *VTML*, *BENNER*, | ||
| etc. | ||
| .. grid-item-card:: :fas:`file-import` I/O Support | ||
| Easily load a `ScoringMatrix` from a file, a file-like object, or by | ||
| name for common matrices. | ||
| .. grid-item-card:: :fas:`screwdriver-wrench` Configurable | ||
| Easily build your own scoring matrices using the Python interface, | ||
| including various shortcut constructors to create a `ScoringMatrix` | ||
| from a diagonal or a pair of match/mismatch scores. | ||
| .. grid-item-card:: :fas:`stamp` Versioned | ||
| This library follows semantic versioning to guarantee compatibility | ||
| between patch versions, allowing for a safe API and ABI that can be | ||
| reused without recompiling on each install. | ||
| Setup | ||
| ----- | ||
| ``scoring-matrices`` is available for all modern Python versions (3.7+). | ||
| Run ``pip install scoring-matrices`` in a shell to download the latest release | ||
| from PyPi, or have a look at the :doc:`Installation page <guide/install>` to find | ||
| other ways to install the package. | ||
| Library | ||
| ------- | ||
| .. toctree:: | ||
| :maxdepth: 2 | ||
| User Guide <guide/index> | ||
| API Reference <api/index> | ||
| Related Projects | ||
| ---------------- | ||
| The following Python libraries may be of interest for bioinformaticians. | ||
| .. include:: related.rst | ||
| License | ||
| ------- | ||
| This library is provided under the `MIT License <https://choosealicense.com/licenses/mit/>`_. | ||
| Matrices were collected from the `MMseqs2 <https://github.com/soedinglab/MMseqs2>`_, | ||
| `Biopython <https://github.com/biopython/biopython/tree/master/Bio/Align/substitution_matrices/data>`_ | ||
| and `NCBI BLAST+ <https://ftp.ncbi.nih.gov/blast/matrices/>`_ sources and are believed to | ||
| be in the public domain. | ||
| *This project was developed by* `Martin Larralde <https://github.com/althonos/>`_ | ||
| *during his PhD project at the* `Leiden University Medical Center <https://www.lumc.nl/en/>`_ | ||
| *in the* `Zeller team <https://github.com/zellerlab>`_. |
| @ECHO OFF | ||
| pushd %~dp0 | ||
| REM Command file for Sphinx documentation | ||
| if "%SPHINXBUILD%" == "" ( | ||
| set SPHINXBUILD=sphinx-build | ||
| ) | ||
| set SOURCEDIR=. | ||
| set BUILDDIR=_build | ||
| %SPHINXBUILD% >NUL 2>NUL | ||
| if errorlevel 9009 ( | ||
| echo. | ||
| echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
| echo.installed, then set the SPHINXBUILD environment variable to point | ||
| echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
| echo.may add the Sphinx directory to PATH. | ||
| echo. | ||
| echo.If you don't have Sphinx installed, grab it from | ||
| echo.https://www.sphinx-doc.org/ | ||
| exit /b 1 | ||
| ) | ||
| if "%1" == "" goto help | ||
| %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
| goto end | ||
| :help | ||
| %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
| :end | ||
| popd |
| # Minimal makefile for Sphinx documentation | ||
| # | ||
| # You can set these variables from the command line, and also | ||
| # from the environment for the first two. | ||
| SPHINXOPTS ?= | ||
| SPHINXBUILD ?= sphinx-build | ||
| SOURCEDIR = . | ||
| BUILDDIR = _build | ||
| # Put it first so that "make" without argument is like "make help". | ||
| help: | ||
| @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
| .PHONY: help Makefile | ||
| # Catch-all target: route all unknown targets to Sphinx using the new | ||
| # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
| %: Makefile | ||
| @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
| # build dependencies | ||
| setuptools >=46.4 | ||
| cython ~=3.0 | ||
| # sphinx documentation dependencies | ||
| semantic_version ~=2.8 | ||
| sphinx >=5.0 | ||
| recommonmark ~=0.7 | ||
| pygments-style-monokailight ~=0.4 | ||
| ipython ~=7.19 | ||
| pygments ~=2.4 | ||
| nbsphinx ~=0.8 | ||
| sphinxcontrib-jquery ~=4.1 | ||
| sphinx-design | ||
| pydata-sphinx-theme |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
254805
-8.99%108
-11.48%324
-43.16%