Mercurial > repos > mheinzl > fsd
comparison fsd.py @ 33:55c7e49eea88 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:02:48 -0400 |
parents | 5e1450eda945 |
children | faa56fbf6b32 |
comparison
equal
deleted
inserted
replaced
32:5e1450eda945 | 33:55c7e49eea88 |
---|---|
341 #print(label[i]) | 341 #print(label[i]) |
342 #print(colors[i]) | 342 #print(colors[i]) |
343 #print(w) | 343 #print(w) |
344 # linewidth=1, | 344 # linewidth=1, |
345 | 345 |
346 print(numpy.sum(y)) | 346 #print(numpy.sum(y)) |
347 print(float(numpy.sum(y))) | 347 #print(float(numpy.sum(y))) |
348 print(x) | 348 #print(x) |
349 new_y = numpy.concatenate((numpy.array([yi / float(numpy.sum(y)) for yi in y]))) | 349 #print(new_y.shape) |
350 print(new_y.shape) | 350 #new_y = numpy.array(new_y).reshape((len(new_y))) |
351 new_y = numpy.array(new_y).reshape((len(new_y))) | 351 #print(new_y.shape) |
352 print(new_y.shape) | 352 #print(new_y) |
353 print(new_y) | 353 |
354 | |
354 | 355 |
355 #new_y_heights = [x[0] for x in new_y] | 356 #new_y_heights = [x[0] for x in new_y] |
356 #print(new_y_heights) | 357 #print(new_y_heights) |
357 #print(new_y.shape) | 358 #print(new_y.shape) |
358 | 359 |
359 if to_plot[l] == "Relative frequencies": | 360 if to_plot[l] == "Relative frequencies": |
361 print("relative") | |
362 new_y = list(numpy.concatenate((numpy.array([yi / float(numpy.sum(y)) for yi in y])))) | |
363 | |
360 counts2_rel = ax.bar(x, new_y, align="edge", width=w, | 364 counts2_rel = ax.bar(x, new_y, align="edge", width=w, |
361 edgecolor="black", label=label[i], alpha=0.8, color=colors[i]) | 365 edgecolor="black", label=label[i], alpha=0.8, color=colors[i]) |
362 | 366 |
363 else: | 367 else: |
368 y = list(y) | |
364 counts2 = ax.bar(x, y, align="edge", width=w, edgecolor="black", label=label[i], | 369 counts2 = ax.bar(x, y, align="edge", width=w, edgecolor="black", label=label[i], |
365 alpha=0.8, color=colors[i]) | 370 alpha=0.8, color=colors[i]) |
366 if i == len(list_to_plot2): | 371 if i == len(list_to_plot2): |
367 barWidth += 1. / (len(list_to_plot) + 1) + 1. / (len(list_to_plot) + 1) | 372 barWidth += 1. / (len(list_to_plot) + 1) + 1. / (len(list_to_plot) + 1) |
368 else: | 373 else: |