MCPcopy Create free account
hub / github.com/BioinfoMachineLearning/FlowDock / res_1to3

Function res_1to3

flowdock/utils/visualization_utils.py:52–59  ·  view source on GitHub ↗

Convert a residue type from 1-letter to 3-letter code. :param restypes: List of residue types. :param r: Residue type index. :return: 3-letter code as a string.

(restypes: List[str], r: Union[int, np.int64])

Source from the content-addressed store, hash-verified

50
51@beartype
52def res_1to3(restypes: List[str], r: Union[int, np.int64]) -> str:
53 """Convert a residue type from 1-letter to 3-letter code.
54
55 :param restypes: List of residue types.
56 :param r: Residue type index.
57 :return: 3-letter code as a string.
58 """
59 return residue_constants.restype_1to3.get(restypes[r], "UNK")
60
61
62@beartype

Callers 1

to_pdbFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected