Mercurial > repos > mheinzl > hd
comparison hd.py @ 31:8beced3064e3 draft
planemo upload for repository https://github.com/monikaheinzl/duplexanalysis_galaxy/tree/master/tools/hd commit 033dd7b750f68e8aa68f327d7d72bd311ddbee4e-dirty
author | mheinzl |
---|---|
date | Wed, 14 Aug 2019 03:49:32 -0400 |
parents | 46bfbec0f9e6 |
children | b432cfa895ee |
comparison
equal
deleted
inserted
replaced
30:46bfbec0f9e6 | 31:8beced3064e3 |
---|---|
238 else: | 238 else: |
239 legend = "nr. of tags = {:,}\nsample size = {:,}\nnr. of data points = {:,}".format( | 239 legend = "nr. of tags = {:,}\nsample size = {:,}\nnr. of data points = {:,}".format( |
240 lenTags, len_sample, len(numpy.concatenate(list1))) | 240 lenTags, len_sample, len(numpy.concatenate(list1))) |
241 plt.text(0.14, -0.07, legend, size=12, transform=plt.gcf().transFigure) | 241 plt.text(0.14, -0.07, legend, size=12, transform=plt.gcf().transFigure) |
242 | 242 |
243 legend2 = "SSCS ab = {:,}\nSSCS ba = {:,}\nDCS = {:,}".format(len(list1[1]), len(list1[2]), len(list1[0])) | 243 legend2 = "SSCS ab = {:,} ({:.5f})\nSSCS ba = {:,} ({:.5f})\nDCS = {:,} ({:.5f})".format( |
244 len(list1[1]), len(list1[1]) / float(nr_unique_chimeras), | |
245 len(list1[2]), len(list1[2]) / float(nr_unique_chimeras), | |
246 len(list1[0]), len(list1[0]) / float(nr_unique_chimeras)) | |
244 plt.text(0.6, -0.047, legend2, size=12, transform=plt.gcf().transFigure) | 247 plt.text(0.6, -0.047, legend2, size=12, transform=plt.gcf().transFigure) |
245 | 248 |
246 pdf.savefig(fig, bbox_inches="tight") | 249 pdf.savefig(fig, bbox_inches="tight") |
247 plt.close("all") | 250 plt.close("all") |
248 plt.clf() | 251 plt.clf() |
1135 | 1138 |
1136 sample_half_a = tag1[0:(len(tag1)) / 2] | 1139 sample_half_a = tag1[0:(len(tag1)) / 2] |
1137 sample_half_b = tag1[len(tag1) / 2:len(tag1)] | 1140 sample_half_b = tag1[len(tag1) / 2:len(tag1)] |
1138 | 1141 |
1139 max_tags = data_chimeraAnalysis[i, 1] | 1142 max_tags = data_chimeraAnalysis[i, 1] |
1140 if len(max_tags) > 1 and type(max_tags) is not numpy.ndarray: | 1143 if len(max_tags) > 1 and len(max_tags) != len(data_chimeraAnalysis[0, 1]) and type(max_tags) is not numpy.ndarray : |
1141 max_tags = numpy.concatenate(max_tags) | 1144 max_tags = numpy.concatenate(max_tags) |
1142 max_tags = numpy.unique(max_tags) | 1145 max_tags = numpy.unique(max_tags) |
1143 stat_maxTags.append(len(max_tags)) | 1146 stat_maxTags.append(len(max_tags)) |
1144 | 1147 |
1145 info_maxTags = [data_array[data_array[:, 1] == t, :] for t in max_tags] | 1148 info_maxTags = [data_array[data_array[:, 1] == t, :] for t in max_tags] |