Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
antgonza committed Aug 9, 2023
1 parent f183136 commit aa72f2a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qtp_biom/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,14 @@ def validate(qclient, job_id, parameters, out_dir):
tree = None
if 'plain_text' in files:
# first let's check if is a tgz, if it is, just pass the file
filename = files['plain_text'][0]
if is_tarfile(filename):
filepaths.append((files['plain_text'][0], 'plain_text'))
filepaths.append((filename, 'plain_text'))
else:
try:
tree = bp.parse_newick(open(phylogeny_fp).read())
tree = bp.parse_newick(open(filename).read())
tree = bp.to_skbio_treenode(tree)
filepaths.append((phylogeny_fp, 'plain_text'))
filepaths.append((filename, 'plain_text'))
except Exception:
return False, None, ("Phylogenetic tree cannot be parsed "
"via scikit-biom")
Expand Down

0 comments on commit aa72f2a

Please sign in to comment.