Fix and simplify allele-specific stats calculation
Fix and simplify allele-specific stats calculation

pysam.PileupColumn.get_query_sequences() cannot be used reliably
with high coverage input data since it allocates a buffer of fixed
and possibly insufficient size, and guards against a buffer
overflow only by throwing an AssertionError. The patch in this
changeset bypasses the call to get_query_sequences by extracting
bases from the piled-up reads one by one. Accidentally this also
leads to clearer code.

loraine-gueguen/tools-iuc,nekrut/tools-iuc,abretaud/tools-iuc,pavanvidem/tools-iuc,nsoranzo/tools-iuc,mvdbeek/tools-iuc,mblue9/tools-iuc,davebx/tools-iuc,mvdbeek/tools-iuc,mvdbeek/tools-iuc,nekrut/tools-iuc,mblue9/tools-iuc,pjbriggs/tools-iuc,nsoranzo/tools-iuc,nsoranzo/tools-iuc,mblue9/tools-iuc,ieguinoa/tools-iuc,loraine-gueguen/tools-iuc,nekrut/tools-iuc,gvlproject/tools-iuc,gregvonkuster/tools-iuc,blankenberg/tools-iuc,loraine-gueguen/tools-iuc,pjbriggs/tools-iuc,davebx/tools-iuc,lparsons/tools-iuc,mvdbeek/tools-iuc,nsoranzo/tools-iuc,lparsons/tools-iuc,jj-umn/tools-iuc,Delphine-L/tools-iuc,abretaud/tools-iuc,pjbriggs/tools-iuc,Delphine-L/tools-iuc,mblue9/tools-iuc,blankenberg/tools-iuc,gvlproject/tools-iuc,gregvonkuster/tools-iuc,nsoranzo/tools-iuc,jj-umn/tools-iuc,blankenberg/tools-iuc,gvlproject/tools-iuc,nsoranzo/tools-iuc,loraine-gueguen/tools-iuc,pavanvidem/tools-iuc,pavanvidem/tools-iuc,mblue9/tools-iuc,gregvonkuster/tools-iuc,gvlproject/tools-iuc,natefoo/tools-iuc,blankenberg/tools-iuc,gregvonkuster/tools-iuc,gregvonkuster/tools-iuc,mvdbeek/tools-iuc,ieguinoa/tools-iuc,loraine-gueguen/tools-iuc,Delphine-L/tools-iuc,natefoo/tools-iuc,blankenberg/tools-iuc,natefoo/tools-iuc,abretaud/tools-iuc,abretaud/tools-iuc,natefoo/tools-iuc,ieguinoa/tools-iuc,Delphine-L/tools-iuc,galaxyproject/tools-iuc,davebx/tools-iuc,blankenberg/tools-iuc,gregvonkuster/tools-iuc,mblue9/tools-iuc,lparsons/tools-iuc,jj-umn/tools-iuc,mvdbeek/tools-iuc,loraine-gueguen/tools-iuc,abretaud/tools-iuc,galaxyproject/tools-iuc,galaxyproject/tools-iuc,Delphine-L/tools-iuc,davebx/tools-iuc,pavanvidem/tools-iuc,ieguinoa/tools-iuc,abretaud/tools-iuc,natefoo/tools-iuc,ieguinoa/tools-iuc,jj-umn/tools-iuc,galaxyproject/tools-iuc,lparsons/tools-iuc,Delphine-L/tools-iuc,pavanvidem/tools-iuc,natefoo/tools-iuc,davebx/tools-iuc,gvlproject/tools-iuc,mvdbeek/tools-iuc,gregvonkuster/tools-iuc,galaxyproject/tools-iuc,galaxyproject/tools-iuc,pjbriggs/tools-iuc,davebx/tools-iuc,blankenberg/tools-iuc,lparsons/tools-iuc,nekrut/tools-iuc,nekrut/tools-iuc,pavanvidem/tools-iuc,Delphine-L/tools-iuc,lparsons/tools-iuc,ieguinoa/tools-iuc,davebx/tools-iuc,galaxyproject/tools-iuc,martenson/tools-iuc,pavanvidem/tools-iuc,pjbriggs/tools-iuc,pjbriggs/tools-iuc,ieguinoa/tools-iuc,natefoo/tools-iuc,nekrut/tools-iuc,gvlproject/tools-iuc,nsoranzo/tools-iuc,abretaud/tools-iuc,loraine-gueguen/tools-iuc,jj-umn/tools-iuc,nekrut/tools-iuc,jj-umn/tools-iuc,jj-umn/tools-iuc