UNAGI.UNAGI_tool.UNAGI.setup_data

UNAGI.setup_data(data_path, stage_key, total_stage, gcn_connectivities=False, neighbors=25, threads=20)[source]

The function to specify the data directory, the attribute name of the stage information and the total number of time stages of the time-series single-cell data. If the input data is a single h5ad file, then the data will be split into multiple h5ad files based on the stage information. The function can take either the h5ad file or the directory as the input. The function will check weather the data is already splited into stages or not. If the data is already splited into stages, the data will be directly used for training. Otherwise, the data will be split into multiple h5ad files based on the stage information. The function will also calculate the cell graphs for each stage. The cell graphs will be used for the graph convolutional network (GCN) based cell graph construction.

Parameters:
  • data_path (str) – the directory of the h5ad file or the folder contains data.

  • stage_key (str) – the attribute name of the stage information.

  • total_stage (int) – the total number of time stages of the time-series single-cell data.

  • gcn_connectivities (bool) – whether the cell graphs are already calculated. Default is False.

  • neighbors (int) – the number of neighbors for each cell used to construct the cell neighbors graph, default is 25.

  • threads (int) – the number of threads for the cell graph construction, default is 20.