Skip to content

Commit

Permalink
initialize tree for xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Palmer committed Feb 21, 2020
1 parent f752993 commit 61996f0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions funannotate/aux_scripts/iprscan-local.py
Expand Up @@ -47,7 +47,9 @@ def combine_xml(files, output):
first = data
else:
first.extend(data.getchildren())
tree._setroot(first)
#generate new tree
tree = et.ElementTree()
tree._setroot(first)
et.register_namespace("", "http://www.ebi.ac.uk/interpro/resources/schemas/interproscan5")
tree.write(output, encoding='utf-8', xml_declaration=True)

Expand Down Expand Up @@ -370,8 +372,8 @@ def runMultiProgress(function, inputList, cpus):
if doublecheck:
# check output file, if present and not empty, then delete temporary directory
if not args.debug:
if os.path.isfile(finalOut):
shutil.rmtree(tmpdir)
if os.path.isfile(finalOut):
shutil.rmtree(tmpdir)
print('InterProScan5 search has completed successfully!')
print('Results are here: %s' % finalOut)
else:
Expand Down

0 comments on commit 61996f0

Please sign in to comment.