grnet.clusters package

Module contents

class grnet.clusters.CellClasses(models: List[Estimator], names: List[str | int] | None = None, colors: List[Tuple[float] | str] | str | None = None)

Bases: object

Class to manage cell classes in a dataset

Methods

__init__(

self, models: List[grnet.abstract.Estimator], names: List[Union[str, int]], colors: Union[List[Union[Tuple[float], str]], str]

) -> None:

initialize attributes

fetch(

self, id: Union[int, str]

) -> Dict[str, Union[pd.DataFrame, str, int, Tuple[float]]]:

fetch a set of information about a cell class (cell-class dict)

Attributes

models: Dict[int, grnet.abstract.Estimator]
referring the input list of pretrained (self.estiamte() is already run) models

for the cell classes, cell classes are saved with indexes

grns: Dict[int, pandas.DataFrame]
referring the input list of pretrained (self.estiamte() is already run) models

for the cell classes, GRN matrices of the cell classes are saved with indexes

names: Dict[int, Union[str, int]]
referring the input list of names for the cell classes,

cell classes are saved with indexes

colors: Dict[int, Union[str, Tuple[float]]]
referring the input list of colors (used in visualization) for the cell classes,

cell classes are saved with indexes

fetch(id: int | str) Dict[str, Estimator | str | int | Tuple[float]]

Parameters

id: Union[int, str]

index or name of the cell class

Returns

cell-class dict: Dict[str, Union[pd.DataFrame, str, int, Tuple[float]]]

{“model”: Estimator, “name”: Union[str, int], “color”: Union[str, Tuple[float]]}