tidytcells.aa

tidytcells.aa#

Functions to manage amino acid sequence data.

Functions

tidytcells.aa.standardise(*args, **kwargs)[source]#

Alias for tidytcells.aa.standardize().

tidytcells.aa.standardize(seq: str, on_fail: str = 'reject', suppress_warnings: bool = False)[source]#

Ensures that a string value looks like a valid amino acid sequence.

Parameters:
  • seq (str) – String value representing an amino acid sequence.

  • on_fail (str) – Behaviour when standardization fails. If set to "reject", returns None on failure. If set to "keep", returns the original input. Defaults to "reject".

  • suppress_warnings (bool) – Disable warnings that are usually emitted when standardisation fails. Defaults to False.

Returns:

Capitalised version of seq, if seq is a valid amino acid sequence. Otherwise follow behaviour set by on_fail.

Return type:

Union[str, None]