rstoolbox.components.get_selection

rstoolbox.components.get_selection(key_residues, seqID, shift=1, length=None)

Internal function; global management and casting of Selection.

Call this function in any function with the key_residues parameter. It will manage the type of input and return the appropiate list of selected residues.

Parameters:
  • key_residues (Union[int, list() of int, str, Selection]) – Residues of interest.
  • seqID (str) – Identifier of the sequence of interest.
  • shift (Union[int, list() of int]) – Starting residue number or per-residue number assignment.
  • length (int) – Length of the sequence over which it will be applied. Needed in case of inverted Selection.
Returns:

ndarray

Raises:
NotImplementedError:
 If key_residues is of a non-expected type.