ngs_tools.chemistry.SpatialChemistry

Module Contents

Classes

SpatialResolution

Typed version of namedtuple.

SpatialChemistry

Extends Chemistry to be able to handle spatial chemistries.

SpatialSequencingChemistry

Extends SequencingChemistry to be able to handle common spatial chemistries.

Attributes

_SLIDESEQ_V2

_VISIUM

_STEREOSEQ

_COSMX

_SEQSCOPE_HDMI_DRAI

_SEQSCOPE_HDMI32_DRA1

_STARMAP

_SEQFISH

_MERFISH

_SEQUENCING_SPATIAL_CHEMISTRIES

_INSITU_SPATIAL_CHEMISTRIES

SPATIAL_CHEMISTRIES

class ngs_tools.chemistry.SpatialChemistry.SpatialResolution

Bases: NamedTuple

Typed version of namedtuple.

Usage in Python versions >= 3.6:

class Employee(NamedTuple):
    name: str
    id: int

This is equivalent to:

Employee = collections.namedtuple('Employee', ['name', 'id'])

The resulting class has extra __annotations__ and _field_types attributes, giving an ordered dict mapping field names to types. __annotations__ should be preferred, while _field_types is kept to maintain pre PEP 526 compatibility. (The field names are in the _fields attribute, which is part of the namedtuple API.) Alternative equivalent keyword syntax is also accepted:

Employee = NamedTuple('Employee', name=str, id=int)

In Python versions <= 3.5 use:

Employee = NamedTuple('Employee', [('name', str), ('id', int)])
scale: float = 1.0
unit: Optional[typing_extensions.Literal[nm, um, mm]]
exception ngs_tools.chemistry.SpatialChemistry.SpatialChemistryError

Bases: Exception

Common base class for all non-exit exceptions.

class ngs_tools.chemistry.SpatialChemistry.SpatialChemistry(resolution: SpatialResolution, *args, **kwargs)

Bases: ngs_tools.chemistry.Chemistry.Chemistry

Extends Chemistry to be able to handle spatial chemistries.

property resolution: SpatialResolution

Get the spatial resolution as a SpatialResolution object.

class ngs_tools.chemistry.SpatialChemistry.SpatialSequencingChemistry(name: str, description: str, resolution: SpatialResolution, n: int, strand: ngs_tools.chemistry.Chemistry.SequencingStrand, cdna_parser: ngs_tools.chemistry.Chemistry.SubSequenceParser, spot_barcode_parser: Optional[ngs_tools.chemistry.Chemistry.SubSequenceParser] = None, umi_parser: Optional[ngs_tools.chemistry.Chemistry.SubSequenceParser] = None, whitelist_path: Optional[str] = None)

Bases: SpatialChemistry, ngs_tools.chemistry.Chemistry.SequencingChemistry

Extends SequencingChemistry to be able to handle common spatial chemistries.

property spot_barcode_parser: ngs_tools.chemistry.Chemistry.SubSequenceParser

Get the spot barcode parser

property barcode_parser: ngs_tools.chemistry.Chemistry.SubSequenceParser

Get the spot barcode parser

property umi_parser: ngs_tools.chemistry.Chemistry.SubSequenceParser

Get the UMI parser

property cdna_parser: ngs_tools.chemistry.Chemistry.SubSequenceParser

Get the cDNA parser

property has_spot_barcode: bool

Whether the chemistry has a spot barcode

property has_barcode: bool

Whether the chemistry has a spot barcode

property has_umi: bool

Whether the chemistry has a UMI

property has_whitelist: bool

Whether the chemistry has a fixed predefined spot barcode whitelist

property whitelist_path: Optional[str]

Path to the whitelist. None if it does not exist.

ngs_tools.chemistry.SpatialChemistry._SLIDESEQ_V2
ngs_tools.chemistry.SpatialChemistry._VISIUM
ngs_tools.chemistry.SpatialChemistry._STEREOSEQ
ngs_tools.chemistry.SpatialChemistry._COSMX
ngs_tools.chemistry.SpatialChemistry._SEQSCOPE_HDMI_DRAI
ngs_tools.chemistry.SpatialChemistry._SEQSCOPE_HDMI32_DRA1
ngs_tools.chemistry.SpatialChemistry._STARMAP
ngs_tools.chemistry.SpatialChemistry._SEQFISH
ngs_tools.chemistry.SpatialChemistry._MERFISH
ngs_tools.chemistry.SpatialChemistry._SEQUENCING_SPATIAL_CHEMISTRIES
ngs_tools.chemistry.SpatialChemistry._INSITU_SPATIAL_CHEMISTRIES
ngs_tools.chemistry.SpatialChemistry.SPATIAL_CHEMISTRIES