Metadata-Version: 2.4
Name: mutalyzer_backtranslate
Version: 1.0.1
Summary: Functions for reverse translation.
Author-email: "LUMC, Jeroen F.J. Laros" <J.F.J.Laros@lumc.nl>
License-Expression: MIT
Project-URL: Homepage, https://github.com/mutalyzer/backtranslate
Keywords: bioinformatics
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE.md
Requires-Dist: biopython>=1.76
Requires-Dist: python-Levenshtein>=0.12.0
Provides-Extra: dev
Requires-Dist: build>=1.6.1; extra == "dev"
Requires-Dist: fake-open>=0.0.1; extra == "dev"
Requires-Dist: flake8>=7.4.1; extra == "dev"
Requires-Dist: pytest-cov>=2.10.0; extra == "dev"
Requires-Dist: pytest>=4.0.1; extra == "dev"
Requires-Dist: twine>=7.0.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx-autodoc-argparse>=0.0.1a26; extra == "docs"
Requires-Dist: sphinx-autodoc-sphinx>=0.0.1a26; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints>=3.10.3; extra == "docs"
Requires-Dist: sphinx_rtd_theme>=3.1.0; extra == "docs"
Requires-Dist: typing_extensions>=4.15.0; extra == "docs"
Dynamic: license-file

Back translation
================

.. image:: https://img.shields.io/github/last-commit/mutalyzer/backtranslate.svg
   :target: https://github.com/mutalyzer/backtranslate/graphs/commit-activity
.. image:: https://github.com/mutalyzer/backtranslate/actions/workflows/python-package.yml/badge.svg
   :target: https://github.com/mutalyzer/backtranslate/actions/workflows/python-package.yml
.. image:: https://readthedocs.org/projects/mutalyzer-backtranslate/badge/?version=latest
   :target: https://mutalyzer-backtranslate.readthedocs.io/en/latest
.. image:: https://img.shields.io/github/release-date/mutalyzer/backtranslate.svg
   :target: https://github.com/mutalyzer/backtranslate/releases
.. image:: https://img.shields.io/github/release/mutalyzer/backtranslate.svg
   :target: https://github.com/mutalyzer/backtranslate/releases
.. image:: https://img.shields.io/pypi/v/mutalyzer-backtranslate.svg
   :target: https://pypi.org/project/mutalyzer-backtranslate/
.. image:: https://img.shields.io/github/languages/code-size/mutalyzer/backtranslate.svg
   :target: https://github.com/mutalyzer/backtranslate
.. image:: https://img.shields.io/github/languages/count/mutalyzer/backtranslate.svg
   :target: https://github.com/mutalyzer/backtranslate
.. image:: https://img.shields.io/github/languages/top/mutalyzer/backtranslate.svg
   :target: https://github.com/mutalyzer/backtranslate
.. image:: https://img.shields.io/github/license/mutalyzer/backtranslate.svg
   :target: https://raw.githubusercontent.com/mutalyzer/backtranslate/master/LICENSE.md

----

This library provides functions for back translation of amino acid changes to
nucleotide changes.

**Features:**

- Support for all known codon tables.
- Back translation of amino acid changes using codon reference information.
- Back translation of amino acid changes using amino acid reference
  information.
- Function to determine all amino acid substitutions of which the back
  translation can be improved by adding codon information.

Please see ReadTheDocs_ for the latest documentation.


Quick start
-----------

The ``BackTranslate`` class provides functionality for back translation.

.. code:: python

    >>> from mutalyzer_backtranslate import BackTranslate
    >>> bt = BackTranslate()

An amino acid change from a Leucine to a Phenylalanine can be explained by five
substitutions.

.. code:: python

    >>> bt.without_dna('L', 'F')
    {2: {('A', 'T'), ('A', 'C'), ('G', 'C'), ('G', 'T')}, 0: {('C', 'T')}}

If codon information is present, the same substitution can only be explained by
one substitution.

.. code:: python

    >>> bt.with_dna('CTT', 'F')
    {0: {('C', 'T')}}


.. _ReadTheDocs: https://mutalyzer-backtranslate.readthedocs.io
