import statistics


def coverageCalc(coverageList,minCov):

        """Function parsing coverageList for


        :param coverageList: List of pacbam coverage information
        :param minCov: Int of minimum passing coverage
        :return:
                covCount: Int of bases with coverage
                minCovCount: Int of bases with minimum coverage
                meanDepth: Int mean coverage stat
        """

        covCount = 0
        minCovCount = 0
        meanDepth = statistics.mean(coverageList)

        for i in coverageList:
                if i != 0:
                        covCount +=1
                if i >= minCov:
                        minCovCount +=1


        return(covCount,minCovCount,round(meanDepth,2))