Module: cell_graph_general

class cytomulate.cell_graph_general.GeneralCellGraph[source]

Bases: object

generate_trajectories(cell_types, **kwargs)[source]

Generate the actual differential paths

Parameters:
  • cell_types (dict) – A dictionary of CellType objects

  • kwargs – Extra parameters needed for non-default path generation algorithms, which are passed to cytomulate.utilities.trajectories.

Return type:

None

sample_graph(n_samples, cell_label, beta_alpha=0.4, beta_beta=1.0)[source]

Draw random samples of a cell type from the cell differentiation graph

Parameters:
  • n_samples (int) – Number of samples

  • cell_label (str or int) – The label of the cell needed

  • beta_alpha (float) – The alpha parameter of the beta distribution

  • beta_beta (float) – The beta parameter of the beta distribution

Return type:

Tuple[ndarray, ndarray, list]

Returns:

  • G (np.ndarray) – The additive values of the path

  • pseudo_time (np.ndarray) – The pseudo times

  • labels (list) – The cell types to which the cell is differentiating

visualize_graph()[source]

Visualize the cell graph

Return type:

None