coverage = (number of bases / length of genome) * 100

def genome_coverage(genomes, scaffold_coverage, total_bases):
	"""
	coverage = (number of bases / length of genome) * 100
	"""
	coverage = {}
	custom = {}
	std = {}
	for genome in genomes:
		for sequence in parse_fasta(genome):
			scaffold = sequence[0].split('>')[1].split()[0]
			coverage, std = sum_coverage(coverage, std, genome, scaffold, sequence, scaffold_coverage)
			custom = calc_custom(custom, genome, scaffold, sequence, scaffold_coverage, total_bases)
	std = calc_std(std)
	custom_std = calc_std(custom)
	custom_av = {}
	for genome in custom:
		custom_av[genome] = []
		for sample in custom[genome]:
			custom_av[genome].append(numpy.mean(sample))
	for genome in coverage:
		print('%s\t%s' % (genome, coverage[genome][0][1]))
	if total_bases is True:
		total_bases = calc_total_mapped_bases(coverage)
	absolute = absolute_abundance(coverage, total_bases)
	for genome in coverage:
		calculated = []
		for calc in coverage[genome]:
			calculated.append(calc[0] / calc[1])
		coverage[genome] = calculated
	relative = relative_abundance(coverage)
	return coverage, std, absolute, relative, custom_av, custom_std