def build_ssl_modified_sequence(seq, mods, ssl_mods):
	"""
	Build BiblioSpec SSL modified sequence string.

	Arguments:
	seq - peptide sequence
	mods - MS2PIP-formatted modifications
	ssl_mods - dict of name: mass shift strings

	create ssl_mods from MS2PIP params with:
	`ssl_mods = \
		{ptm.split(',')[0]:\
		"{:+.1f}".format(round(float(ptm.split(',')[1]),1))\
		for ptm in params['ptm']}`
	"""
	pep = list(seq)
	for loc, name in zip(mods.split('|')[::2], mods.split('|')[1::2]):
		# C-term mod
		if loc == '-1':
			pep[-1] = pep[-1] + '[{}]'.format(ssl_mods[name])
		# N-term mod
		elif loc == '0':
			pep[0] = pep[0] + '[{}]'.format(ssl_mods[name])
		# Normal mod
		else:
			pep[int(loc) - 1] = pep[int(loc) - 1] + '[{}]'.format(ssl_mods[name])
	return ''.join(pep)