Commit bf794882 authored by Jeroen F.J. Laros's avatar Jeroen F.J. Laros
Browse files

Updated README.

parent 74a5eee0
...@@ -3,9 +3,9 @@ This library provides functions for back translation from amino acids to ...@@ -3,9 +3,9 @@ This library provides functions for back translation from amino acids to
nucleotides. nucleotides.
>>> from __future__ import unicode_literals >>> from __future__ import unicode_literals
>>>
>>> from backtranslate.backtranslate import BackTranslate >>> from backtranslate.backtranslate import BackTranslate
>>>
>>> # Create a class instance, optionally giving the translation table id. >>> # Create a class instance, optionally giving the translation table id.
>>> bt = BackTranslate() >>> bt = BackTranslate()
>>> # Find all substitutions that transform the codon 'TTG' into a stop >>> # Find all substitutions that transform the codon 'TTG' into a stop
...@@ -35,8 +35,9 @@ information, use the following function. ...@@ -35,8 +35,9 @@ information, use the following function.
To get substitutions in a readable format, we can use the following: To get substitutions in a readable format, we can use the following:
>>> from backtranslate.util import subst_to_cds >>> from backtranslate.util import subst_to_cds
>>>
>>> substitutions = bt.without_dna('W', '*') >>> substitutions = bt.without_dna('W', '*')
>>>
>>> # Transform the substitutions to CDS coordinates. >>> # Transform the substitutions to CDS coordinates.
>>> subst_to_cds(substitutions, 12) >>> subst_to_cds(substitutions, 12)
set([(15, 'G', 'A'), (14, 'G', 'A')]) set([(15, 'G', 'A'), (14, 'G', 'A')])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment