def gap_frequency(pileup):
    """returns the frequency of gaps (n. gaps divided by total number of reads, including N)"""
    tot_pileup = pileup.sum(axis=0)
    return tot_pileup[4] / tot_pileup.sum(axis=0)