INNER CODE UNIT · Python
_confidence_to_pp_string
TimoLassmann/kalign · python-kalign/__init__.py:138
def _confidence_to_pp_string(seq: str, confidences: list) -> str:
"""Convert per-residue confidence array to PP string."""
pp = []
for ch, conf in zip(seq, confidences):
if ch == "-" or ch == ".":
pp.append(".")
else:
pp.append(_conf_to_pp(conf))
return "".join(pp)
def _parse_refine_mode(refine):
"""Convert string or int refine mode to integer constant."""
if isinstance(refine, int):
return refine
refine_map = {
"none": REFINE_NONE,
"all": REFINE_ALL,