comparison venn_diagram.py @ 3:1645a66fd0ee draft

planemo upload commit c599cfc156c77626df2b674bdfbd437b9f664ab9
author proteore
date Thu, 13 Dec 2018 04:19:23 -0500
parents 5ac986568a3d
children c3bbc688dde2
comparison
equal deleted inserted replaced
2:5ac986568a3d 3:1645a66fd0ee
106 106
107 return result 107 return result
108 108
109 #Write intersections of input to text output file 109 #Write intersections of input to text output file
110 def write_text_venn(json_result): 110 def write_text_venn(json_result):
111 output = open("venn_diagram_text_output.tsv", "w")
112 lines = [] 111 lines = []
113 result = dict((k, v) for k, v in json_result["data"].iteritems() if v != []) 112 result = dict((k, v) for k, v in json_result["data"].iteritems() if v != [])
114 for key in result : 113 for key in result :
115 if 'NA' in result[key] : result[key].remove("NA") 114 if 'NA' in result[key] : result[key].remove("NA")
116 list_names = dict((k, v) for k, v in json_result["name"].iteritems() if v != []) 115 list_names = dict((k, v) for k, v in json_result["name"].iteritems() if v != [])