Skip to content

Commit

Permalink
Merge pull request #470 from GavinHuttley/develop
Browse files Browse the repository at this point in the history
MAINT: removed duplicated function
  • Loading branch information
GavinHuttley committed Jan 7, 2020
2 parents 8d37d75 + 41cfe50 commit 2d7151f
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/cogent3/core/genetic_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,31 +420,6 @@ def changes(self, other):
DEFAULT = GeneticCodes[1]


def get_code(code_id):
"""returns the genetic code
Parameters
----------
code_id
genetic code identifier, name, number or string(number)
"""
if isinstance(code_id, GeneticCode):
return code_id

code = None
if str(code_id).isdigit():
code = GeneticCodes[code_id]
else:
for gc in GeneticCodes.values():
if gc.name == code_id:
code = gc

if code is None:
raise ValueError('No genetic code matching "%s"' % code_id)

return code


def get_code(code_id=1):
"""returns the genetic code
Expand Down

0 comments on commit 2d7151f

Please sign in to comment.