def flip_cost(variant, target_value):
	"""Returns cost of flipping the given read variant to target_value."""
	if variant.allele == target_value:
		return 0
	else:
		return min([x for x in variant.quality if x !=0])