ngs_tools.chemistry

Submodules

Package Contents

Functions

_clean_name(→ Tuple[str, Optional[int]])

Internal helper function to clean chemistry names.

get_chemistry(→ Chemistry.Chemistry)

Fetch a Chemistry definition by name. Uses some regex magic to

Attributes

VERSION_PARSER

CHEMISTRIES

ngs_tools.chemistry.VERSION_PARSER
ngs_tools.chemistry.CHEMISTRIES
ngs_tools.chemistry._clean_name(name: str) Tuple[str, Optional[int]]

Internal helper function to clean chemistry names.

Parameters:

name – String name of the chemistry.

Returns:

Tuple of the cleaned name and version

ngs_tools.chemistry.get_chemistry(name: str) Chemistry.Chemistry

Fetch a Chemistry definition by name. Uses some regex magic to correctly deal with chemistry versioning at the end of the name. For instance, 10x2 is interpreted the same as 10xv2.

See SingleCellChemistry and SpatialChemistry for available chemistries.

Parameters:

name – String name of the chemistry. Any dashes (-) or capitalization are ignored.

Returns:

The matching chemistry.

Raises:

ChemistryError – If the chemistry could not be found.