Skip to content
Snippets Groups Projects
Commit b84edea0 authored by Rohmer Coralie's avatar Rohmer Coralie
Browse files

Fix empty graph

parent ccb3740e
Branches
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ data={}
attribute_max="a"
depths=[]
region_sizes=[]
empty_file=True
for file in files:
threshold=recovered_threshold(file)
with open(file, newline='') as csvfile:
......@@ -33,6 +34,7 @@ for file in files:
for i in range(len(row)):
titles[row[i]]=i
else:
empty_file=False
msa=row[titles["MSA"]]
region_size=row[titles["region_size"]]
depth=int(row[titles["depth"]])
......@@ -52,6 +54,7 @@ for file in files:
if attribute_max=="a" or val > attribute_max:
attribute_max=val
data[threshold][msa][region_size]["attribute"].append(val)
if empty_file == False :
depths=sort(depths)
region_sizes=sort(region_sizes)
min_depth=depths[0]
......@@ -89,3 +92,6 @@ for threshold in data:
pp.savefig(fig)
plt.close()
pp.close()
else:
pp = PdfPages(out)
pp.close()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment