def convert_anchors_list_to_seq_edges(anchors, k=31):
	""" Given an anchors list where entries are (a,b) tuples 
		where a values are seq positions and b values are anchors
		(junctions or minimizers extened to kmers) of the seq,
		converts to list of edges where end-points are consecutive anchors
		and a third entry is a value implying the sequence between the anchors.
		If there is a gap between anchors, the value is the missing sequence as a
		string. If there is an overlap, the value is the length of overlap. If 
		the anchors are directly adjacent (i.e., the last character of the first
		is followed by the first character of the second), the value is 0.	
	"""
	edges_lst = []
	for pos in range(len(anchors)-1):
		start_anc = anchors[pos]
		end_anc = anchors[pos+1]
		overlap_len = -(end_anc[0] - (start_anc[0] + k - 1) - 1)
		# I think there is always either an overlap or direct
		# adjacency, otherwise part of seq isn't covered by a minimizer
		assert(overlap_len >= 0)
		# if overlap_len >= 0:
		edge_val = overlap_len
		
		edges_lst.append((start_anc[1], end_anc[1], edge_val))
	return edges_lst