casanovoutils.residues#

Utilities for loading and distributing the amino acid residue mass vocabulary.

Attributes#

Functions#

get_residues(→ dict[str, float])

Load a mapping of amino acid residue names to masses from a YAML file.

dump_residues(→ None)

Copy the default residues.yaml file included with this package to a

main(→ None)

Module Contents#

casanovoutils.residues.get_residues(residues_path: os.PathLike | None = None) dict[str, float]#

Load a mapping of amino acid residue names to masses from a YAML file.

If residues_path is not provided, the function loads a default residues.yaml file located in the same directory as this module.

Parameters:

residues_path (PathLike, optional) – Path to a YAML file containing residue mass information. If None (default), the bundled residues.yaml file is used.

Returns:

A dictionary mapping residue identifiers (typically one-letter or multi-character amino acid codes) to their corresponding masses.

Return type:

dict[str, float]

casanovoutils.residues.dump_residues(destination_path: os.PathLike) None#

Copy the default residues.yaml file included with this package to a specified destination.

Parameters:

destination_path (PathLike) – Path to copy the YAML file to. May be a directory or a file path.

Return type:

None

casanovoutils.residues.COMMANDS: casanovoutils.types.Commands#
casanovoutils.residues.main() None#