Commit 4851db6e authored by Laros's avatar Laros
Browse files

Pep8.

parent b6668d61
......@@ -7,22 +7,18 @@ Copyright (c) 2015 Jeroen F.J. Laros <j.f.j.laros@lumc.nl>
Licensed under the MIT license, see the LICENSE file.
"""
from __future__ import (
absolute_import, division, print_function, unicode_literals)
from future.builtins import str, zip
__version_info__ = ('0', '0', '5')
__version_info__ = ('0', '1', '0')
__version__ = '.'.join(__version_info__)
__author__ = 'LUMC, Jeroen F.J. Laros'
__contact__ = 'J.F.J.Laros@lumc.nl'
__homepage__ = 'https://github.com/mutalyzer/backtranslate'
usage = __doc__.split("\n\n\n")
......
......@@ -58,7 +58,6 @@ class BackTranslate(object):
"""
self._back_table = reverse_translation_table(table_id)
def _one_subst(self, substitutions, reference_codon, amino_acid):
"""
Find single nucleotide substitutions that given a reference codon
......@@ -76,7 +75,6 @@ class BackTranslate(object):
substitutions[position].add(
(reference_codon[position], codon[position]))
def with_dna(self, reference_codon, amino_acid):
"""
Find single nucleotide substitutions that given a reference codon
......@@ -94,7 +92,6 @@ class BackTranslate(object):
return dict(substitutions)
def without_dna(self, reference_amino_acid, amino_acid):
"""
Find single nucleotide substitutions that given a reference amino acid
......@@ -113,7 +110,6 @@ class BackTranslate(object):
return dict(substitutions)
def improvable(self):
"""
Calculate all pairs of amino acid substututions that can be improved by
......
#!/usr/bin/env python
from __future__ import (
absolute_import, division, print_function, unicode_literals)
from future.builtins import str, zip
......
import os
from setuptools import setup
import sys
from setuptools import setup
package = 'backtranslate'
package_name = 'BackTranslate'
......
"""
Tests for the backtranslate.backtranslate module.
"""
from __future__ import (
absolute_import, division, print_function, unicode_literals)
from future.builtins import str, zip
......@@ -17,31 +15,26 @@ class TestParser(object):
def setup(self):
self.bt = BackTranslate()
def test_with_dna_1(self):
assert cmp_subst(
self.bt.with_dna('TGG', '*'),
{1: set([('G', 'A')]), 2: set([('G', 'A')])})
def test_with_dna_2(self):
assert cmp_subst(
self.bt.with_dna('GTA', 'L'),
{0: set([('G', 'C'), ('G', 'T')])})
def test_without_dna_1(self):
assert cmp_subst(
self.bt.without_dna('R', '*'),
{0: set([('C', 'T'), ('A', 'T')])})
def test_without_dna_2(self):
assert cmp_subst(
self.bt.without_dna('N', 'K'),
{2: set([('T', 'G'), ('C', 'A'), ('C', 'G'), ('T', 'A')])})
def test_without_dna_3(self):
assert cmp_subst(
self.bt.without_dna('R', 'S'), {
......
Markdown is supported
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