README.rst 2.6 KB
Newer Older
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
1
2
3
Back translation
================

Jeroen F.J. Laros's avatar
Typo.    
Jeroen F.J. Laros committed
4
5
.. image:: https://img.shields.io/github/last-commit/mutalyzer/backtranslate.svg
   :target: https://github.com/mutalyzer/backtranslate/graphs/commit-activity
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
6
7
.. image:: https://travis-ci.org/mutalyzer/backtranslate.svg?branch=master
   :target: https://travis-ci.org/mutalyzer/backtranslate
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
8
9
.. image:: https://readthedocs.org/projects/mutalyzer-backtranslate/badge/?version=latest
   :target: https://mutalyzer-backtranslate.readthedocs.io/en/latest
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
10
11
12
13
.. 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
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
14
15
.. image:: https://img.shields.io/pypi/v/mutalyzer-backtranslate.svg
   :target: https://pypi.org/project/mutalyzer-backtranslate/
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
16
17
18
19
20
21
22
23
24
25
26
.. 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

----

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
27
28
29
30
31
32
33
34
35
36
37
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.
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
38
39
40
41

Please see ReadTheDocs_ for the latest documentation.


Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
Jeroen F.J. Laros's avatar
Typo.    
Jeroen F.J. Laros committed
56

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
57
58
59
60
61
62
63
64
65
66
67
68
    >>> 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')}}


Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
69
.. _ReadTheDocs: https://mutalyzer-backtranslate.readthedocs.io