comparison fsd.py @ 37:67e34fc2b67a draft

planemo upload for repository https://github.com/monikaheinzl/duplexanalysis_galaxy/tree/master/tools/fsd commit b8a2f7b7615b2bcd3b602027af31f4e677da94f6-dirty
author mheinzl
date Mon, 03 Jun 2019 07:26:01 -0400
parents 54ba0ad1263f
children 28fb192858ea
comparison
equal deleted inserted replaced
36:54ba0ad1263f 37:67e34fc2b67a
357 #print(new_y_heights) 357 #print(new_y_heights)
358 #print(new_y.shape) 358 #print(new_y.shape)
359 359
360 if to_plot[l] == "Relative frequencies": 360 if to_plot[l] == "Relative frequencies":
361 print("relative") 361 print("relative")
362 #new_y = list(numpy.concatenate((numpy.array([yi / float(numpy.sum(y)) for yi in y])))) 362 new_y = list(numpy.concatenate((numpy.array([yi / float(numpy.sum(y)) for yi in y]))))
363 363 counts2_rel = ax.bar(x, new_y, align="edge", width=w,
364 counts2_rel = ax.bar(x, list(numpy.float_(y)) / numpy.sum(y), align="edge", width=w,
365 edgecolor="black", label=label[i],linewidth=1, alpha=0.8, color=colors[i]) 364 edgecolor="black", label=label[i],linewidth=1, alpha=0.8, color=colors[i])
366 365
367 else: 366 else:
368 y = list(y.reshape((len(y)))) 367 y = list(y.reshape((len(y))))
369
370 counts2 = ax.bar(x, y, align="edge", width=w, edgecolor="black", label=label[i], linewidth=1, 368 counts2 = ax.bar(x, y, align="edge", width=w, edgecolor="black", label=label[i], linewidth=1,
371 alpha=0.8, color=colors[i]) 369 alpha=0.8, color=colors[i])
372 if i == len(list_to_plot2): 370 if i == len(list_to_plot2):
373 barWidth += 1. / (len(list_to_plot) + 1) + 1. / (len(list_to_plot) + 1) 371 barWidth += 1. / (len(list_to_plot) + 1) + 1. / (len(list_to_plot) + 1)
374 else: 372 else: