Skip to content

Commit 3a3b950

Browse files
authored
fix: export all rootHOGs
1 parent f0efd93 commit 3a3b950

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

utils/pickle2orthoxml.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@
2525
input_pickle= sys.argv[2] # "file_D0680685.pickle"
2626
handle=open(input_pickle,'rb')
2727
orthoxml_file = pickle.load(handle)
28-
29-
print(len(orthoxml_file))
30-
xml_str = minidom.parseString(ET.tostring(orthoxml_file[0])).toprettyxml(indent=" ")
28+
29+
print(len(orthoxml_file)) # this should be the number of rootHOGs, perhaps dup at root
30+
xml_str = ""
31+
for item in orthoxml_file:
32+
xml_str += minidom.parseString(ET.tostring(item)).toprettyxml(indent=" ")
33+
xml_str += "\n"
3134

3235
with open(input_pickle+"_noheader.orthoxml","w") as out_file:
3336
out_file.write(xml_str)

0 commit comments

Comments
 (0)