# Back translation This library provides functions for back translation from amino acids to nucleotides.
from __future__ import unicode_literals
from backtranslate.backtranslate import BackTranslate
# Create a class instance, optionally giving the translation table id. bt = BackTranslate() # Find all substitutions that transform the codon ‘TTG’ into a stop codon. substitutions = bt.with_dna(‘TGG’, ‘*’)
Sometimes we do not have access to the DNA sequence so we have to find possible substitutions from the amino acids directly.
# Find all substitutions that transform a Tryptophan into a stop codon. substitutions = bt.without_dna(‘W’, ‘*’)
To find out which substitution predictions can be improved by adding codon information, use the following function.
bt.improvable()
To get substitutions in a readable format, we can use the following:
from backtranslate.util import subst_to_cds
# Transform the substitutions to CDS coordinates. variants = subst_to_cds(substitutions, 12)
## Command line interface Use the command backtranslate to find substitutions that explain an amino acid change:
$ backtranslate with_dna -o 210 data/mhv.fa - 1 Leu 1 A C 1 A T
If no reference is available, use the without_dna subcommand:
$ backtranslate without_dna - Asp 92 Tyr 274 G T
The command find_stops finds a list of positions and substitutions that lead to stop codons. This list of destructive substitutions are useful when analysing a pool of viral transcripts. Counting the appropriate nucleotides at the given positions gives insight into how many transcripts are active.
$ backtranslate find_stops -o 210 data/mhv.fa - 216 A T 225 A T 230 C A 230 C G 243 A T …
Metadata
Release files for backtranslate 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| BackTranslate-0.0.5.tar.gz | 5.5 kB | Without provenance | Details |
Release files / BackTranslate-0.0.5.tar.gz
| Download URL | BackTranslate-0.0.5.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf9c281e3a61dee1aa39be0e95a4a0d90181bd092a4dc2133373a49dcbbefc4f
|
|
BLAKE2b-256 checksum How to use checksums |
66b568c9b5c5d17711221d574d7699c6b56f1c33ff87dce9d95a71e781c7be99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for backtranslate 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.