def string_mask(s, q, qmin):
	"""
	mask low-quality letters within a string
	
	Arguments
	----------
	s: the original string
	q: the base quality 
	qmin: the minimum quality score allowed
	
	Returns
	----------
	the revised string with all low-quality letters (<qmin) being changed to "N"
	
	"""
	#using "N"
	return "".join([(i if j >= qmin else "N") for i,j in zip(s, q)])