def calcQ30(table):
    """ Calculates percentage of reads >= Q30 from a dictionary in the format of quality:nSequences. """
    sumValues = sum(table.values())
    sumQ30 = 0
    for key, value in table.items():
        if int(key) >= 30:
            sumQ30 = sumQ30 + value
    GTQ30 = (sumQ30 / sumValues) * 100
    return (GTQ30)