def getChrmEnds(chrm_end_file):
	"""
	Creates a map from chomosome number to the length of the chromosome
	from the provided file.
	"""

	f = open(chrm_end_file)
	lines = f.readlines()
	f.close()

	chrm_ends = dict()

	for l in lines:

		#skip header
		if l.startswith("#"):
			continue

		line = l.strip().replace(" ","\t").split("\t")
		chrm = int(line[1])
		end = int(line[3])
		chrm_ends.update({chrm:end})

	return chrm_ends