Skip to content

Commit 61996f0

Browse files
author
Jon Palmer
committed
initialize tree for xml
1 parent f752993 commit 61996f0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

funannotate/aux_scripts/iprscan-local.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ def combine_xml(files, output):
4747
first = data
4848
else:
4949
first.extend(data.getchildren())
50-
tree._setroot(first)
50+
#generate new tree
51+
tree = et.ElementTree()
52+
tree._setroot(first)
5153
et.register_namespace("", "http://www.ebi.ac.uk/interpro/resources/schemas/interproscan5")
5254
tree.write(output, encoding='utf-8', xml_declaration=True)
5355

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

0 commit comments

Comments
 (0)