def length_histogram(fqin, name):
'''
Create a histogram, and return the bin edges of the bin containing the most reads
'''
logging.info("Creating length histogram to find bin with most reads.")
lengths = get_lengths(fqin)
plt.hist(lengths, bins='auto')
plt.savefig(name, format='png', dpi=100)
plt.close("all")
hist, bin_edges = np.histogram(lengths, bins='auto')
maxindex = np.argmax(hist)
return (bin_edges[maxindex], bin_edges[maxindex + 1])
评论列表
文章目录