Skip to content

Commit

Permalink
dont print too much to screen
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosp420 committed Sep 3, 2015
1 parent 945bf99 commit 102f8c9
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions voseq/core/utils.py
Expand Up @@ -128,63 +128,63 @@ def flatten_taxon_names_dict(dictionary):
out = ''
try:
out += dictionary['code'] + "_"
except KeyError as e:
print("Converting to FASTA: no code for this obj. ".format(e))
except KeyError:
pass

try:
out += dictionary['orden'] + "_"
except KeyError as e:
print("Converting to FASTA: no orden for this obj. ".format(e))
except KeyError:
pass

try:
out += dictionary['superfamily'] + "_"
except KeyError as e:
print("Converting to FASTA: no superfamily for this obj. ".format(e))
except KeyError:
pass

try:
out += dictionary['family'] + "_"
except KeyError as e:
print("Converting to FASTA: no family for this obj. ".format(e))
except KeyError:
pass

try:
out += dictionary['subfamily'] + "_"
except KeyError as e:
print("Converting to FASTA: no subfamily for this obj. ".format(e))
except KeyError:
pass

try:
out += dictionary['tribe'] + "_"
except KeyError as e:
print("Converting to FASTA: no tribe for this obj. ".format(e))
except KeyError:
pass

try:
out += dictionary['subtribe'] + "_"
except KeyError as e:
print("Converting to FASTA: no subtribe for this obj. ".format(e))
except KeyError:
pass

try:
out += dictionary['genus'] + "_"
except KeyError as e:
print("Converting to FASTA: no genus for this obj. ".format(e))
except KeyError:
pass

try:
out += dictionary['species'] + "_"
except KeyError as e:
print("Converting to FASTA: no species for this obj. ".format(e))
except KeyError:
pass

try:
out += dictionary['subspecies'] + "_"
except KeyError as e:
print("Converting to FASTA: no subspecies for this obj. ".format(e))
except KeyError:
pass

try:
out += dictionary['author'] + "_"
except KeyError as e:
print("Converting to FASTA: no author for this obj. ".format(e))
except KeyError:
pass

try:
out += dictionary['hostorg'] + "_"
except KeyError as e:
print("Converting to FASTA: no hostorg for this obj. ".format(e))
except KeyError:
pass

out_striped = re.sub('_+', '_', out)
out_clean = re.sub('_$', '', out_striped)
Expand Down

0 comments on commit 102f8c9

Please sign in to comment.