comparison fsd_regions.py @ 13:63432e6f6a61 draft

planemo upload for repository https://github.com/monikaheinzl/duplexanalysis_galaxy/tree/master/tools/fsd_regions commit edbe0509294e5c23c26cdae659ce5cf3ff69c363
author mheinzl
date Fri, 07 Dec 2018 07:23:07 -0500
parents 37db9decb5d0
children 6879295d3f11
comparison
equal deleted inserted replaced
12:fa3ff1c5280d 13:63432e6f6a61
199 199
200 legend = "BA\n{}\n{}\n{:.5f}" \ 200 legend = "BA\n{}\n{}\n{:.5f}" \
201 .format(max(map(int, quant_ba)), count2[len(count2) - 1], float(count2[len(count2) - 1]) / sum(count2)) 201 .format(max(map(int, quant_ba)), count2[len(count2) - 1], float(count2[len(count2) - 1]) / sum(count2))
202 plt.text(0.45, 0.1475, legend, size=11, transform=plt.gcf().transFigure) 202 plt.text(0.45, 0.1475, legend, size=11, transform=plt.gcf().transFigure)
203 203
204 plt.text(0.55, 0.2125, "total nr. of tags:", size=11, transform=plt.gcf().transFigure) 204 plt.text(0.53, 0.2125, "total nr. of tags:", size=11, transform=plt.gcf().transFigure)
205 plt.text(0.8, 0.2125, "{:,} ({:,})".format(length_regions, length_regions / 2), size=11, 205 plt.text(0.85, 0.2125, "{:,} ({:,})".format(length_regions, length_regions / 2), size=11,
206 transform=plt.gcf().transFigure) 206 transform=plt.gcf().transFigure)
207 207
208 legend4 = "* In the plot, both family sizes of the ab and ba strands were used.\nWhereas the total numbers indicate only the single count of the tags per region.\n" 208 legend4 = "* In the plot, both family sizes of the ab and ba strands were used.\nWhereas the total numbers indicate only the single count of the tags per region.\n"
209 plt.text(0.1, 0.01, legend4, size=11, transform=plt.gcf().transFigure) 209 plt.text(0.1, 0.01, legend4, size=11, transform=plt.gcf().transFigure)
210 210
211 space = 0 211 space = 0
212 for i, count in zip(group, quantAfterRegion): 212 for i, count in zip(group, quantAfterRegion):
213 plt.text(0.55, 0.15 - space, "{}:\n".format(i), size=11, transform=plt.gcf().transFigure) 213 plt.text(0.53, 0.15 - space, "{}:\n".format(i), size=11, transform=plt.gcf().transFigure)
214 plt.text(0.8, 0.15 - space, "{:,}\n".format(len(count) / 2), size=11, transform=plt.gcf().transFigure) 214 plt.text(0.85, 0.15 - space, "{:,}\n".format(len(count) / 2), size=11, transform=plt.gcf().transFigure)
215 space = space + 0.02 215 space = space + 0.02
216 216
217 plt.legend(loc='upper right', fontsize=14, bbox_to_anchor=(0.9, 1), frameon=True) 217 plt.legend(loc='upper right', fontsize=14, bbox_to_anchor=(0.9, 1), frameon=True)
218 plt.xlabel("Family size", fontsize=14) 218 plt.xlabel("Family size", fontsize=14)
219 plt.ylabel("Absolute Frequency", fontsize=14) 219 plt.ylabel("Absolute Frequency", fontsize=14)