from sequana import *
from pylab import linspace, plot, grid, xlabel, ylabel

b = BAM(sequana_data("measles.fa.sorted.bam"))
X = linspace(100,3000,1000)
plot(X, [b.get_estimate_insert_size(x) for x in X])
grid()
xlabel("Number of alignements used")
ylabel("Estimated insert size")